[U-Boot] [PATCHv7 6/7] igep00x0: UBIize

Ladislav Michl ladis at linux-mips.org
Sun Jan 24 14:44:50 CET 2016


Hi Enric,

On Fri, Jan 22, 2016 at 11:35:49PM +0100, Enric Balletbo Serra wrote:
[...]
> > Am 17.01.2016 um 04:16 schrieb Ladislav Michl:
[...]
> >> +#define ENV_MTD_SETTINGS \
> >> +       "mtdids=nand0=gpmc-nand.0\0" \
> >> +       "mtdparts=mtdparts=gpmc-nand.0:512k(SPL),-(UBI)\0"
> >> +
> 
> I think this should be protected by CONFIG_BOOT_NAND, if is defined
> CONFIG_BOOT_ONENAND the ENV_MTD_SETTINGS are wrong.

Ah, right! I'll do that in next version. Btw, I hope to have OneNAND
board version too, so I would be able to test that as well.

> Also, as we're changing the memory map, I'd like to change the
> reserved space for SPL to 2M instead of 512k, so we cover all NAND
> block sizes from (64KB to 512KB)

What if we do that dynamically? It is not problem in U-Boot as we are
already running FDT fixup, so adding one more shouldn't hurt too much.
And we need to run 'spl export' anyway to fixup RAM size, so it is not
problem for falcon mode, too.

[...] 
> About the new layout you propose the following, right?
> 
> volume 0 is u-boot.img, 1 and 2 env, 3 kernel, 4 FDT, 5 rootfs (ubifs)

Yes, that's right. U-Boot does not care about volumes above 4, it is purely
Linux thing, but I'm using it that way (and somewhere in distant future I'd
like to run database directly on top of UBI volume)

> It's not possible load the kernel and the FDT from the rootfs directly, right?

UBIFS will certainly not fit into SPL size.

> BTW, I created the 5 volumes and copied the files to every volume but
> I get following errors, do you know what I am missing?
> 
> U-Boot SPL 2016.01-00358-g4efe05f (Jan 22 2016 - 17:16:04)
> Trying to boot from NAND
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 3
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 3
> UBI warning: Failed
> Loading Linux failed, falling back to U-Boot.
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 0
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 0
> UBI warning: Failed
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###

I've never seen that. How did you copy files into volumes? Btw, I haven't
tried doing that using U-Boot, but did:
$ ubiformat /dev/mtd1 -f root.ubi
(where root.ubi is product of PTXdist build)
Later I used f.e. 
$ ubiupdatevol /dev/ubi0_0 u-boot.img
to load files into volumes.

	ladis


More information about the U-Boot mailing list