ubi文件系统
给位大神,我想使用UBI文件系统,现在已经使uboot支持ubi文件系统了,uboot中configs里面的am3517_evm.h文件修改添加如下内容:
#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE+ 1024*1024)
#define CONFIG_MTD_DEVICE 1
#define CONFIG_MTD_PARTITIONS 1
#define CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_UBI
#define CONFIG_LZO 1
#define CONFIG_RBTREE 1
#define MTDIDS_DEFAULT "nand0=nandflash0"
#define MTDPARTS_DEFAULT "mtdparts=nandflash0:512k@0(xload)," \
"1792k(uboot)," \
"256k(params)," \
"5m(kernel)," \
"-(root)"
nandargs设置如下:setenv bootargs console=${console} ubi.mtd=4 root=ubi0:rootfs-nand rw
rootfstype=ubifs
uboot烧写UBI操作命令如下:
一:mtdpart default
二:nand erase root
三:ubi part root
四: ubi create rootfs-nand
五:fatload usb 0:1 0x82000000 ubifs.img 0x2293800
六:ubi write 0x82000000 rootfs-nand 0x2293800
然后重启
内核最后的打印信息如下:[ 2.359405] VFS: Cannot open root device "ubi0:rootfs-nand" or unknown-block(0,0)
[ 2.367309] Please append a correct "root=" boot option; here are the available partitions:
[ 2.376220] 1f00 512 mtdblock0 (driver?)
[ 2.381561] 1f01 1792 mtdblock1 (driver?)
[ 2.386901] 1f02 256 mtdblock2 (driver?)
[ 2.392150] 1f03 5120 mtdblock3 (driver?)
[ 2.397491] 1f04 254464 mtdblock4 (driver?)
[ 2.402801] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.411468] [<c00a3678>] (unwind_backtrace+0x0/0xec) from [<c035f384>] (panic+0x54/0x180)
[ 2.420074] [<c035f384>] (panic+0x54/0x180) from [<c0009148>] (mount_block_root+0x25c/0x2ac)
[ 2.429290] [<c0009148>] (mount_block_root+0x25c/0x2ac) from [<c0009280>] (prepare_namespace+0x88/0x1bc)
[ 2.439270] [<c0009280>] (prepare_namespace+0x88/0x1bc) from [<c0008708>] (kernel_init+0x10c/0x14c)
[ 2.448760] [<c0008708>] (kernel_init+0x10c/0x14c) from [<c009e590>] (kernel_thread_exit+0x0/0x8)
各位大神帮帮忙,我已经纠结了很多天了,非常感谢
[解决办法]