Kernel panic after ubi rootfs size increased

153 Views Asked by At

I'm currently working with LTIB tool to generate linux kernel 3.0.25, with u-boot-2009-08, for iMX6 solo core board.

I use mfg tool to flash. When I installed new packages, the rootfs size changed from 147 to 162MiB. Since then, I can't boot anymore, the ubi doesn't get attached.

I have a kernel panic with the following logs :

**UBI error: process_eb: bad image sequence number 1588612812 in PEB 720, expected 1344834100** 
UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
UBI error: ubi_init: cannot attach mtd9 

UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:root", error -19
VFS: Cannot open root device "ubi0:root" or unknown-block(0,0) 
Please append a correct "root=" boot option; here are the available partitions: 

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

UBI error screenshot

Kernel Panic Screenshot

To get rid of this, I changed the u-boot mfg CONFIG_BOOTARGS as follows :

#define CONFIG_BOOTARGS  "console=ttymxc1,115200 rdinit=/linuxrc mtdparts=gpmi-
nand:4m(boot),256k(bootenv),2m(splashscreen),10m(ramdisk),5m(kernel),5m(flasherkernel),256k(updater
),256k(flag1),256k(flag2),170m(rootfs),32m(userpart1),32m(userpart2),-(userpart)"\

Here's the ubinize.cfg :

[ubifs] 
mode=ubi 
image=ubifs.img 
vol_id=0 
vol_size=170MiB
vol_type=dynamic  
vol_name=root 
vol_flags=autoresize

And the ubi generation commands :

sudo mkfs.ubifs -r $ROOTFS -m 4096 -e 253952 -c 1184 -o ubifs.img 
sudo ubinize -o $BUILT_IMG/ubi.img -m 4096 -p 256KiB ubinize.cfg

And the flash commands :

$ flash_eraseall /dev/mtd9 # Erasing Rootfs partition 
$ send" file="files/ubi.img # Sending Root filesystem 
$ ubiformat /dev/mtd9 -f $FILE -s 4096 -O 4096 # Flashing Root Filesystem

Any idea ? Thanks

0

There are 0 best solutions below