[U-Boot] chain-loading u-boot from u-boot?

rpjday at crashcourse.ca rpjday at crashcourse.ca
Tue Sep 25 16:20:18 UTC 2018


   colleague just asked me how to (if possible) chain-load a modified
u-boot from a u-boot currently stored in flash, and from having done
this once *years* ago, i'm fairly sure i can make this happen, i just
want to confirm my plan. (the current running version is based off of
u-boot v2015.07 -- i have no freedom to change that.)

   the newer u-boot will do nothing more than add a couple commands
("mii" and "mdio"), and i've already tweaked the configuration to
add those commands to the configuration, compiled and verified that
those commands are now listed in the u-boot.map file, so that part
seems fine.

   at this point, i've been told that there is a proprietary pre-boot
loader in ROM which, among other things, loads u-boot from flash
into RAM and jumps to that address -- i assume, at that point, i
just need to download my new u-boot binary from the server to
some address in RAM currently *not* occupied by u-boot, and "go"
to that new address.

   my only question is, what do i change in the configuration to
identify where i will load the enhanced u-boot? i vaguely recall
that i need to change the text base, and load the new binary at
precisely that address, is that correct?

   finally (as an aside), i've read a number of pieces online
that describe how the second u-boot should try to avoid doing
low-level H/W initialization that the first has already done,
but for now, i'm just going to assume idempotency for all of
that early initialization unless proven wrong.

   so ... what must i change in the config to support loading
the new version of u-boot at a different address? thanks.

rday




More information about the U-Boot mailing list