[U-Boot] Strange UBI problems

Gary Thomas gary at mlbassoc.com
Tue Nov 19 18:05:37 CET 2013


I'm building U-Boot from the FSLC (repo/fork) on an i.MX6
   U-Boot 2013.10-00012-g5bc3118-dirty (Nov 19 2013 - 09:17:18)
   CPU:   Freescale i.MX6SOLO rev1.1 at 792 MHz

After I made a small change today in the NAND FLASH layout, I can
no longer use UBI from U-Boot.  Here's what I see today:

MyBoard > mtdparts default
MyBoard > mtdparts

device nand0 <gpmi-nand>, # parts = 4
  #: name                size            offset          mask_flags
  0: boot                0x001e0000      0x00000000      0
  1: env                 0x00020000      0x001e0000      0
  2: linux               0x00f00000      0x00200000      0
  3: fs                  0x06f00000      0x01100000      0

active partition: nand0,0 - (boot) 0x001e0000 @ 0x00000000

defaults:
mtdids  : nand0=gpmi-nand
mtdparts: mtdparts=gpmi-nand:1920k(boot),128k(env),15m(linux),-(fs)

MyBoard > ubi part linux
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22

Notice that when I try to access the 'linux' partition, it's trying
to use mtd1 (env).  In fact, it doesn't seem to matter at all what
partition I try to access, it always wants to use mtd1.

Today, I changed the MTD layout from
   mtdparts=gpmi-nand:896k(boot),128k(env),15m(linux),-(fs)
to
   mtdparts=gpmi-nand:1920k(boot),128k(env),15m(linux),-(fs)
I then rebuilt my Linux and reinstalled the partition.  Linux is totally
happy with this new layout, but U-Boot doesn't like it at all.

Just to make sure I have this right, I just restored the previous layout
and everything works as expected.

What am I missing?  Why is UBI not working with this layout?

Thanks for any help/pointers

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


More information about the U-Boot mailing list