Ubifs

UBI 在啟動前“暫停”

  • November 25, 2015

我已經在我的嵌入式板上安裝了一個 ubifs 映像,但是在啟動時,當我打開我的板時,啟動會暫停幾秒鐘(大約 10 秒),輸出如下:

Booting from nand ...

NAND read: device 0 offset 0x280000, size 0x800000
8388608 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Booting from nand with DTS...
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: attached mtd1 (name "mtd=4", size 1013 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 512 (aligned 512), data offset: 2048
UBI: good PEBs: 8108, bad PEBs: 0, corrupted PEBs: 0
UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1663921903
UBI: available PEBs: 6533, total reserved PEBs: 1575, PEBs reserved for bad PEB handling: 160

我使用以下命令製作了 ubi 圖像:

sudo mkfs.ubifs -v -m 2048 -e 129024 -c 1675 -r $PWD/$1 -o rootfs.img
sudo ubinize -o rootfs.ubi -p 131072  -m 2048 -s 512 -O 512 ubi.ini

當然,其中 $1 是文件系統的 rootfs 目錄。而 ubi.ini 文件內容是這樣的:

[rootfs]
mode=ubi
image=rootfs.img
vol_id=4
vol_type=static
vol_name=rootfs
vol_alignment=1

也許我的配置文件有問題?如何避免 UBI 暫停啟動?

謝謝你。

我解決了換行問題:

vol_type=static

vol_type=dynamic

從這裡:http ://www.linux-mtd.infradead.org/faq/ubi.html#L_dyn_faster

引用自:https://unix.stackexchange.com/questions/245447