[U-Boot] UBI / UBIFS booting from NAND support

Ladislav Michl ladis at linux-mips.org
Tue Nov 28 07:01:25 UTC 2017


On Mon, Nov 27, 2017 at 03:53:27PM +0100, jsanabria wrote:
> I could mount ubifs using ubifsmount command but there were a bit of
> warnings and then after trying to boot the spl did not find volume at all.

SPL is not supposed to load kernel from UBIFS (filesystem), but directly from
UBI volume. On IGEPs U-Boot expects these volumes (shrinked):
=> ubi info l
Volume information dump:
        vol_id          0
        name            loader
Volume information dump:
        vol_id          1
        name            config
Volume information dump:
        vol_id          2
        name            config_r
Volume information dump:
        vol_id          3
        name            kernel
Volume information dump:
        vol_id          4
        name            dtb
Volume information dump:
        vol_id          5
        name            rootfs

In falcon mode SPL tries to load kernel and dtb, both identified by vol_id,
hence those have to be 3 and 4. If that fails, it loads u-boot image from
vol_id 0. Volumes 1 and 2 are used to store u-boot environment [*].
While there's also vol_id 5, u-boot is not concerned here, it just pass
information about rootfs to kernel.

Speaking about this, it would be nice to have it documented somewhere...

[*] There's bug in UBI env code. It just hangs, if you boot from MMC and flash
still contains vendor instalation (1bit hamming ecc and jffs2). I'll fix that
one day, but if you have time, any help welcome.

Best regards,
	ladis


More information about the U-Boot mailing list