選項說明
-p, --pad[=SIZE] Pad output to SIZE bytes with 0xFF. If SIZE is
not specified, the output is padded to the end of
the final erase block
-r, -d, --root=DIR Build file system from directory DIR (default: cwd)
-s, --pagesize=SIZE Use page size (max data node size) SIZE (default: 4KiB)
-e, --eraseblock=SIZE Use erase block size SIZE (default: 64KiB)
-c, --cleanmarker=SIZE Size of cleanmarker (default 12)
-m, --compr-mode=MODE Select compression mode (default: priortiry)
-x, --disable-compressor=COMPRESSOR_NAME
Disable a compressor
-X, --enable-compressor=COMPRESSOR_NAME
Enable a compressor
-y, --compressor-priority=PRIORITY:COMPRESSOR_NAME
Set the priority of a compressor
-L, --list-compressors Show the list of the avaiable compressors
-t, --test-compression Call decompress and compare with the original (for test)
-n, --no-cleanmarkers Don't add a cleanmarker to every eraseblock
-o, --output=FILE Output to FILE (default: stdout)
-l, --little-endian Create a little-endian filesystem
-b, --big-endian Create a big-endian filesystem
-D, --devtable=FILE Use the named FILE as a device table file
-f, --faketime Change all file times to '0' for regression testing
-q, --squash Squash permissions and owners making all files be owned by root
-U, --squash-uids Squash owners making all files be owned by root
-P, --squash-perms Squash permissions on all files
--with-xattr stuff all xattr entries into image
--with-selinux stuff only SELinux Labels into jffs2 image
--with-posix-acl stuff only POSIX ACL entries into jffs2 image
-h, --help Display this help text
-v, --verbose Verbose operation
-V, --version Display version information
-i, --incremental=FILE Parse FILE and generate appendage output for it
#mkfs.jffs2 -l -s 0x800 -e 0x20000 -p 0x4000000 -d mtd/ -o Angstrom-x11-image-demo-glibc-at91.rootfs.jffs2
mkfs.jffs2 -l -s 0x800 -e 0x20000 -p 0x4000000 -d rootfs -o at91-jffs2-rootfs
#modprobe mtdblock
2)加載mtdram內核模塊,將該設備的大小指定爲jffs2根文件系統映像的大小,塊擦除大小(即flash的塊大小)指定爲製作該 jffs2根文件系統時“-e”參數指定的大小,缺省爲64KB。下面兩個參數的單位都是KB。
#modprobe mtdram total_size=28928 erase_size=128
3)這時將出現MTD設備/dev/mtdblock0,使用dd命令將jffs2根文件系統拷貝到/dev/mtdblock0設備中。
# dd if=genericfs.arm_nofpu.jffs2 of=/dev/mtdblock0
# mount -t jffs2 /dev/mtdblock0 /mnt/mtd