aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLokesh Vutla2017-12-28 20:40:00 +0530
committerTom Rini2018-01-19 15:49:24 -0500
commit3a0e70f181ecf21db2486c289055d4269887cab8 (patch)
tree1bdbf48e95072b68e882a64d0cec8054795bdffe /tools
parent4849d9540751cdf66d5169e2bcc4ee0ea9a6f647 (diff)
tools: omapimage: Fix mismatch of image size in header
The size field in GP header that is expected by ROM is size of the image + size of the header. But omapimage tool is updating size as image size + 2 * header size. Remove this extra header size bytes. Reported-by: Denys Dmytriyenko <denys@ti.com> Debugged-by: Madan Srinivas <madans@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/omapimage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/omapimage.c b/tools/omapimage.c
index e7c46388f4f..01e02649e1e 100644
--- a/tools/omapimage.c
+++ b/tools/omapimage.c
@@ -145,7 +145,7 @@ static void omapimage_set_header(void *ptr, struct stat *sbuf, int ifd,
toc++;
memset(toc, 0xff, sizeof(*toc));
- gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE + GPIMAGE_HDR_SIZE,
+ gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE,
params->addr, 0);
if (strncmp(params->imagename, "byteswap", 8) == 0) {