u-boot/lib/efi_loader
Ilias Apalodimas 47d2b3b9c9 efi_loader: Remove unconditional installation of file2 protocol for initrd
Up to now we install the 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 start the installation.

A following patch introduces a different logic where we search for an
initrd path defined in an EFI variable named 'Initrd####'.
If the bootmgr is used to launch the EFI payload, we'll will try to match
the BootCurrent value and find the corresponding initrd
(i.e Boot0000 -> Initrd0000 etc). If the file is found, we'll install
the required protocol which the kernel's efi-stub can use and load our
initrd.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-12-31 14:33:22 +01:00
..
.gitignore efi_loader: git ignore helloworld_efi.S 2020-01-07 18:08:20 +01:00
efi_acpi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
efi_bootmgr.c efi_loader: avoid invalid free 2020-12-31 14:33:07 +01:00
efi_boottime.c efi_loader: use after free in efi_exit() 2020-12-31 14:33:07 +01:00
efi_capsule.c efi_loader: add firmware management protocol for raw image 2020-12-03 21:22:50 +01:00
efi_console.c efi_loader: escape key handling 2020-12-31 14:33:07 +01:00
efi_device_path_to_text.c efi_loader: device path for SATA devices 2020-05-21 10:00:17 +02:00
efi_device_path_utilities.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
efi_device_path.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
efi_disk.c dm: treewide: Rename 'platdata' variables to just 'plat' 2020-12-13 16:51:08 -07:00
efi_file.c efi_loader: incorrect buffer size in efi_file_setinfo() 2020-11-14 05:05:46 +01:00
efi_firmware.c efi_loader: add firmware management protocol for raw image 2020-12-03 21:22:50 +01:00
efi_freestanding.c efi_loader: fix freestanding memmove() 2020-03-22 11:06:23 +01:00
efi_gop.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
efi_hii_config.c efi_loader: remove EFI_HII_CONFIG_ROUTING_PROTOCOL 2020-12-10 09:15:32 +01:00
efi_hii.c efi_loader: ListPackageLists() return EFI_NOT_FOUND 2019-06-20 22:26:19 +00:00
efi_image_loader.c efi_loader: error message if image not authenticated 2020-09-06 21:21:41 +02:00
efi_load_initrd.c efi_loader: Remove unused headers from efi_load_initrd.c 2020-12-31 14:33:22 +01:00
efi_memory.c efi_memory: refine overlap_only_ram description 2020-09-18 22:23:58 +02:00
efi_net.c efi_loader: fix use after free in receive path 2020-10-19 22:59:53 +02:00
efi_rng.c efi_loader: Add missing newline to log_{err,warning} 2020-11-14 05:05:46 +01:00
efi_root_node.c efi_loader: remove EFI_HII_CONFIG_ROUTING_PROTOCOL 2020-12-10 09:15:32 +01:00
efi_runtime.c efi_loader: don't set EFI_RT_SUPPORTED_UPDATE_CAPSULE 2020-12-10 09:15:32 +01:00
efi_setup.c efi_loader: Remove unconditional installation of file2 protocol for initrd 2020-12-31 14:33:22 +01:00
efi_signature.c efi_loader: signature: correct a behavior against multiple signatures 2020-08-14 12:28:25 +02:00
efi_smbios.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
efi_string.c efi_loader: add efi_create_indexed_name() 2020-10-30 14:27:43 +01:00
efi_tcg2.c efi_loader: Introduce eventlog support for TCG2_PROTOCOL 2020-12-03 21:22:40 +01:00
efi_unicode_collation.c efi_loader: function descriptions efi_unicode_collation.c 2020-04-16 08:10:01 +02:00
efi_var_common.c efi_loader: add copyright notice 2020-08-08 19:03:24 +02:00
efi_var_file.c efi_loader: Enable run-time variable support for tee based variables 2020-08-01 11:57:41 +02:00
efi_var_mem.c efi_loader: parameter check in GetNextVariableName() 2020-11-21 07:26:16 +01:00
efi_var_seed.S efi_loader: pre-seed UEFI variables 2020-07-16 12:37:02 +02:00
efi_variable_tee.c efi_loader: Extra checks while opening an OPTEE session 2020-12-31 14:27:56 +01:00
efi_variable.c efi_loader: non-volatile variable not deleted from file 2020-11-09 17:28:17 +01:00
efi_watchdog.c efi_loader: function descriptions efi_watchdog.c 2020-04-16 08:10:02 +02:00
helloworld.c efi_loader: consistent naming of protocol GUIDs 2019-04-23 00:37:27 +02:00
Kconfig efi_loader: make variable store size customizable 2020-12-31 14:27:41 +01:00
Makefile efi_loader: remove EFI_HII_CONFIG_ROUTING_PROTOCOL 2020-12-10 09:15:32 +01:00