]> git.ipfire.org Git - u-boot.git/commitdiff
tools: omapimage: Fix size in header
authorLokesh Vutla <lokeshvutla@ti.com>
Wed, 15 Feb 2017 13:12:54 +0000 (18:42 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 15 Mar 2017 00:40:17 +0000 (20:40 -0400)
The size field in GP header that is expected by ROM is size of the
image + size of the header. But omapimage generates a gp header
only with size of the image as size field. Fix it

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
tools/omapimage.c

index 7198b3330d6d6a62a8d3064643bfe1fe191cec33..e31b94ae4f72d2e05c90781d5d9d0e67b9b9a81d 100644 (file)
@@ -143,7 +143,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_FILE_HDR_SIZE,
+       gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE + GPIMAGE_HDR_SIZE,
                       params->addr, 0);
 
        if (strncmp(params->imagename, "byteswap", 8) == 0) {