public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] imximage: Fix the bootdata.size calculation
@ 2014-10-22  6:39 Ye.Li
  2014-10-22  7:22 ` Stefano Babic
  0 siblings, 1 reply; 6+ messages in thread
From: Ye.Li @ 2014-10-22  6:39 UTC (permalink / raw)
  To: u-boot

The bootdata.size should contain the IVT offset part, but the calculation
in imximage tool does not have. This will cause some data at
the end of image not be loaded into memory.

Signed-off-by: Ye.Li <B37916@freescale.com>
---
 tools/imximage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/imximage.c b/tools/imximage.c
index faba238..526b7d4 100644
--- a/tools/imximage.c
+++ b/tools/imximage.c
@@ -587,7 +587,7 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
 	 *
 	 * The remaining fraction of a block bytes would not be loaded!
 	 */
-	*header_size_ptr = ROUND(sbuf->st_size, 4096);
+	*header_size_ptr = ROUND((sbuf->st_size + imximage_ivt_offset), 4096);
 
 	if (csf_ptr && imximage_csf_size) {
 		*csf_ptr = params->ep - imximage_init_loadsize +
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-22 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-22  6:39 [U-Boot] [PATCH] imximage: Fix the bootdata.size calculation Ye.Li
2014-10-22  7:22 ` Stefano Babic
2014-10-22  7:38   ` Li Ye-B37916
2014-10-22  8:14     ` Stefano Babic
2014-10-22  8:32       ` Li Ye-B37916
2014-10-22 16:52     ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox