[U-Boot] [PATCH v3 1/5] tools: omapimage: Fix size in header

Tom Rini trini at konsulko.com
Wed Feb 15 13:07:36 UTC 2017


On Wed, Feb 15, 2017 at 06:02:37PM +0530, Lokesh Vutla wrote:
> Hi Tom,
> 
> On Friday 10 February 2017 08:37 PM, 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 generates a gp header
> > only with size of the image as size field. Fix it
> 
> Unfortunately this is not ture for Keystone2. K2 rom still expects only
> the image size but the $subject patch effects K2 as well. Can you please
> take the below patch instead?
> Let me know if you want me to resend the series.

Please just re-send the v4 of 1/5 so patchwork will pick it up
correctly, thanks!

> 
> From 3cb059cca5af5cb7538a411b2386ee4c5f753f2e Mon Sep 17 00:00:00 2001
> From: Lokesh Vutla <lokeshvutla at ti.com>
> Date: Wed, 15 Feb 2017 16:06:00 +0530
> Subject: [PATCH v4] tools: omapimage: Fix size in header
> 
> 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 at ti.com>
> ---
>  tools/omapimage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/omapimage.c b/tools/omapimage.c
> index 7198b3330d..e31b94ae4f 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 + GPIMAGE_HDR_SIZE,
>  		       params->addr, 0);
> 
>  	if (strncmp(params->imagename, "byteswap", 8) == 0) {
> -- 
> 2.11.0

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170215/98940c5b/attachment.sig>


More information about the U-Boot mailing list