All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] tools: omapimage: Fix size in header
Date: Wed, 8 Feb 2017 18:03:32 +0530	[thread overview]
Message-ID: <20170208123337.27079-2-lokeshvutla@ti.com> (raw)
In-Reply-To: <20170208123337.27079-1-lokeshvutla@ti.com>

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/gpimage.c   | 2 +-
 tools/omapimage.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/gpimage.c b/tools/gpimage.c
index 1adc55c5fc..3ae511d33e 100644
--- a/tools/gpimage.c
+++ b/tools/gpimage.c
@@ -54,7 +54,7 @@ static void gpimage_set_header(void *ptr, struct stat *sbuf, int ifd,
 {
 	struct gp_header *gph = (struct gp_header *)ptr;
 
-	gph_set_header(gph, sbuf->st_size - GPIMAGE_HDR_SIZE, params->addr, 1);
+	gph_set_header(gph, sbuf->st_size, params->addr, 1);
 }
 
 /*
diff --git a/tools/omapimage.c b/tools/omapimage.c
index 7198b3330d..4fe62c5b31 100644
--- a/tools/omapimage.c
+++ b/tools/omapimage.c
@@ -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,
 		       params->addr, 0);
 
 	if (strncmp(params->imagename, "byteswap", 8) == 0) {
-- 
2.11.0

  reply	other threads:[~2017-02-08 12:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 12:33 [U-Boot] [PATCH 0/6] ARM: DRA7: AM57xx: Enable SPL_DM Lokesh Vutla
2017-02-08 12:33 ` Lokesh Vutla [this message]
2017-02-08 13:50   ` [U-Boot] [PATCH 1/6] tools: omapimage: Fix size in header Tom Rini
2017-02-08 12:33 ` [U-Boot] [PATCH 2/6] ARM: OMAP2+: define _image_binary_end to fix SPL_OF_CONTROL Lokesh Vutla
2017-02-08 13:50   ` Tom Rini
2017-02-08 16:33   ` Ladislav Michl
2017-02-09  4:01     ` Lokesh Vutla
2017-02-08 12:33 ` [U-Boot] [PATCH 3/6] ARM: dts: AM57xx: Add generic dts for spl Lokesh Vutla
2017-02-08 13:49   ` Tom Rini
2017-02-09  4:01     ` Lokesh Vutla
2017-02-08 12:33 ` [U-Boot] [PATCH 4/6] ARM: dts: DRA7: " Lokesh Vutla
2017-02-08 12:33 ` [U-Boot] [PATCH 5/6] configs: am57xx_evm: Enable SPL_DM Lokesh Vutla
2017-02-08 12:33 ` [U-Boot] [PATCH 6/6] configs: dra7xx_evm: " Lokesh Vutla
2017-02-08 12:56 ` [U-Boot] [PATCH 0/6] ARM: DRA7: AM57xx: " Tom Rini
2017-02-08 13:07   ` Lokesh Vutla
2017-02-08 13:15     ` Tom Rini
2017-02-08 13:28       ` Lokesh Vutla
2017-02-08 13:30         ` Tom Rini
2017-02-08 18:42     ` Andrew F. Davis
2017-02-08 20:40       ` Tom Rini
2017-02-08 20:46         ` Andrew F. Davis
2017-02-08 20:47           ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170208123337.27079-2-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.