All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Change logic of EFI LoadFile2 protocol for initrd loading
@ 2020-12-28 12:24 Ilias Apalodimas
  2020-12-28 12:24 ` [PATCH 1/6] efi_loader: remove unconditional initialization of file2 protocol for initrd Ilias Apalodimas
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Ilias Apalodimas @ 2020-12-28 12:24 UTC (permalink / raw)
  To: u-boot

Right now in U-Boot, we unconditionally register the EFI LoadFile2 protocol
and the initrd file path is a U-boot .config option.

This imposes a number of limitations. Using multiple initrd's implies you'd
have to concatenate them into one big file. Alternatively you'd have to
recompile U-Boot or overwrite your initrd with a newer one in order to use
it.  Since linux efi-stub only falls back to the cmdline interpreted initrd
if the protocol is not registered, this also creates a problem for EFI
installers, since they won't be able to load their own initrd and start the
installation if the option is enabled.

This patchset is trying to address all of the above, by changing the logic
of the protocol registration and initrd discovery.
It introduces a new EFI variable 'Initrd####', which we try to match on the
BootCurrent value the bootmanager sets up.
For example Boot0010 will search for Initrd0010, which should include the
full initrd path i.e 'mmc 0:0 initrd'. If the file is present, the protocol
will be registered, so the efi-stub can use it.

This opens up another path using U-Boot and defines a new boot flow.
A user will be able to control the kernel/initrd pairs without explicit
cmdline args or GRUB, just by setting the correct 'Initrd####' variable.

Ilias Apalodimas (6):
  efi_loader: remove unconditional initialization of file2 protocol for
    initrd
  efi_loader: Introduce helper functions for EFI
  efi_loader: Replace config option with EFI variable for initrd loading
  efi_loader: Remove unused headers from efi_load_initrd.c
  efi_selftest: Modify self-tests for initrd loading
  efi_loader: bootmgr: use get_var from efi_helper file

 include/efi_helper.h                        |  29 +++
 lib/efi_loader/Kconfig                      |  12 +-
 lib/efi_loader/Makefile                     |   4 +-
 lib/efi_loader/efi_bootmgr.c                |  39 +---
 lib/efi_loader/efi_helper.c                 | 189 ++++++++++++++++++++
 lib/efi_loader/efi_load_initrd.c            |  88 +++------
 lib/efi_loader/efi_setup.c                  |   5 -
 lib/efi_selftest/efi_selftest_load_initrd.c |  90 +++++++++-
 8 files changed, 341 insertions(+), 115 deletions(-)
 create mode 100644 include/efi_helper.h
 create mode 100644 lib/efi_loader/efi_helper.c

-- 
2.30.0.rc2

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

end of thread, other threads:[~2020-12-28 22:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 12:24 [PATCH 0/6] Change logic of EFI LoadFile2 protocol for initrd loading Ilias Apalodimas
2020-12-28 12:24 ` [PATCH 1/6] efi_loader: remove unconditional initialization of file2 protocol for initrd Ilias Apalodimas
2020-12-28 12:24 ` [PATCH 2/6] efi_loader: Introduce helper functions for EFI Ilias Apalodimas
2020-12-28 14:49   ` Heinrich Schuchardt
2020-12-28 22:06     ` Ilias Apalodimas
2020-12-28 12:24 ` [PATCH 3/6] efi_loader: Replace config option with EFI variable for initrd loading Ilias Apalodimas
2020-12-28 13:10   ` Ilias Apalodimas
2020-12-28 14:55   ` Heinrich Schuchardt
2020-12-28 22:03     ` Ilias Apalodimas
2020-12-28 12:24 ` [PATCH 4/6] efi_loader: Remove unused headers from efi_load_initrd.c Ilias Apalodimas
2020-12-28 15:06   ` Heinrich Schuchardt
2020-12-28 15:08   ` [PATCH] " Heinrich Schuchardt
2020-12-28 12:24 ` [PATCH 5/6] efi_selftest: Modify self-tests for initrd loading Ilias Apalodimas
2020-12-28 12:24 ` [PATCH 6/6] efi_loader: bootmgr: use get_var from efi_helper file Ilias Apalodimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.