mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 00/10] efi: payload: allow passing arguments to UKIs
@ 2026-10-15  9:18 Ahmad Fatoum
  2026-10-15  9:18 ` [PATCH v2 01/10] commands: devlookup: honour global.bootm.root_param for -k Ahmad Fatoum
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Ahmad Fatoum @ 2026-10-15  9:18 UTC (permalink / raw)
  To: barebox; +Cc: fpg, Ahmad Fatoum

UKIs look like a kernel image, but barebox doesn't detect them as one,
which has barebox treat them as it would treat e.g. an EFI shell: An
executable it can start, but can't pass arguments to and that it assumes
will return to it when it exits.

This doesn't hold of course as a UKI should never return execution to
barebox.

Additionally, to select a UKI profile, barebox will need to add an @N
(where N identifies the profile by number) as the very first load
option.

This is also enabled by this series.

v1 -> v2:
  - New patch "commands: devlookup: honour global.bootm.root_param for -k",
    so scripts can build the root option that bootm would append, e.g. for
    UKIs (Fabian)
  - "common: bootargs: don't leave linux_bootargs dangling after free":
    move from 9/9 to the front of the series, as skipping empty variables
    in globalvar_get_match() made the double free reachable after any boot
    entry
  - "efi: payload: honour bootm dryrun in the EFI application handler":
    move before "always shutdown barebox when booting", so bootm -d no
    longer ends the barebox session at any point in the series; drop the
    commit message sentence that only made sense in the old order
  - "Documentation: efi: describe load options handling": turn the UKI
    note into a paragraph explaining that the Linux bootargs, including
    bootm.appendroot's root=, aren't passed, how systemd-stub treats load
    options with and without Secure Boot, and how to pass root= via
    devlookup -k and global.efi.bootargs.root (Fabian)
  - Rebase onto current next
  - Link to v1: https://lore.barebox.org/barebox/20260826121956.2936414-1-a.fatoum@pengutronix.de/


Ahmad Fatoum (10):
  commands: devlookup: honour global.bootm.root_param for -k
  common: bootargs: don't leave linux_bootargs dangling after free
  common: bootargs: drop legacy bootargs fallback with FLEXIBLE_BOOTARGS
  globalvar: skip empty variables in globalvar_get_match()
  efi: payload: honour bootm dryrun in the EFI application handler
  efi: payload: always shutdown barebox when booting
  efi: payload: pass shell arguments as load options to executed images
  efi: add global.efi.bootargs for bootm'd EFI applications
  Documentation: efi: describe load options handling
  test: py: efiloader: check global.efi.bootargs reaches the kernel

 Documentation/boards/efi.rst                  | 64 +++++++++++++++-
 .../migration-guides/migration-master.rst     | 16 ++++
 Documentation/user/booting-linux.rst          | 12 ++-
 commands/devlookup.c                          |  5 +-
 common/block.c                                |  5 +-
 common/boot.c                                 |  1 +
 common/bootargs.c                             | 15 ++--
 common/globalvar.c                            |  6 +-
 efi/Makefile                                  |  2 +-
 efi/bootargs.c                                | 65 ++++++++++++++++
 efi/loader/bootm.c                            | 27 ++++---
 efi/payload/bootm.c                           | 23 +++++-
 efi/payload/image.c                           | 76 ++++++++++++++-----
 efi/payload/image.h                           |  3 +-
 include/block.h                               |  6 +-
 include/efi/bootargs.h                        |  9 +++
 test/py/test_linux_efiloader.py               |  6 ++
 test/py/test_shell.py                         | 26 +++++++
 18 files changed, 315 insertions(+), 52 deletions(-)
 create mode 100644 efi/bootargs.c
 create mode 100644 include/efi/bootargs.h

-- 
2.47.3




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

end of thread, other threads:[~2026-10-15 12:47 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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