]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
efi: Create a new CONFIG_EFI
authorSimon Glass <sjg@chromium.org>
Wed, 28 May 2025 16:03:16 +0000 (10:03 -0600)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 26 Jul 2025 05:34:31 +0000 (07:34 +0200)
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 <sjg@chromium.org>
doc/develop/uefi/u-boot_on_efi.rst
lib/efi/Kconfig [new file with mode: 0644]
lib/efi_client/Kconfig
lib/efi_loader/Kconfig

index 9068894e40875cb837742bdf93f8e07fb03eac99..177e887ebd9664fdb7352c34ae9bcc4b8b82caf4 100644 (file)
@@ -45,9 +45,9 @@ First choose a board that has EFI support and obtain an EFI implementation
 for that board. It will be either 32-bit or 64-bit. Alternatively, you can
 opt for using QEMU [1] and the OVMF [2], as detailed below.
 
-To build U-Boot as an EFI application, enable CONFIG_EFI_CLIENT and CONFIG_EFI_APP.
-The efi-x86_app32 and efi-x86_app64 configs are set up for this. Just build
-U-Boot as normal, e.g.::
+To build U-Boot as an EFI application, enable CONFIG_EFI_CLIENT and
+CONFIG_EFI_APP. The efi-x86_app32 and efi-x86_app64 configs are set up for
+this. Just build U-Boot as normal, e.g.::
 
    make efi-x86_app32_defconfig
    make
diff --git a/lib/efi/Kconfig b/lib/efi/Kconfig
new file mode 100644 (file)
index 0000000..fc6d5b6
--- /dev/null
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright 2025 Simon Glass <sjg@chromium.org>
+#
+
+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.
index ec413639bfebd16a048113e6994dddbda5a9127f..723c98d2a752848ab4edcd732a3f194bb2f580ec 100644 (file)
@@ -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
index 250b94691345bc57bdc3aa3462654993d6e12fc8..c2aa88f59fbb32d36d25622dc322a27882612103 100644 (file)
@@ -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