yifengxing 发表于 2015-6-8 10:38:16

AM3358制作文件系统出错 :./mk-ubi-512mb myd-am335x_rootfs/

kimball@kimball-desktop:~/am335x$ ls
gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linuxmkfs.ubifs    myd-am335x_rootfsu-boot
linux-3.2.0                                                mk-ubi-512mbubinize_512M.cfg
kimball@kimball-desktop:~/am335x$ ./mk-ubi-512mb myd-am335x_rootfs/
mkfs.ubifs: invalid option -- 'F'
Usage: mkfs.ubifs 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=COUNTmaximum 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

Note, SIZE is specified in bytes, but it may also be specified in Kilobytes,
Megabytes, and Gigabytes if a KiB, MiB, or GiB suffix is used.

If you specify "lzo" or "zlib" compressors, mkfs.ubifs will use this compressor
for all data. The "none" disables any data compression. The "favor_lzo" is not
really a separate compressor. It is just a method of combining "lzo" and "zlib"
compressors. Namely, mkfs.ubifs tries to compress data with both "lzo" and "zlib"
compressors, then it compares which compressor is better. If "zlib" compresses 20
or more percent better than "lzo", mkfs.ubifs chooses "lzo", otherwise it chooses
"zlib". The "--favor-percent" may specify arbitrary threshold instead of the
default 20%.

The -R parameter specifies amount of bytes reserved for the super-user.
ubinize: error!: cannot stat "ubifs.img" referred from section "rfs-volume"
         error 2 (No such file or directory)
ubinize failed!!
kimball@kimball-desktop:~/am335x$
按照手册上做的,制作文件系统时发生这个错误,本人是个新手,请版主赐教!

oneal.tang 发表于 2015-6-9 10:49:28

这应该是由于制作UBI时没有使用-F参数所导致。

如果没有加-F参数请试着添加-F参数后重新试一遍。

ubuntu 10.04使用apt-get获取的mtd-utils有个bug,不支持 -F 参数,需要重新下载最新的mtd-utils源码编译安装。
你可以下载mtd-utils源码编译获得这几个工具。
这里是mtd-utils源码下载地址:
http://git.infradead.org/mtd-utils.git/shortlog/refs/tags/v1.5.1
最新版 (v1.5.1)点击snapshot 按钮
编译步骤可以参考这里:
http://processors.wiki.ti.com/index.php/MTD_Utilities

oneal.tang 发表于 2015-7-7 10:02:17




这是静态编译好的工具,可以直接下载使用,在 Ubuntu 14.04 32bit 上测试过。
使用时请将这两个可执行文件放入/usr/bin 目录或者在制作ubi镜像的命令脚本中指定绝对路径。

oneal.tang 发表于 2015-9-24 13:52:22

还可以用deb安装包来安装,
本站下载1.5.1版本:


官网地址:
https://launchpad.net/ubuntu/+source/mtd-utils
使用

$ dpkg -i mtd-utils_1.5.1-1_i386.deb

命令进行安装,已测ubuntu12.04 和 ubuntu 14.04 可用,ubuntu10.04 不可用。
页: [1]
查看完整版本: AM3358制作文件系统出错 :./mk-ubi-512mb myd-am335x_rootfs/