From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Johannes Schneider <johannes.schneider@leica-geosystems.com>,
barebox@lists.infradead.org
Cc: Marco Felsch <m.felsch@pengutronix.de>
Subject: Re: [PATCH v1 07/14] efi: loader: bootm: pass the kernel command line to UKIs
Date: Mon, 5 Oct 2026 19:18:07 +0200 [thread overview]
Message-ID: <abcb8537-a3a4-42c6-a6b6-d8b07ea26cb6@pengutronix.de> (raw)
In-Reply-To: <20261004011958.3255011-8-johannes.schneider@leica-geosystems.com>
Hi,
On 10/4/26 03:19, Johannes Schneider wrote:
> Only Linux EFI images get the barebox kernel command line as load
> options. A UKI is a plain EFI application, so root=, bootchooser.active=
> and the other bootargs never reach its kernel. Pass them to every image
> with a .linux section too: systemd-stub uses the load options as kernel
> command line unless UEFI Secure Boot is enabled, which barebox never
> reports.
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
> ---
> efi/loader/bootm.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/efi/loader/bootm.c b/efi/loader/bootm.c
> index 18539565fd..8a83865458 100644
> --- a/efi/loader/bootm.c
> +++ b/efi/loader/bootm.c
> @@ -252,7 +252,7 @@ static int efi_loader_bootm(struct image_data *data)
> int ret = 0;
> void *fdt;
> int flags = 0;
> - size_t size;
> + size_t size, section_size;
>
> memory_bank_first_find_space(&start, &end);
>
> @@ -266,7 +266,10 @@ static int efi_loader_bootm(struct image_data *data)
> return -EINVAL;
> }
>
> - if (filetype_is_linux_efi_image(data->kernel_type)) {
> + /* systemd-stub passes the load options on as kernel command line */
> + if (filetype_is_linux_efi_image(data->kernel_type) ||
> + efi_pe_find_section((void *)os_res->start, size, ".linux",
I think this will complicate matters, because afaik systemd-stub expects the
selector for the profile (e.g. @1) to be the very first option and by passing
all options as-is, we complicate being able to choose the selector.
I am also unsure what the behavior is when there is both a .cmdline section
and extra load options. Did you check?
Here's what I had in mind (I will send a v2 next week or so):
https://lore.barebox.org/barebox/20260826121956.2936414-1-a.fatoum@pengutronix.de/
Cheers,
Ahmad
> + §ion_size)) {
> const char *options;
>
> options = linux_bootargs_get();
--
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 |
next prev parent reply other threads:[~2026-10-05 17:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 1:19 [PATCH v1 00/14] efi: loader: boot Authenticode-signed UKIs Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 01/14] mfd: hgs-efi: do not claim the name of the EFI loader's device Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 02/14] efi: loader: file: report EFI_UNSUPPORTED for volumes without a filesystem Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 03/14] efi: loader: bootm: free the devicetree after installing it Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 04/14] efi: loader: provide EFI_DT_FIXUP_PROTOCOL Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 05/14] efi: loader: pe: add helpers for the image size and a named section Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 06/14] efi: loader: bootm: load only the PE image, not the whole file Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 07/14] efi: loader: bootm: pass the kernel command line to UKIs Johannes Schneider
2026-10-05 17:18 ` Ahmad Fatoum [this message]
2026-10-04 1:19 ` [PATCH v1 08/14] efi: loader: verify Authenticode signatures against built-in keys Johannes Schneider
2026-10-05 5:33 ` Ahmad Fatoum
2026-10-05 5:45 ` SCHNEIDER Johannes
2026-10-09 0:07 ` SCHNEIDER Johannes
2026-10-04 1:19 ` [PATCH v1 09/14] efi: loader: authenticode: add a fuzz test Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 10/14] efi: loader: authenticate LoadImage() images when signing is forced Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 11/14] efi: loader: file: expose no filesystem when signed images are forced Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 12/14] bootm: efi: boot signed EFI images " Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 13/14] efi: loader: bootm: install a devicetree for matching UKI devicetrees Johannes Schneider
2026-10-04 1:19 ` [PATCH v1 14/14] efi: loader: bootm: apply overlays carried by a UKI Johannes Schneider
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=abcb8537-a3a4-42c6-a6b6-d8b07ea26cb6@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=johannes.schneider@leica-geosystems.com \
--cc=m.felsch@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