[PATCH] scripts: imx-image: fix iMX35 header generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alexander Kurz <akurz@xxxxxxxx>

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@xxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux