mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>,
	Robin van der Gracht <robin@protonic.nl>
Subject: Re: [PATCH] scripts: rk-usb-loader: push header first
Date: Wed, 11 Mar 2026 11:13:47 +0100	[thread overview]
Message-ID: <abFAW56rE6Pr6xIz@pengutronix.de> (raw)
In-Reply-To: <20260311100347.3761707-1-s.hauer@pengutronix.de>

On Wed, 11 Mar 2026 11:03:47 +0100, Sascha Hauer wrote:
> 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.

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



  reply	other threads:[~2026-03-11 10:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 10:03 Sascha Hauer
2026-03-11 10:13 ` Michael Tretter [this message]
2026-03-12  8:29   ` Robin van der Gracht
2026-03-12 14:02   ` Sascha Hauer
2026-03-13 14:20 ` 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=abFAW56rE6Pr6xIz@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robin@protonic.nl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox