[U-Boot-Users] ubi and u-boot

Jamie Lokier jamie at shareable.org
Sun Apr 20 18:04:14 CEST 2008


Josh Boyer wrote:
> > Is it even a good idea?  The UBI (version 1 :-) initial scan is not
> > fast for large flash, and if the bootloader does it too, that's twice
> > as much time to boot.
> 
> It's a good idea, yes.  Particularly if you want to boot from NAND
> flash.
> 
> Can you define "large device"?  It only scans the first 1 or 2 pages for
> each eraseblock to build up the volume tables.  That really isn't that
> slow...

I was thinking this:

Hamish Moffatt wrote (Message-ID: <20080407073227.GA6317 at cloud.net.au>):
> Sorry I should've said 512MiB perhaps: 512 megabytes.
> UBI attach time appears to be about 6 seconds.

If 6 seconds is as fast as it can be done, annoying but fair enough.

Adding _another_ 6 seconds to the boot time seems a lot to me.

The only ways I see to improve the speed in general are:

   1. Partition the NAND into multiple independent UBIs, so the boot
      loader doesn't have the scan the whole chip, but that is
      obviously not so good for wear levelling.  (It's probably
      alright, though, if it's like the /boot partition on a standard
      Linux distro - not updated very often.)

   2. Change UBI's data structure so that the number of pages it needs
      to read is a sub-linear function of the number of erase blocks.
      I think this is what's meant by 'UBI 2'.

To remove the double scan:

> > However, if there was a protocol for bootloader to pass the scan
> > results to the booted kernel, that would be very nice.
> 
> Maybe.  I was never fully convinced of that.

I can understand the hesitation, but I think 6 seconds just to find
the kernel - especially when doing a 'disk resume' - is quite a lot.

Note that I haven't tried UBI myself yet.  I'm going on what has been
written to the list so far, as quoted above.

-- Jamie




More information about the U-Boot mailing list