设为首页收藏本站
查看: 19342|回复: 3

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

[复制链接]

3

主题

5

回帖

38

积分

新手上路

积分
38
yifengxing 发表于 2015-6-8 10:38:16 | 显示全部楼层 |阅读模式
kimball@kimball-desktop:~/am335x$ ls
gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux  mkfs.ubifs    myd-am335x_rootfs  u-boot
linux-3.2.0                                                mk-ubi-512mb  ubinize_512M.cfg
kimball@kimball-desktop:~/am335x$ ./mk-ubi-512mb myd-am335x_rootfs/
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

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$
按照手册上做的,制作文件系统时发生这个错误,本人是个新手,请版主赐教!

回复

使用道具 举报

21

主题

21

回帖

575

积分

管理员

积分
575
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
回复 支持 反对

使用道具 举报

21

主题

21

回帖

575

积分

管理员

积分
575
oneal.tang 发表于 2015-7-7 10:02:17 | 显示全部楼层
mkfs.ubifs (1.16 MB, 下载次数: 14269)
ubinize (835.09 KB, 下载次数: 14427)

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

回复 支持 反对

使用道具 举报

21

主题

21

回帖

575

积分

管理员

积分
575
oneal.tang 发表于 2015-9-24 13:52:22 | 显示全部楼层
还可以用deb安装包来安装,
本站下载1.5.1版本:
mtd-utils.zip (660.24 KB, 下载次数: 13820)

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

[mw_shl_code=bash,true]$ dpkg -i mtd-utils_1.5.1-1_i386.deb[/mw_shl_code]

命令进行安装,已测ubuntu12.04 和 ubuntu 14.04 可用,ubuntu10.04 不可用。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2024-4-19 10:09 , Processed in 0.047286 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表