mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] scripts: rk-usb-loader: push header first
@ 2026-03-11 10:03 Sascha Hauer
  2026-03-11 10:13 ` Michael Tretter
  2026-03-13 14:20 ` Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Sascha Hauer @ 2026-03-11 10:03 UTC (permalink / raw)
  To: Barebox List; +Cc: Michael Tretter

From: Michael Tretter <m.tretter@pengutronix.de>

Board that have secure boot enabled need the image header to be able
to verify the signature. Boards with secure boot disabled still work
with this patch as tested on a RK3588 board.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 scripts/rk-usb-loader.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/rk-usb-loader.c b/scripts/rk-usb-loader.c
index c9769d79d3..157bb5ad5c 100644
--- a/scripts/rk-usb-loader.c
+++ b/scripts/rk-usb-loader.c
@@ -256,6 +256,11 @@ static int upload_image(const char *filename)
 		goto err;
 	}
 
+	log_info("Uploading header\n");
+	ret = upload(dev, 0x471, hdr, sizeof(*hdr));
+	if (ret)
+		goto err;
+
 	for (i = 0; i < n_files; i++) {
 		struct newidb_entry *entry = &hdr->entries[i];
 		int foffset, fsize, wIndex;
-- 
2.47.3




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

end of thread, other threads:[~2026-03-13 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-11 10:03 [PATCH] scripts: rk-usb-loader: push header first Sascha Hauer
2026-03-11 10:13 ` Michael Tretter
2026-03-12  8:29   ` Robin van der Gracht
2026-03-12 14:02   ` Sascha Hauer
2026-03-13 14:20 ` Sascha Hauer

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