* [U-Boot] [PATCH v3] tools: kwbimage: don't adjust for image_header for Armada MSYS
@ 2019-02-19 7:28 Chris Packham
2019-02-19 8:32 ` Stefan Roese
0 siblings, 1 reply; 2+ messages in thread
From: Chris Packham @ 2019-02-19 7:28 UTC (permalink / raw)
To: u-boot
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>
---
I'm just sending a v3 of this patch since the rest of the DB-XC3-24G4XG
series is unchanged.
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.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v3] tools: kwbimage: don't adjust for image_header for Armada MSYS
2019-02-19 7:28 [U-Boot] [PATCH v3] tools: kwbimage: don't adjust for image_header for Armada MSYS Chris Packham
@ 2019-02-19 8:32 ` Stefan Roese
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2019-02-19 8:32 UTC (permalink / raw)
To: u-boot
On 19.02.19 08:28, Chris Packham wrote:
> 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>
> ---
> I'm just sending a v3 of this patch since the rest of the DB-XC3-24G4XG
> series is unchanged.
>
> 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
Thanks. Looks good, so:
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-19 8:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19 7:28 [U-Boot] [PATCH v3] tools: kwbimage: don't adjust for image_header for Armada MSYS Chris Packham
2019-02-19 8:32 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox