[PATCH] scripts: rk-usb-loader: push header first
Michael Tretter
m.tretter at pengutronix.de
Wed Mar 11 03:13:47 PDT 2026
On Wed, 11 Mar 2026 11:03:47 +0100, Sascha Hauer wrote:
> From: Michael Tretter <m.tretter at 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.
I'm not against adding this to the rk-usb-loader, but maybe add some
comment that this change is based on a wild guess and works by chance. I
still don't know, how the ROM code or the USB protocol works and if it
is really correct or necessary to send the entire header.
Michael
>
> Signed-off-by: Michael Tretter <m.tretter at pengutronix.de>
> Signed-off-by: Sascha Hauer <s.hauer at 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
>
>
More information about the barebox
mailing list