[U-Boot] How to have U-boot loading U-boot

Jean-Christophe Lallemand jcl at develtech.com
Wed Feb 4 15:52:03 CET 2015


Dear all,

I have already used u-boot several times on various ARM-based platforms but I need to go to unknown territories this time.
On an ARM-based platform again, we have a u-boot port (v2010.09) available loaded by a ROM bootloader into the internal RAM.
For some reasons, the ROM bootloader limits the size of the loaded code to 128kB which is a bit short for the functionality needed.

What I'd like to do is have the already available u-boot (say Level-1) to load a second u-boot (say Level-2) into DDR where size is not an issue which will then load Linux.

For the Level-1, I haven't changed anything for now. I'm still using the Linux kernel load address.

For the Level-2, I have found the following interesting configuration flags:
CONFIG_SKIP_LOWLEVEL_INIT -> to suppress the CPU & external RAM initialization that is already done by Level-1
CONFIG_SKIP_RELOCATE_UBOOT -> to avoid the relocation that was not looking interesting in the scope of a Level-2 but is that correct?
TEXT_BASE -> modified to match the kernel load address used in Level-1

I have constructed my Level-2 U-boot image using the same kind of commands as for my kernel but specifying Firmware type
./u-boot/tools/mkimage -A arm -O U-boot -T Firmware -C none -a 70008000 -e 70008000 -n 'u-boot L2' -d ./u-boot/u-boot.bin ./u-boot/u-boot.uImage

When I try to run the loaded Level-2, my board freezes.
I've also tried to hack the bootm command so that my Firmware image is seen as a stand-alone application so that it runs it directly without the cleanup stuff but that does not work either.

Before I go on debug this intensively, I just want to make sure I've not missed something very obvious in the process?

Thanks in advance,
JC


More information about the U-Boot mailing list