* [PATCH] scripts: imx: imx-image: Fix image size for HABv3 images
@ 2016-04-06 8:19 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2016-04-06 8:19 UTC (permalink / raw)
To: Barebox List
When the image contains CSF data we must add CSF_LEN to the image
size pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
scripts/imx/imx-image.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index 20815bf..16f086a 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -210,10 +210,8 @@ static int add_header_v1(struct config_data *data, void *buf)
uint32_t loadaddr = data->image_load_addr;
uint32_t imagesize = data->load_size;
- if (add_barebox_header) {
+ if (add_barebox_header)
memcpy(buf, bb_header, sizeof(bb_header));
- *psize = imagesize;
- }
buf += offset;
hdr = buf;
@@ -246,6 +244,9 @@ static int add_header_v1(struct config_data *data, void *buf)
imagesize += CSF_LEN;
}
+ if (add_barebox_header)
+ *psize = imagesize;
+
*(uint32_t *)buf = imagesize;
return 0;
--
2.7.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-06 8:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 8:19 [PATCH] scripts: imx: imx-image: Fix image size for HABv3 images Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox