All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kurz <akurz@blala.de>
To: barebox@lists.infradead.org, Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alexander Kurz <akurz@blala.de>
Subject: [PATCH] scripts: imx-image: fix iMX35 header generation
Date: Fri,  5 Mar 2021 20:04:22 +0000	[thread overview]
Message-ID: <20210305200422.927-1-user@vserver64> (raw)

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


             reply	other threads:[~2021-03-05 20:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 20:04 Alexander Kurz [this message]
2021-03-11  8:53 ` [PATCH] scripts: imx-image: fix iMX35 header generation Sascha Hauer

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=20210305200422.927-1-user@vserver64 \
    --to=akurz@blala.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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.