We will want to have a efi_defconfig once all necessary components are
in place, but for now let's just add a config that extends
multi_v8_defconfig with an EFI stub.

To use, get QEMU_EFI.fd (e.g., from Debian qemu-efi-aarch64) and run:

  qemu-system-aarch64 -kernel images/barebox-dt-2nd.img \
  -bios QEMU_EFI.fd -machine virt,highmem=off -cpu cortex-a57 \
  -m 1024M -nographic -serial mon:stdio -trace file=/dev/null

A labgrid YAML will follow once we can provide QEMU_EFI.fd there.

Signed-off-by: Ahmad Fatoum <a.fat...@barebox.org>
---
 arch/arm/Makefile                        |  4 ++++
 common/boards/configs/efi-payload.config | 13 +++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 common/boards/configs/efi-payload.config

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index eb71c84f587a..8fa7f1dc80b7 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -8,6 +8,10 @@ am335x_mlo_sdmmc_defconfig:
 am335x_mlo_rawflash_defconfig:
        $(call merge_into_defconfig,am335x_mlo_defconfig,nomci)
 
+multi_v8_efi_defconfig:
+       $(call merge_into_defconfig,multi_v8_defconfig,efi-payload)
+generated_configs += multi_v8_efi_defconfig
+
 KBUILD_CPPFLAGS        += -D__ARM__ -fno-strict-aliasing
 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
 ifeq ($(CONFIG_CPU_64),y)
diff --git a/common/boards/configs/efi-payload.config 
b/common/boards/configs/efi-payload.config
new file mode 100644
index 000000000000..954910263a6f
--- /dev/null
+++ b/common/boards/configs/efi-payload.config
@@ -0,0 +1,13 @@
+CONFIG_COMPILE_TEST=y
+CONFIG_EFI_PAYLOAD=y
+CONFIG_FS_EFI=y
+CONFIG_FS_EFIVARFS=y
+CONFIG_DRIVER_SERIAL_EFI_STDIO=y
+CONFIG_EFI_BLK=y
+CONFIG_EFI_BLK_SEPARATE_USBDISK=y
+CONFIG_WATCHDOG_EFI=y
+CONFIG_HW_RANDOM_EFI=y
+CONFIG_I2C_EFI=y
+CONFIG_CLOCKSOURCE_EFI=y
+CONFIG_SERIAL_EFI_STDIO=y
+CONFIG_CMD_EFI_HANDLE_DUMP=y
-- 
2.39.5


Reply via email to