[U-Boot] SPL framework re-design

Scott Wood scottwood at freescale.com
Fri Jun 17 20:51:13 CEST 2011


On Fri, 17 Jun 2011 20:45:19 +0200
Daniel Schwierzeck <daniel.schwierzeck at googlemail.com> wrote:

> Dear Wolfgang,
> 
> On Thu, Jun 16, 2011 at 11:47 PM, Wolfgang Denk <wd at denx.de> wrote:
> > Dear Daniel Schwierzeck,
> >
> > In message <BANLkTim9AE2aszKLiDH53vd+Hjpz7GVoNA at mail.gmail.com> you wrote:
> >>
> >> The relocate_code and board_init_r functions must not be compiled,
> >> they are not needed anyway. This
> >> can be simply controlled with -DCONFIG_UBOOT_SPL_BUILD.
> >
> > This is very much wrong.  In the general case, you still need
> > relocation (because the final start address of the U-Boot code canonly
> > be determined at runtime), and you definitely need the code in
> > board_init_r().
> 
> I guess we are talking about different kinds of SPL. In my understanding a SPL
> runs inside an internal SRAM, initializes any external RAM and loads
> U-Boot from
> any kind of memory or flash device into that RAM at a fixed load address and
> then jumps to that address. In this case no relocation is needed.  Some kind
> of SoC specific booting mechanism like a NAND-IPL or hard-wired Boot-ROM
> loads the SPL initially into SRAM and jumps to it.

It starts from an SRAM, but often relocates to RAM before loading the final
image.  In some cases the SRAM is also used by hardware as the I/O buffer,
so we need to vacate it before any further NAND operations.

-Scott



More information about the U-Boot mailing list