public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imximage: Fix the bootdata.size calculation
Date: Wed, 22 Oct 2014 09:22:17 +0200	[thread overview]
Message-ID: <54475B29.3090902@denx.de> (raw)
In-Reply-To: <1413959969-9688-1-git-send-email-B37916@freescale.com>

Hi Ye,

On 22/10/2014 08:39, Ye.Li wrote:
> 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);
>  

Can you help me pointing which part of the manual(s) is describing this
? Checking into i.MX6Q, length is defined as size of the program image,
that means without IVT. I have not yet checked into MX53.

Which is the use case you find the error ? Do you had a size of exactly
a multiple of 4K and have you discover that the whole image was not loaded ?

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2014-10-22  7:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  6:39 [U-Boot] [PATCH] imximage: Fix the bootdata.size calculation Ye.Li
2014-10-22  7:22 ` Stefano Babic [this message]
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

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=54475B29.3090902@denx.de \
    --to=sbabic@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox