Message ID | 20171228151003.19500-4-lokeshvutla@ti.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
Series | arm: ti: misc updates and bug fixes | expand |
On Thu, Dec 28, 2017 at 08:40:00PM +0530, Lokesh Vutla wrote: > 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> Applied to u-boot/master, thanks!
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) {
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)