aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlias Apalodimas2021-03-17 21:55:00 +0200
committerHeinrich Schuchardt2021-03-25 20:14:26 +0100
commit53f6a5aa86267a59ea9d45c89405e42002410e37 (patch)
tree3fa57d6625a5e8ef4d3944b7acaaf78376752dce /include
parent37c3ca5c0b1a449356279efdcaca346b3eae84fd (diff)
efi_loader: Replace config option for initrd loading
Up to now we install EFI_LOAD_FILE2_PROTOCOL to load an initrd unconditionally. Although we correctly return various EFI exit codes depending on the file status (i.e EFI_NO_MEDIA, EFI_NOT_FOUND etc), the kernel loader, only falls back to the cmdline interpreted initrd if the protocol is not installed. This creates a problem for EFI installers, since they won't be able to load their own initrd and continue the installation. It also makes the feature hard to use, since we can either have a single initrd or we have to recompile u-boot if the filename changes. So let's introduce a different logic that will decouple the initrd path from the config option we currently have. When defining a UEFI BootXXXX we can use the filepathlist and store a file path pointing to our initrd. Specifically the EFI spec describes: "The first element of the array is a device path that describes the device and location of the Image for this load option. Other device paths may optionally exist in the FilePathList, but their usage is OSV specific" When the EFI application is launched through the bootmgr, we'll try to interpret the extra device path. If that points to a file that exists on our disk, we'll now install the load_file2 and the efi-stub will be able to 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. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include')
-rw-r--r--include/efi_loader.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 9c227005d13..903bf60bc0a 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -437,6 +437,7 @@ efi_status_t efi_net_register(void);
/* Called by bootefi to make the watchdog available */
efi_status_t efi_watchdog_register(void);
efi_status_t efi_initrd_register(void);
+void efi_initrd_deregister(void);
/* Called by bootefi to make SMBIOS tables available */
/**
* efi_acpi_register() - write out ACPI tables