Skip to contentSkip to conversation

scripts: imx-image: fix iMX35 header generation

PATCH Applied Alexander Kurz 2 participants 2 messages Mar 5, 2021 – Mar 11, 2021 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: imx-image: fix iMX35 header generation

From: Alexander Kurz <[email protected]>

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

---
 scripts/imx/imx-image.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/imx/imx-image.c +4 -1
index f5e89d07a..6cbee1d9b 100644
@@ -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);
 
Signature · 7 lines
2.20.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer Applied
#1 lore raw
Quoted 9 lines · Alexander Kurz

From: Alexander Kurz <[email protected]>

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

---
 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

Quoted 22 lines
scripts/imx/imx-image.c +4 -1
index f5e89d07a..6cbee1d9b 100644
@@ -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);
 
Signature · 1 line
2.20.1
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox