UBI errors when "ls -l"

Richard Weinberger richard.weinberger at gmail.com
Wed Dec 10 02:40:11 PST 2014


On Wed, Dec 10, 2014 at 10:34 AM, Yan <ykong at sierrawireless.com> wrote:
> My Kernel version is:
> Linux swi-mdm9x15 3.4.91-yocto-standard #7 PREEMPT Wed Dec 10 17:39:02 HKT 2014
> armv7l GNU/Linux

Is this a vanilla kernel or does it carry tons of vendor patches?

> I am trying to mount ubifs. It seems mount ubifs image successfully, but when
> access ubifs, it will print out lots of error msgs.
> This is steps I do:
> (1)make ubifs.image. I make ubifs image from *.conf (I tried use "mkfs.ubifs"
> and "ubinize" to make image directly, the same error msgs ).
> IMAGE_FSTYPES += "ubi"
> MKUBIFS_ARGS = "-m 4096 -e 253952 -c 2047"
> UBINIZE_ARGS = "-m 4096 -p 256KiB -s 4096"
>
> (2)mount ubifs In Linux shell.
> mkdir -p /mnt/ubifs
> flash_erase /dev/mtd3 0 0 -N
> dd if=/mnt/flash/ubi.img of=/dev/mtd3 bs=4096

Please use ubi tools to flash the image.
(dd should work, but just in case...)

> ubiattach /dev/ubi_ctrl -m 3 -O 4096

Why do you need -O?
Looks fishy.

> ubiblkvol -a /dev/ubi0_0
> mount -t ubifs ubi0:swi-mdm9x15-rootfs /mnt/ubifs
>
> (3)After step (2), ubifs can be mounted successfully. But when I access ubifs,
> such as when I input "ls", it will show lots of error msgs. But after printing
> out error msgs, finally it will show directory.
> By the way, I tried to use nandsim to debug the ubi image in Ubuntu, it is OK.
> I think there is something wrong in Kernel configuration.
> Could you please help me? Thank you very much!
> Error msgs and Kernel configuration attached.
>
> error msgs:
> [ 1126.270349] UBI assert failed in ubi_io_read at 213 (pid 427)

What is line 213 in your drivers/mts/ubi/io.c?

-- 
Thanks,
//richard



More information about the linux-mtd mailing list