diff options
author | Pali Rohár <pali@kernel.org> | 2021-07-23 11:14:06 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-07-31 09:49:31 +0200 |
commit | cc3443ffa046b56d83aac8c9cfb6ec9306d9b343 (patch) | |
tree | c1bdfc2ad68dee7f7cc616a5ca4d17153985022e /Makefile | |
parent | 35fd1006aeb1628bd05906b2b6ad5fc314660398 (diff) | |
download | u-boot-cc3443ffa046b56d83aac8c9cfb6ec9306d9b343.tar.gz u-boot-cc3443ffa046b56d83aac8c9cfb6ec9306d9b343.tar.bz2 u-boot-cc3443ffa046b56d83aac8c9cfb6ec9306d9b343.zip |
tools: kwbimage: Use -a parameter (load address) for v1 images
The data part of v1 kwbimage currently contains U-Boot binary prepended
by 64 bytes long Legacy U-Boot image header. This means that the load
address is currently substracted by 64 bytes to ensure that U-Boot's
entry point is at specified execution address.
As mkimage has already separate arguments for load (-a) and execution
(-e) address, there is no need to derive fixed load address from
execution address.
Therefore remove this load address hack from the kwbimage tool and
support generating v1 kwbimage with arbitrary addresses for load and
execution.
Finally, calculate correct load address by caller for mkimage tool in
Makefile. File u-boot-spl.kwb is always a v1 kwbimage and it is the only
v1 kwbimage which U-Boot's build system generates.
Remove also useless overwriting of destaddr for /binary.0 to the value
which is already set on previous lines.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1397,7 +1397,7 @@ MKIMAGEFLAGS_u-boot.kwb = -n $(KWD_CONFIG_FILE) \ -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) MKIMAGEFLAGS_u-boot-spl.kwb = -n $(KWD_CONFIG_FILE) \ - -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \ + -T kwbimage -a $(shell printf "0x%x" $$(($(CONFIG_SYS_TEXT_BASE)-64))) -e $(CONFIG_SYS_TEXT_BASE) \ $(if $(KEYDIR),-k $(KEYDIR)) MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ |