2012-03-29 179 views
1

我有一個基於SAM9的電路板運行嵌入式Linux。UBIFS啓動錯誤

我有一個JFFS2文件系統,現在想轉移到UBIFS。

我啓用了UBIFS作爲目標文件系統,在make menuconfig的buildroot包中使用了我的板子。

我生成了rootfs.arm.ubifs文件,我使用bootloader的nandwrite實用程序以我用於.jffs2文件的相同方式閃存在板上。

我也改變了bootargs到:

setenv bootargs 'console=ttyS0,115200 rw ubi.mtd=1,2048 rootfstype=ubifs root=ubi0:rootfs'

但我發現了以下錯誤,引導板:

Creating 2 MTD partitions on "atmel_nand":                          
0x000000000000-0x000000400000 : "Kernel"                           
0x000000400000-0x000010000000 : "Data"                           
UBI: attaching mtd1 to ubi0                              
UBI: physical eraseblock size: 131072 bytes (128 KiB)                       
UBI: logical eraseblock size: 126976 bytes                          
UBI: smallest flash I/O unit: 2048                            
UBI: sub-page size:    512                            
UBI: VID header offset:   2048 (aligned 2048)                        
UBI: data offset:    4096                            
UBI warning: ubi_scan: 276 PEBs are corrupted                          
corrupted PEBs are: 0 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 517 
UBI error: ubi_read_volume_table: the layout volume was not found                     
UBI error: ubi_init: cannot attach mtd1                           
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22   

回答

3

這是一個猜測,但你ubinize你的rootfs在閃存到原始NAND之前?

http://www.linux-mtd.infradead.org/doc/ubifs.html#L_usptools

The images produced by mkfs.ubifs may be written to UBI volumes using 
ubiupdatevol or may be further fed to the ubinize tool to create an UBI 
image which may be put to the raw flash. 
+0

謝謝!這工作:) ...我ubinized rootfs閃存到NAND和它的工作。 – androidFan 2012-04-05 05:50:49