All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@de.bosch.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] tools: imximage: Load a size that is multiple of 512
Date: Fri, 4 Jan 2013 07:20:16 +0100	[thread overview]
Message-ID: <50E674A0.1070600@de.bosch.com> (raw)
In-Reply-To: <1357237473-1401-1-git-send-email-fabio.estevam@freescale.com>

On 03.01.2013 19:24, Fabio Estevam wrote:
> In order to mx53 ROM to properly load the U-boot image, its header size should 
> be multiple of 512 bytes.
> 
...
> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - Improvec commit log
>  include/image.h  |    3 +++
>  tools/imximage.c |    9 ++++++++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/include/image.h b/include/image.h
> index f54d983..e1e83b4 100644
> --- a/include/image.h
> +++ b/include/image.h
> @@ -179,6 +179,9 @@
>  #define IH_MAGIC	0x27051956	/* Image Magic Number		*/
>  #define IH_NMLEN		32	/* Image Name Length		*/
>  
> +/* Reused from common.h */
> +#define ROUND(a, b)		(((a) + (b) - 1) & ~((b) - 1))
> +
>  /*
>   * Legacy format image header,
>   * all data in network byte order (aka natural aka bigendian).
> diff --git a/tools/imximage.c b/tools/imximage.c
> index 63f88b6..a93d7eb 100644
> --- a/tools/imximage.c
> +++ b/tools/imximage.c
> @@ -515,7 +515,14 @@ static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd,
>  
>  	/* Set the imx header */
>  	(*set_imx_hdr)(imxhdr, dcd_len, params->ep, imxhdr->flash_offset);
> -	*header_size_ptr = sbuf->st_size + imxhdr->flash_offset;
> +
> +	/*
> +	 * ROM bug alert
> +	 * mx53 only loads 512 byte multiples.

Is this i.MX53 specific or is this valid for i.MX6, too?

Best regards

Dirk

  reply	other threads:[~2013-01-04  6:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 18:24 [U-Boot] [PATCH v2] tools: imximage: Load a size that is multiple of 512 Fabio Estevam
2013-01-04  6:20 ` Dirk Behme [this message]
2013-01-04  9:03   ` Stefano Babic
2013-01-05  0:08     ` Fabio Estevam
2013-01-05  0:16       ` Fabio Estevam
2013-01-05 17:10 ` Stefano Babic

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=50E674A0.1070600@de.bosch.com \
    --to=dirk.behme@de.bosch.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.