From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: barebox@lists.infradead.org, fpg@pengutronix.de
Subject: Re: [PATCH v2 09/10] Documentation: efi: describe load options handling
Date: Thu, 15 Oct 2026 13:19:39 +0200 [thread overview]
Message-ID: <7b26bdee-d4c5-401d-9a51-1aeba18f239b@pengutronix.de> (raw)
In-Reply-To: <tqorcgwnas5oc5nfyuswbns7cazd2jghiqcqrk2ra7esagx2ys@4kzonh3562zf>
Hello Marco,
On 10/15/26 1:08 PM, Marco Felsch wrote:
> On 26-10-15 11:18, Ahmad Fatoum wrote:
>> +To pass a ``root=`` option to a UKI, have :ref:`command_devlookup`
>> +generate it for the root partition, the same way ``global.bootm.appendroot``
>> +would, including the option name from ``global.bootm.root_param``:
>> +
>> +.. code-block:: sh
>> +
>> + devlookup -v rootarg -k /dev/disk0.1
>> + global efi.bootargs.root="${rootarg}"
>> + bootm /boot/EFI/Linux/uki.efi
>
> Just a comment on this: devlookup can't be compared to the appendroot
> mechansim, due to the partition enumeration mismatch between barebox and
> linux, e.g. mmc block device partitions start at 0, whereas linux starts
> counting at 1.
> > On embedded devices booting from an MMC device the root=/dev/mmcblk*
> mechanism should be used if the device supports dual boot e.g. from SD
> and from eMMC.
devlookup -k follows the same code paths appendroot would follow, so it
will be 1-indexed /dev/mmblkXpY if that's what appendroot would have
produced.
> Therefore I would have liked to see that the appendroot mechanism would
> be supported for UKIs as well which would stop the requirement of having
> different UKI profiles just to encode the different boot mediums.
I believe barebox can't provide this universally.
- On an x86 system with secure boot, the systemd-stub will ignore any
extra command-line arguments, except for the profile.
- On the ARM systems with device tree, we may be able to cheat by
patching the DT, but I have not checked how Linux or systemd-boot handle
/chosen/bootargs if they are booted via EFI.
Cheers,
Ahmad
>
> However, as said this is just a comment and doesn't block this patch:
>
> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
>
>> Drivers
>> ^^^^^^^
>> diff --git a/Documentation/user/booting-linux.rst b/Documentation/user/booting-linux.rst
>> index 8e6f3bbbe9ce..dc7ac6dc8716 100644
>> --- a/Documentation/user/booting-linux.rst
>> +++ b/Documentation/user/booting-linux.rst
>> @@ -103,6 +103,9 @@ to the bootargs. Variables without a value are skipped:
>>
>> Kernel command line: ignore_loglevel console=ttyO0,115200 earlyprintk
>>
>> +When booting an EFI-stubbed kernel as EFI application, the
>> +:ref:`EFI load options <efi_load_options>` precede the Linux bootargs.
>> +
>> .. _bootargs_concat_order:
>>
>> Concatenation order
>> @@ -170,7 +173,8 @@ This takes the kernel from ``/mnt/mmc1/zImage`` (which could be an
>> boot entries should always add Kernel command line parameters to variables with
>> ``.dyn`` in it. These will be cleared before booting different boot entries.
>> This is done so that following boot entries do not leak command line
>> -parameters from the previous boot entries.
>> +parameters from the previous boot entries. The same applies to the
>> +:ref:`EFI load options <efi_load_options>` in ``global.efi.bootargs.dyn.*``.
>>
>> This entry can be booted with ``boot mmc``. It can also be made the default by
>> setting the :ref:`global.boot.default <magicvar_global_boot_default>` variable
>> --
>> 2.47.3
>>
>>
--
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-15 12:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 9:18 [PATCH v2 00/10] efi: payload: allow passing arguments to UKIs Ahmad Fatoum
2026-10-15 9:18 ` [PATCH v2 01/10] commands: devlookup: honour global.bootm.root_param for -k Ahmad Fatoum
2026-10-15 9:46 ` Marco Felsch
2026-10-15 9:52 ` Ahmad Fatoum
2026-10-15 9:18 ` [PATCH v2 02/10] common: bootargs: don't leave linux_bootargs dangling after free Ahmad Fatoum
2026-10-15 9:49 ` Marco Felsch
2026-10-15 9:18 ` [PATCH v2 03/10] common: bootargs: drop legacy bootargs fallback with FLEXIBLE_BOOTARGS Ahmad Fatoum
2026-10-15 9:52 ` Marco Felsch
2026-10-15 9:18 ` [PATCH v2 04/10] globalvar: skip empty variables in globalvar_get_match() Ahmad Fatoum
2026-10-15 9:54 ` Marco Felsch
2026-10-15 9:18 ` [PATCH v2 05/10] efi: payload: honour bootm dryrun in the EFI application handler Ahmad Fatoum
2026-10-15 9:18 ` [PATCH v2 06/10] efi: payload: always shutdown barebox when booting Ahmad Fatoum
2026-10-15 10:03 ` Marco Felsch
2026-10-15 10:16 ` Ahmad Fatoum
2026-10-15 9:18 ` [PATCH v2 07/10] efi: payload: pass shell arguments as load options to executed images Ahmad Fatoum
2026-10-15 10:14 ` Marco Felsch
2026-10-15 10:25 ` Ahmad Fatoum
2026-10-15 10:49 ` Marco Felsch
2026-10-15 9:18 ` [PATCH v2 08/10] efi: add global.efi.bootargs for bootm'd EFI applications Ahmad Fatoum
2026-10-15 10:34 ` Marco Felsch
2026-10-15 10:38 ` Ahmad Fatoum
2026-10-15 9:18 ` [PATCH v2 09/10] Documentation: efi: describe load options handling Ahmad Fatoum
2026-10-15 11:08 ` Marco Felsch
2026-10-15 11:19 ` Ahmad Fatoum [this message]
2026-10-15 12:13 ` Marco Felsch
2026-10-15 12:47 ` Ahmad Fatoum
2026-10-15 9:18 ` [PATCH v2 10/10] test: py: efiloader: check global.efi.bootargs reaches the kernel Ahmad Fatoum
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=7b26bdee-d4c5-401d-9a51-1aeba18f239b@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=fpg@pengutronix.de \
--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