From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/4] tools: kwbimage: don't adjust for image_header for Armada MSYS
Date: Thu, 11 Apr 2019 22:22:52 +1200 [thread overview]
Message-ID: <20190411102253.14202-4-judge.packham@gmail.com> (raw)
In-Reply-To: <20190411102253.14202-1-judge.packham@gmail.com>
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>
---
Changes in v3:
- use the filename binary.0 to determine if the destaddr needs to match
execaddr.
Changes in v2:
- new, split out from Add DB-XC3-24G4XG board with a better explanation
tools/kwbimage.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index a88a3830c0c8..dffaf9043a04 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) {
--
2.21.0
next prev parent reply other threads:[~2019-04-11 10:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-11 10:22 [U-Boot] [PATCH v3 0/4] Marvell DB-XC3-24G4XG board support Chris Packham
2019-04-11 10:22 ` [U-Boot] [PATCH v3 1/4] arm: mvebu: Add Marvell's integrated CPUs Chris Packham
2019-04-11 10:43 ` Stefan Roese
2019-04-11 12:14 ` Stefan Roese
2019-04-11 10:22 ` [U-Boot] [PATCH v3 2/4] arm: mvebu: NAND clock support for MSYS devices Chris Packham
2019-04-11 10:43 ` Stefan Roese
2019-04-11 12:16 ` Stefan Roese
2019-04-11 10:22 ` Chris Packham [this message]
2019-04-11 10:43 ` [U-Boot] [PATCH v3 3/4] tools: kwbimage: don't adjust for image_header for Armada MSYS Stefan Roese
2019-04-11 11:58 ` Stefan Roese
2019-04-11 10:22 ` [U-Boot] [PATCH v3 4/4] arm: mvebu: Add DB-XC3-24G4XG board Chris Packham
2019-04-11 10:44 ` Stefan Roese
2019-04-11 12:16 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190411102253.14202-4-judge.packham@gmail.com \
--to=judge.packham@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox