有關ubi檔案格式的解壓

2021-07-10 04:13:20 字數 2253 閱讀 6157

to do this, mount the ubi/jffs2 pre-compiled demo image as a loopback device in your pc, and then copy all files to your sd card's partition.

here are the steps: (tested in ubuntu 11.04.)

if you are usingsama5d4ekorsama5d4_xplainedboard, the nand flash is different, so please use following line to do the nandsim, and change the page size to 4096.

sudo modprobe nandsim first_id_byte=0x2c second_id_byte=0xdc third_id_byte=0x90 fourth_id_byte=0xa6

昨天解包了一天,hit archive data格式的system.img用simg2img解不了,在網上查了好久,終於把hit archive data格式的system.img成功掛載,以下把我解包過程中所遇到的問題在這裡和大家分享一下,希望能幫到大家。

我的機器環境:ubuntu 12.04 lts(64位)

1,建立乙個需要被掛在的目錄

# mkdir /mnt/system

2,載入mtd模組

# modprobe mtdblock
3,載入ubi模組(前提你的linux環境以支援ubi模組)

# modprobe ubi
4,載入nandsim來模擬nand裝置

# modprobe nandsim first_id_byte=0xec second_id_byte=0xd5 third_id_byte=0x51 fourth_id_byte=0xa6  //- 2gib, 4096 bytes page.

科勝訊/opt/conexant/sdk/target/ubifs中的檔案

config.in 在make menuconfig時使用

ubifsroot.mk在make ubifsroot時使用

ubinize.cfg 在make ubifsroot生成rootfs.arm.ubifs.ubi檔案系統映象時使用

make ubifsroot將使用mkfs.ubifs和ubinize兩個工具

有了mkfs.ubifs和ubinize兩個工具後,就可以製作ubifs映象了,具體步驟如下:

1. 使用mkfs.ubifs命令將某個資料夾製作為ubifs映象,具體命令為:

mkfs.ubifs -r 

/opt/conexant/sdk/output/target

-m 2048 -e 126976-c 992 -o 

rootfs.arm.ubifs

以上命令的含義為將/opt/conexant/sdk/output/target資料夾製作為ubifs檔案系統映象,輸出的映象名為

rootfs.arm.ubifs

,-m引數指定了最小的i/o操作的大小,也就是nand flash乙個page的大小,-e引數指定了邏輯擦除快的大小,-c指定了最大的邏輯塊號。

通過此命令製作的出的ubifs檔案系統映象可在u-boot下使用ubi write命令燒寫到nand flash上。

2. 使用ubinize命令可將使用mkfs.ubifs命令製作的ubifs檔案系統映象轉換成可直接在flash上燒寫的格式(帶有ubi檔案系統映象卷標):

通過此命令生成的ubi.img可直接使用nand flash的燒寫命令燒寫到flash上。

ubinize -o 

/opt/conexant/sdk/output/images/rootfs.arm.ubifs.ubi

-m 2048 -p 128kib-s 512 -o 2048 

ubinize.cfg

ubinize.cfg為一些配置引數:

[ubifs]

mode=ubi

image=/opt/conexant/sdk/output/images/rootfs.arm.ubifs

vol_id=0

vol_type=dynamic

vol_name=dc-rootfs

vol_flags=autoresize

解壓ubi檔案 製作ubi檔案系統

製作 ubi檔案系統 目錄開發環境 ubi檔案系統簡介 ubi檔案系統前期準備 核心配置 開發板ubifs 工具 flash eraseall ubiattach ubimkvol 主機mtd utils 工具 mkfs.ubifs ubinize 編譯問題 製作ubi 檔案系統映象 生成ubifs...

解壓ubi檔案 製作ubi檔案系統 pdf

製作ubi檔案系統.pdf 製作ubi 檔案系統 目錄開發環境1 ubi 檔案系統簡介1 ubi 檔案系統前期準備2 核心配置2 開發板ubifs 工具 flash eraseall ubiattach ubimkvol 2 主機mtd utils 工具 mkfs.ubifs ubinize 4 編...

Oracle 控制檔案格式ctl檔案格式

options skip 1,errors 10 load data characterset zhs16gbk infile into table table name truncate fields terminated by optionally enclosed by trailing nu...