0

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

  • U-Boot 200**9**?! Perhaps it's a time to update the archaic version of boot loader, don't you think? Hint: Just take the latest Buildroot that supports your board. Will save a lot of time and resources for you. – 0andriy Feb 07 '23 at 12:59
  • If you're ready to help for the bring up why not ;-) actually it's a custom board with alot of peripherals, I can generate a brand new BSP (even with Yocto by the way) but I will be stuck for the flash procedure and to adapt all the drivers to the new kernel architecture – Aïda Brahim Feb 08 '23 at 18:07

0 Answers0