]> git.sur5r.net Git - u-boot/commitdiff
tools: omapimage: Fix mismatch of image size in header
authorLokesh Vutla <lokeshvutla@ti.com>
Thu, 28 Dec 2017 15:10:00 +0000 (20:40 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 19 Jan 2018 20:49:24 +0000 (15:49 -0500)
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>
tools/omapimage.c

index e7c46388f4f375dbb2ecc78a6184365ee3860979..01e02649e1e20fdf5db00690b9fae7eebca82ac3 100644 (file)
@@ -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) {