summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-05-28 10:03:16 -0600
committerHeinrich Schuchardt <[email protected]>2025-07-26 07:34:31 +0200
commit81ce639e61c990e4d3b88cc975bf552e8b509090 (patch)
treeadb90125802c29a1a57da82378ca2f2fb741e513 /lib
parent0029f2447bd4fac23d0ec6107c0b911c50c2c334 (diff)
efi: Create a new CONFIG_EFI
Create a Kconfig which indicates that EFI functionality is in use, either as a client (EFI app / stub) or provider (EFI loader). This will make it easier to share code between these two parts of U-Boot Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi/Kconfig12
-rw-r--r--lib/efi_client/Kconfig1
-rw-r--r--lib/efi_loader/Kconfig3
3 files changed, 16 insertions, 0 deletions
diff --git a/lib/efi/Kconfig b/lib/efi/Kconfig
new file mode 100644
index 00000000000..fc6d5b6d6c2
--- /dev/null
+++ b/lib/efi/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright 2025 Simon Glass <[email protected]>
+#
+
+config EFI
+ bool
+ help
+ Indicates that EFI functionality is enabled, either via EFI_CLIENT or
+ EFI_LOADER
+
+ This is used to provide libraries shared by both.
diff --git a/lib/efi_client/Kconfig b/lib/efi_client/Kconfig
index ec413639bfe..723c98d2a75 100644
--- a/lib/efi_client/Kconfig
+++ b/lib/efi_client/Kconfig
@@ -5,6 +5,7 @@ config EFI_CLIENT
bool "Support running U-Boot from EFI"
depends on X86
imply X86_TSC_READ_BASE
+ select EFI
help
U-Boot can be started from EFI on certain platforms. This allows
EFI to perform most of the system init and then jump to U-Boot for
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index 250b9469134..c2aa88f59fb 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -16,6 +16,7 @@ config EFI_LOADER
depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
depends on !EFI_APP
default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
+ select EFI
select CHARSET
# We need to send DM events, dynamically, in the EFI block driver
select DM_EVENT
@@ -597,4 +598,6 @@ endif
source "lib/efi_client/Kconfig"
+source "lib/efi/Kconfig"
+
endmenu