diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-07 19:06:30 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-07 12:38:01 +0100 |
commit | a81ec0225f5a100341c20b4329c8b1d81ab025c4 (patch) | |
tree | 0d38efb6ba77f80dc0759513d33ab73f7f9bc868 /pbl | |
parent | b08e08506b9752d3768e42d075283f91d2ed5180 (diff) | |
download | barebox-a81ec0225f5a100341c20b4329c8b1d81ab025c4.tar.gz barebox-a81ec0225f5a100341c20b4329c8b1d81ab025c4.tar.xz |
ARM: Add relocatable binary support
For making the same binary executable on different SoCs which have
different DRAM addresses we have to be independent of the compile
time link address.
This patch adds relocatable binary support for the ARM architecture.
With this two new functions are available. relocate_to_current_adr
will fixup the binary to continue executing from the current position.
relocate_to_adr will copy the binary to a given address, fixup the
binary and continue executing from there.
For the PBL and the real image relocatable support can be enabled
independently. This is done to (hopefully) better cope with setups
where the PBL runs from SRAM or ROM and the real binary does not.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'pbl')
-rw-r--r-- | pbl/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pbl/Kconfig b/pbl/Kconfig index 39752cc6f9..5c7f62eefe 100644 --- a/pbl/Kconfig +++ b/pbl/Kconfig @@ -18,6 +18,16 @@ config PBL_FORCE_PIGGYDATA_COPY if PBL_IMAGE +config PBL_RELOCATABLE + depends on ARM + bool "relocatable pbl image" + help + Generate a pbl binary which can relocate itself during startup to run + on different addresses. This is useful if your memory layout is not + known during compile time. + This option only inflluences the PBL image. See RELOCATABLE to also make + the real image relocatable. + config IMAGE_COMPRESSION bool depends on HAVE_IMAGE_COMPRESSION |