mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] scripts: imx-image: fix iMX35 header generation
@ 2021-03-05 20:04 Alexander Kurz
  2021-03-11  8:53 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kurz @ 2021-03-05 20:04 UTC (permalink / raw)
  To: barebox, Sascha Hauer; +Cc: Alexander Kurz

From: Alexander Kurz <akurz@blala.de>

Two header copies exist in the iMX35 image.
When writing the barebox_header, also write it to the second copy.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 scripts/imx/imx-image.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index f5e89d07a..6cbee1d9b 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -984,8 +984,11 @@ int main(int argc, char *argv[])
 		xwrite(outfd, buf, header_len);
 	}
 
-	if (add_barebox_header)
+	if (add_barebox_header) {
 		pwrite(outfd, bb_header, sizeof_bb_header, 0);
+		if (data.cpu_type == IMX_CPU_IMX35)
+			pwrite(outfd, bb_header, sizeof_bb_header, header_len);
+	}
 
 	xwrite(outfd, infile, insize);
 
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

* Re: [PATCH] scripts: imx-image: fix iMX35 header generation
  2021-03-05 20:04 [PATCH] scripts: imx-image: fix iMX35 header generation Alexander Kurz
@ 2021-03-11  8:53 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-03-11  8:53 UTC (permalink / raw)
  To: Alexander Kurz; +Cc: barebox

On Fri, Mar 05, 2021 at 08:04:22PM +0000, Alexander Kurz wrote:
> From: Alexander Kurz <akurz@blala.de>
> 
> Two header copies exist in the iMX35 image.
> When writing the barebox_header, also write it to the second copy.
> 
> Signed-off-by: Alexander Kurz <akurz@blala.de>
> ---
>  scripts/imx/imx-image.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks

It was likely me who broke this, Sorry for that.

Sascha

> diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
> index f5e89d07a..6cbee1d9b 100644
> --- a/scripts/imx/imx-image.c
> +++ b/scripts/imx/imx-image.c
> @@ -984,8 +984,11 @@ int main(int argc, char *argv[])
>  		xwrite(outfd, buf, header_len);
>  	}
>  
> -	if (add_barebox_header)
> +	if (add_barebox_header) {
>  		pwrite(outfd, bb_header, sizeof_bb_header, 0);
> +		if (data.cpu_type == IMX_CPU_IMX35)
> +			pwrite(outfd, bb_header, sizeof_bb_header, header_len);
> +	}
>  
>  	xwrite(outfd, infile, insize);
>  
> -- 
> 2.20.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


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

end of thread, other threads:[~2021-03-11  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 20:04 [PATCH] scripts: imx-image: fix iMX35 header generation Alexander Kurz
2021-03-11  8:53 ` Sascha Hauer

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