[PATCH 0/3] Add initrd support to bootm EFI payloads
Adriano Córdova
adrianox at gmail.com
Wed Mar 19 13:13:07 CET 2025
El mié, 19 mar 2025 a las 5:48, Ilias Apalodimas (<
ilias.apalodimas at linaro.org>) escribió:
> Hi Adriano,
>
> On Tue, 18 Mar 2025 at 15:23, Adriano Cordova <adrianox at gmail.com> wrote:
> >
> > Next boot stages can acces an initrd via a handle with a specific device
> > path and an EFI_LOAD_FILE2_PROTOCOL installed on it. In U-Boot, this
> functionality
> > is currently only implemented when booting with the EFI boot manager.
> This series
> > implements this functionality also for the bootm command when the os is
> of EFI type,
> > e.g. when booting FIT images with an EFI kernel.
>
> I'll have a look at the patches shortly. I have a question about the
> entire series though.
>
> The initrd was plugged into the efi boot manager because it's easy to
> configure entries of
> kernel-initrd-dtb. The initrd can also be loaded by passing a kernel
> command line parameter.
>
> That parameter can either be initrd=<file> with the limitation that
> the initrd needs to be on the same filesystem as the kernel image.
> On newer kernels you can also pass initrd=<device path>. I am not sure
> what's the best option when loading the initrd for a FIT image.
>
> Thanks
> /Ilias
>
Currently the initrd in FIT images with EFI os is completely ignored. It
can't be passed as initrd=<file>
because it is not a file, it is just memory mapped, and I am not sure if it
can be passed as initrd=<device path>
as I am not sure if the kernel expects a file system device path or if a
memory device path would be picked
up. In this series the functionality is added following what bootmgr
already does, which also works for passing
the initrd to a boot stage that understands EFI but not command line, but
investigating the other way is also an option.
Thanks,
Adriano
>
>
> >
> > Adriano Cordova (3):
> > efi_loader: efi_load_initrd: provide a memory mapped initrd
> > efi_loader: binary_run: register an initrd
> > bootm: add support for initrd in do_bootm_efi
> >
> > boot/bootm_os.c | 4 +-
> > cmd/bootefi.c | 2 +-
> > include/efi_loader.h | 4 +-
> > lib/efi_loader/efi_bootbin.c | 20 +++++++--
> > lib/efi_loader/efi_bootmgr.c | 2 +-
> > lib/efi_loader/efi_load_initrd.c | 71 +++++++++++++++++++++++++++-----
> > 6 files changed, 84 insertions(+), 19 deletions(-)
> >
> > --
> > 2.48.1
> >
>
More information about the U-Boot
mailing list