AnsweredAssumed Answered

T1040RDB Failed to mount UBIFS

Question asked by leo tao on Apr 10, 2015
Latest reply on Apr 15, 2015 by leo tao

I am trying to boot T1040 from nand and use UBIFS. when booting from Nand, it boots well until the point of "mounting UBIFS". below is the error:



UBI: attaching mtd7 to ubi0

UBI error: validate_ec_hdr: bad VID header offset 512, expected 4096

UBI error: validate_ec_hdr: bad EC header

Erase counter header dump:

        magic          0x55424923

        version        1

        ec             0

        vid_hdr_offset 512

        data_offset    1024

        image_seq      2076921562

        hdr_crc        0x951adef

erase counter header hexdump:

CPU: 2 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-QorIQ-SDK-V1.7+g6619b8b #6

Call Trace:

[c9081cd0] [c0006f50] show_stack+0x40/0x150 (unreliable)

[c9081d10] [c06e9a20] dump_stack+0x78/0xa0

[c9081d20] [c03a56ac] validate_ec_hdr+0xac/0x120

[c9081d30] [c03a6104] ubi_io_read_ec_hdr+0x184/0x240

[c9081d60] [c03aaf00] ubi_attach+0x180/0x14d0

[c9081de0] [c039fdf8] ubi_attach_mtd_dev+0x688/0xc80

[c9081e30] [c08e9348] ubi_init+0x274/0x30c

[c9081e80] [c00021a8] do_one_initcall+0x158/0x1b0

[c9081ef0] [c08cb8d0] kernel_init_freeable+0x134/0x1d0

[c9081f20] [c0002808] kernel_init+0x18/0x170

[c9081f40] [c000fe0c] ret_from_kernel_thread+0x5c/0x64

UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0

UBI error: ubi_attach_mtd_dev: failed to attach mtd7, error -22

UBI error: ubi_init: cannot attach mtd7

UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19

VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19

Please append a correct "root=" boot option; here are the available partitions:

1f00          131072 mtdblock0  (driver?)

1f01            1536 mtdblock1  (driver?)

1f02            1024 mtdblock2  (driver?)

1f03            1024 mtdblock3  (driver?)

1f04           24576 mtdblock4  (driver?)

1f05           10240 mtdblock5  (driver?)

1f06            1024 mtdblock6  (driver?)

1f07          409600 mtdblock7  (driver?)

1f08           98304 mtdblock8  (driver?)

1f09          524288 mtdblock9  (driver?)

1f0a           65536 mtdblock10  (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-QorIQ-SDK-V1.7+g6619b8b #6

Call Trace:

[c9081dd0] [c0006f50] show_stack+0x40/0x150 (unreliable)

[c9081e10] [c06e9a20] dump_stack+0x78/0xa0

[c9081e20] [c06e7c9c] panic+0xd8/0x1fc

[c9081e70] [c08cbce4] mount_block_root+0x1b0/0x248

[c9081ed0] [c08cc064] prepare_namespace+0xa0/0x1d0

[c9081ef0] [c08cb958] kernel_init_freeable+0x1bc/0x1d0

[c9081f20] [c0002808] kernel_init+0x18/0x170

[c9081f40] [c000fe0c] ret_from_kernel_thread+0x5c/0x64

Rebooting in 180 seconds..


what I did was:  kernel to support support UBIFS

2. build uboot to support UBIFS

3. set boot cmd to :

bootcmd=setenv bootargs noinitrd ip=off mem=256M rootwait=1 rw ubi.mtd=7,4096 rootfstype=ubifs root=ubi0:rootfs console=$consoledev,$baudrate $othbootargs;nand read.e $loadaddr $kernel_addr $kernel_size;nand read.e $fdtaddr $fdt_addr $fdt_size;bootm $loadaddr - $fdtaddr

4. modify script

add image file type:


build rootfs: I got 2 images:



I update rootfs partition mtdblock7 with  " fsl-image-core-t1040rdb-20150408204106.rootfs.ubifs"


Is the anything else need to set up to make it work?