aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Packham2019-02-19 20:28:44 +1300
committerStefan Roese2019-04-12 07:04:18 +0200
commit8cbafd14484c7065bc75b686933e887dc1e21ff8 (patch)
treede8bdea9df229954e49fddf788da439915c195c6 /tools
parent7ceefcbaca0a5ee5bbf92e97423584d186e052fa (diff)
tools: kwbimage: don't adjust for image_header for Armada MSYS
For the time being the Armada MSYS SoCs need to use the bin_hdr from the Marvell U-Boot. Because of this the binary.0 does not contain the image header that a proper u-boot SPL would so the adjustment introduced by commit 94084eea3bd3 ("tools: kwbimage: Fix dest addr") does not apply. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
-rw-r--r--tools/kwbimage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index a88a3830c0c..dffaf9043a0 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -1273,6 +1273,13 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
e = image_find_option(IMAGE_CFG_DEBUG);
if (e)
main_hdr->flags = e->debug ? 0x1 : 0;
+ e = image_find_option(IMAGE_CFG_BINARY);
+ if (e) {
+ char *s = strrchr(e->binary.file, '/');
+
+ if (strcmp(s, "/binary.0") == 0)
+ main_hdr->destaddr = cpu_to_le32(params->addr);
+ }
#if defined(CONFIG_KWB_SECURE)
if (image_get_csk_index() >= 0) {