UBI support

Esben Haabendal eha at dev.doredevelopment.dk
Fri Jul 16 08:13:39 EDT 2010


On Fri, 2010-07-16 at 09:27 +0200, Sascha Hauer wrote:

> > 
> > I've tested this on our i.MX25 board. Here's what I get:
> > 
> > barebox:/ ubiattach /dev/nand0.rootfs
> > UBI: attaching mtd0 to ubi0
> > UBI: physical eraseblock size:   131072 bytes (128 KiB)
> > UBI: logical eraseblock size:    129024 bytes
> > UBI: smallest flash I/O unit:    2048
> > UBI: sub-page size:              512
> > UBI: VID header offset:          512 (aligned 512)
> > UBI: data offset:                2048
> > UBI: empty MTD device detected
> > UBI: create volume table (copy #1)
> > UBI error: ubi_scan_get_free_peb: no eraseblocks found
> > failed to attach: error 28
> 
> I just tested it on an i.MX35 board which should have the same Nand
> Controller as the i.MX25. I have never seen Nand devices with a subpage
> size smaller than the I/O unit size (sub-page size: 512), so I would
> start looking there.
> I don't know how this subpage size is handled. It may well be that this
> is a bug in the Nand driver and not UBI.
> You could also go through 'git log drivers/mtd/ubi' in the kernel to see
> if there's something relevant. Unfortunately I don't know from which
> kernel version the U-Boot UBI code was derived from.

FWIW, I am working on a device here with a similar NAND device.
To get it working properly, you must not enable
CONFIG_MTD_NAND_VERIFY_WRITE (as it is known to be broken for sub-page
size != I/O unit size).  I haven't looked at barebox nand or ubi driver,
so I have no idea if something similar to this could be present there.

/Esben




More information about the barebox mailing list