Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (25 sloc) 562 Bytes
#!/bin/sh
. config/options
IMG_ERASE_BLOCK_SIZE=""
IMG_PAGE_SIZE=""
IMG_ENDIAN="little"
IMG_CMP_TYPE="zlib"
die () {
echo "Unsupported filesystem $1"
exit 1
}
case $1 in
jffs2)
[ $IMG_ENDIAN = "little" ] && ENDIAN="-l" || ENDIAN="-b"
echo "Building JFFS2 image from root filesystem ..."
mkfs.jffs2 -X $IMG_CMP_TYPE $ENDIAN -r $ROOTFS -o $JFFS2
;;
ubifs)
echo "Building UBIFS image from root filesystem ..."
mkfs.ubifs -m 512 -e 128KiB -c 2048 -x $IMG_CMP_TYPE -r $ROOTFS -o $UBIFS
;;
*)
die $1
;;
esac
exit 0