参考论坛上的《Ubifs文件系统的制作和启动.pdf》制作镜像文件,之前的步骤都正常。生成镜像时:
mkfs.ubifs -F -q -r /home/usr/rootfs_2_0_1 -m 2048 -e 126976 -c 2047 -o ubifs.img
此时提示-F选项无法使用。此时的打印如下
mkfs.ubifs: invalid option -- 'F'
Usage: mkfs.ubifs [OPTIONS] target
Make a UBIFS file system image from an existing directory tree
Examples:
Build file system from directory /opt/img, writting the result in the ubifs.img file
mkfs.ubifs -m 512 -e 128KiB -c 100 -r /opt/img ubifs.img
The same, but writting directly to an UBI volume
mkfs.ubifs -r /opt/img /dev/ubi0_0
Creating an empty UBIFS filesystem on an UBI volume
mkfs.ubifs /dev/ubi0_0
Options:
-r, -d, --root=DIR build file system from directory DIR
-m, --min-io-size=SIZE minimum I/O unit size
-e, --leb-size=SIZE logical erase block size
-c, --max-leb-cnt=COUNT maximum logical erase block count
-o, --output=FILE output to FILE
-j, --jrn-size=SIZE journal size
-R, --reserved=SIZE how much space should be reserved for the super-user
-x, --compr=TYPE compression type - "lzo", "favor_lzo", "zlib" or
"none" (default: "lzo")
-X, --favor-percent may only be used with favor LZO compression and defines
how many percent better zlib should compress to make
mkfs.ubifs use zlib instead of LZO (default 20%)
-f, --fanout=NUM fanout NUM (default: 8)
-k, --keyhash=TYPE key hash type - "r5" or "test" (default: "r5")
-p, --orph-lebs=COUNT count of erase blocks for orphans (default: 1)
-D, --devtable=FILE use device table FILE
-U, --squash-uids squash owners making all files owned by root
-l, --log-lebs=COUNT count of erase blocks for the log (used only for
debugging)
-v, --verbose verbose operation
-V, --version display version information
-g, --debug=LEVEL display debug information (0 - none, 1 - statistics,
2 - files, 3 - more details)
-h, --help display this help text
将-F参数去掉的话,会继续提示-q参数不可用。将上述两个参数都去掉才能生成镜像。对于8168,这样的镜像是否可用?
参考http://www.360doc.com/content/14/1015/18/18578054_417224516.shtml,使用了最新版本的mtd-utils,结果还是一样
参考http://www.qiyangtech.com/news/arm-development-board-faq2-c0eji0c9yhybra01.html,检查了mkfs.ubifs工具和文件系统的路径,未发现异常。
mtd-utils的版本:mtd-utils-1.5.2
库版本分别是e2fsprogs-1.42.13,zlib-1.2.8,lzo-2.06
ubuntu版本:10.04 LTS
ubuntu内核版本是2.6.32