Hello Hatim,

On Saturday 26 February 2011 05:04 PM, Hatim Ali wrote:
> Hello,
>
> I was trying to understand how NAND-SPL works. What I could understand after 
> seeing the code is that
> 1) NAND-SPL is a standalone application which will load the U-boot in the 
> main memory.
> 2) After doing the clock and DRAM initialization it will relocate itself in 
> the DRAM.
> 3) Then it will copy the u-boot from the nand into the RAM and execute the 
> u-boot.
>
> If my understanding is proper, then I have one doubt
> 1) Since the nand_spl is making use of the same Start.S and lowlevel_init.S, 
> the u-boot code will also perform relocation? So is it not a overhead doing 
> relocation twice?

As Albert mentioned in another mail, image copying and relocation can
be suppressed by using your linked address as the target address when
you call relocate_code.

This is easier to achieve in SPL because we have a custom and simpler
board_init_f. This is much more difficult to achieve in regular U-Boot
because the target address is calculated at run-time in board_init_f
and also depends on the U-Boot size.

>
> Also is there any similar implementation for MMC-SPL?

You might want to have a look at the series I posted yesterday for
OMAP4. Please note that relocation and image copying has been
suppressed in this SPL.

Br,
Aneesh
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to