製做ubifs.img

mkfs.ubifs -d fs -m 2048 -o rootfslink.ubiimg -e 126976 -c 120000 -F -v
sleep 1
sync
ubinize -o fs.img -m 2KiB -p 128KiB ubi.cfg -v
sleep 1
rm rootfslink.ubiimg
sync

 

 

mkfs.ubifs not found 的解決

 

ubuntu 16.04 LTS 下使用命令 sudo apt-get install mtd-utilshtml

 

 

ubinize的用法

1.ubinize支持哪些選項ubuntu

Usage: ubinize [options] <ini-file>markdown

Generate UBI images. An UBI image may contain one or more UBI volumes which
have to be defined in the input configuration ini-file. The flash
characteristics are defined via the command-line options.dom

-o, --output=<file name> output file name
-p, --peb-size=<bytes> size of the physical eraseblock of the flash this UBI image is created for in bytes,kilobytes (KiB), or megabytes (MiB) (mandatory parameter)
-m, --min-io-size=<bytes> minimum input/output unit size of the flash in bytes
-s, --sub-page-size=<bytes> minimum input/output unit used for UBI headers, e.g. sub-page size in case of NAND flash (equivalent to the minimum input/output unit size by default)
-O, --vid-hdr-offset=<num> offset if the VID header from start of the physical eraseblock (default is the next minimum I/O unit or sub-page after the EC header)
-e, --erase-counter=<num> the erase counter value to put to EC headers (default is 0)
-x, --ubi-ver=<num> UBI version number to put to EC headers (default is 1)
-Q, --image-seq=<num> 32-bit UBI image sequence number to use
(by default a random number is picked)
-v, --verbose be verbose
-h, --help print help message
-V, --version print program version工具

2.重要選項-p -m -s -O -epost

-p 指定flash的物理擦除塊大小ui

-m 指定flash的最小輸入輸出單元,當爲nor flash時,此值應指定爲1,當爲nand flash時此值應指定爲頁面大小this

-s 指定子頁大小,當爲nor flash時,此值應指定爲1,當爲nand flash時需指定此值爲nand flash的子頁大小atom

-O 指定vid header的偏移量url

-e 指定放在EC頭中的擦除計數器值,默認爲0

 

3.ubinize這個工具存在什麼意義?

既然有了mkfs.ubifs,爲何又出現了ubinize這個工具,這是筆者當時的思考,後來發現,經ubinize處理過的鏡像文件燒寫到flash中後,ubi工具才能正確處理這些存儲在flash中的數據

相關文章
相關標籤/搜索