[U-Boot] [PATCH 12/26] ARM: add relocation support
Graeme Russ
graeme.russ at gmail.com
Thu Sep 16 09:18:04 CEST 2010
On Thu, Sep 16, 2010 at 5:06 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Alessandro Rubini,
>
> I agree that it would be nice to have U-Boot completely position-
> independent and completelky restartable, but this would be a new
> feature, which newer existed before.
>
x86 has a nice feature whereby I can build two images that differ only by
TEXT_BASE. I can build using TEXT_BASE somewhere in low memory, tftp the
image and the 'go' directly to the base address of the image
e.g.
> tftp 6000000 u-boot.bin
> go 6000000
This works because the x86 reset vector is at top of memory (0xfffffff0),
not bottom (0x00000000) so the very first bytes of u-boot.bin are not the
reset vector, but rather where the reset vector jumps to after performing
some very low-level hardware init
Both images, as a very first step, relocate to the highest available
memory location and adjust all the relocation offsets in the image and
jump into the relocated image.
As long as I do not mess with the low-level init code, I can be confident
that an image that 'boots' using the 'go' command will boot from Flash
No, it is not a 'fully relocatable' image, but it is so close as to not
make any real difference to me.
Regards,
Graeme
More information about the U-Boot
mailing list