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 <de...@ti.com>
Debugged-by: Madan Srinivas <mad...@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvu...@ti.com>
---
 tools/omapimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
2.15.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to