[U-Boot] new uboot with relocation change cannot boot when download the bin file to different address than TEXT_BASE

Albert ARIBAUD albert.aribaud at free.fr
Sun Oct 10 08:48:52 CEST 2010


Le 10/10/2010 06:33, Lei Wen a écrit :

> But I am still a little confussed, even for the new scheme, at the end
> of board_init_f, there is a relocate_code, which is
> the exactly as original "simply copied" code.
> What the relocation in new scheme is different with the old simply
> copy, has more feature, or could fix some bug?

Before relocation, for ARM926 we used to put in TEXT_BASE the RAM 
address where we wanted u-boot to end up at once relocated, and the 
first thing we did was initalize RAM, move the code and jump there; so 
we did not really relocate the code, just move it -- no fixups.

The new relocation allows putting u-boot as high in RAM as possible 
without computing this location by hand (which would be tedious for 
fixed-size RAM targets) or impossible (for targets with variable amount 
of RAM). But this meant u-boot might run at different places, which in 
turns meant truly relocating -- with fixups.

In the process, TEXT_BASE for ARM went back to what is should have been 
all along in order to converge with other platforms, i.e. the FLASH, not 
RAM, target address.

The general goal is to be able to have a single binary running on 
several HW variants.

> Thanks,
> Lei

You're welcome.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list