From: Lokesh Vutla Date: Thu, 28 Dec 2017 15:10:00 +0000 (+0530) Subject: tools: omapimage: Fix mismatch of image size in header X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=3a0e70f181ecf21db2486c289055d4269887cab8;p=u-boot.git 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 Debugged-by: Madan Srinivas Signed-off-by: Lokesh Vutla --- diff --git a/tools/omapimage.c b/tools/omapimage.c index e7c46388f4..01e02649e1 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) {