bootstd: Add an implementation of EFI boot
Add a bootmeth driver which handles EFI boot, using EFI_LOADER.
In effect, this provides the same functionality as the 'bootefi' command
and shares the same code. But the interface into it is via a bootmeth,
so it does not require any special scripts, etc.
For now this requires the 'bootefi' command be enabled. Future work may
tidy this up so that it can be used without CONFIG_CMDLINE being enabled.
There was much discussion about whether this is needed, but it seems
that it is, at least for now.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/Kconfig b/boot/Kconfig
index 9e02a75..0bfea27 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -349,6 +349,27 @@
This provides a way to try out standard boot on an existing boot flow.
+config BOOTMETH_EFILOADER
+ bool "Bootdev support for EFI boot"
+ depends on CMD_BOOTEFI
+ default y
+ help
+ Enables support for EFI boot using bootdevs. This makes the
+ bootdevs look for a 'boot<arch>.efi' on each filesystem
+ they scan. The resulting file is booted after enabling U-Boot's
+ EFI loader support.
+
+ The <arch> depends on the architecture of the board:
+
+ aa64 - aarch64 (ARM 64-bit)
+ arm - ARM 32-bit
+ ia32 - x86 32-bit
+ x64 - x86 64-bit
+ riscv32 - RISC-V 32-bit
+ riscv64 - RISC-V 64-bit
+
+ This provides a way to try out standard boot on an existing boot flow.
+
endif
config LEGACY_IMAGE_FORMAT