We will keep efi/Kconfig as entry point for the top-level Kconfig options and make everything in the individual folders dependent on the top-level symbol. Adopt this scheme for efi/payload/ and while at it, clarify the symbol name and add a help text.
Signed-off-by: Ahmad Fatoum <[email protected]> --- arch/Kconfig | 5 +++++ efi/Kconfig | 24 +++++++++++++++++++++--- efi/payload/Kconfig | 27 --------------------------- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 55618bf896c2..5af114a6e9e5 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -101,6 +101,11 @@ config ARCH_HAS_SJLJ help Architecture has support implemented for setjmp()/longjmp()/initjmp() +config HAVE_EFI_PAYLOAD + bool + +config HAVE_EFI_STUB + bool config PHYS_ADDR_T_64BIT bool diff --git a/efi/Kconfig b/efi/Kconfig index 35850b20ef50..23ac601af647 100644 --- a/efi/Kconfig +++ b/efi/Kconfig @@ -2,14 +2,32 @@ menu "EFI (Extensible Firmware Interface) Support" +config EFI_PAYLOAD + bool "barebox as EFI payload/app (consumer)" + depends on HAVE_EFI_PAYLOAD || COMPILE_TEST + select PBL_FULLY_PIC if ARM64 + select EFI + select EFI_GUID + select EFI_DEVICEPATH + select PRINTF_UUID + select PRINTF_WCHAR + select BLOCK + select PARTITION_DISK + select HW_HAS_PCI + select MALLOC_TLSF + help + Select this option if you want a barebox.efi image generated that + can be loaded from existing UEFI firmware and that consumes services + and protocols provided by that UEFI firmware instead of having to + interact directly with the hardware. + +if EFI_PAYLOAD source "efi/payload/Kconfig" +endif config EFI bool -config HAVE_EFI_STUB - bool - if EFI config EFI_GUID diff --git a/efi/payload/Kconfig b/efi/payload/Kconfig index 275e053ca868..01f54ee7cf10 100644 --- a/efi/payload/Kconfig +++ b/efi/payload/Kconfig @@ -1,30 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -config HAVE_EFI_PAYLOAD - bool - -config EFI_PAYLOAD - bool "Build as EFI payload" - depends on HAVE_EFI_PAYLOAD || COMPILE_TEST - select PBL_FULLY_PIC if ARM64 - select EFI - select EFI_GUID - select EFI_DEVICEPATH - select PRINTF_UUID - select PRINTF_WCHAR - select BLOCK - select PARTITION_DISK - select HW_HAS_PCI - select MALLOC_TLSF - -config HAVE_EFI_STUB - bool - -if EFI_PAYLOAD - -config EFI_STUB - def_bool HAVE_EFI_STUB - config EFI_PAYLOAD_ESP_IMAGE bool "Generate barebox.esp image from payload" depends on EFI_STUB || !PBL_IMAGE @@ -57,5 +32,3 @@ config EFI_HANDOVER_PROTOCOL config EFI_PAYLOAD_BOOTM bool "EFI bootm protocol" default !X86 - -endif -- 2.47.3
