]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR
authorSimon Glass <sjg@chromium.org>
Thu, 26 Oct 2023 18:31:20 +0000 (14:31 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 7 Nov 2023 19:48:51 +0000 (14:48 -0500)
The command should not be used to enable library functionality. Add a
new BOOTEFI_BOOTMGR Kconfig for that. Adjust the conditions so that the
same code is built.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
cmd/Kconfig
lib/efi_loader/Kconfig
lib/efi_loader/Makefile

index 0ad56f6782fc1f1213666c50a83041bee930eac4..1ba6a38e78338c13a3dc8b50ca143358fb90fadd 100644 (file)
@@ -378,6 +378,15 @@ config CMD_BOOTEFI
        help
          Boot an EFI image from memory.
 
+config CMD_BOOTEFI_BOOTMGR
+       bool "UEFI Boot Manager command"
+       depends on BOOTEFI_BOOTMGR && CMD_BOOTEFI
+       default y
+       help
+         Select this option to enable the 'bootmgr' subcommand of 'bootefi'.
+         This subcommand will allow you to select the UEFI binary to be booted
+         via UEFI variables Boot####, BootOrder, and BootNext.
+
 config CMD_BOOTEFI_HELLO_COMPILE
        bool "Compile a standard EFI hello world binary for testing"
        depends on CMD_BOOTEFI && !CPU_V7M
@@ -2128,7 +2137,7 @@ config CMD_EFIDEBUG
 config CMD_EFICONFIG
        bool "eficonfig - provide menu-driven uefi variables maintenance interface"
        default y if !HAS_BOARD_SIZE_LIMIT
-       depends on CMD_BOOTEFI_BOOTMGR
+       depends on BOOTEFI_BOOTMGR
        select MENU
        help
          Enable the 'eficonfig' command which provides the menu-driven UEFI
index 4ccd26f94a93d181ca1a13b62e1a8afdde3ad80c..547dfd76ef522577181b8d48a5a371aa8640dcd9 100644 (file)
@@ -32,14 +32,14 @@ config EFI_LOADER
 
 if EFI_LOADER
 
-config CMD_BOOTEFI_BOOTMGR
+config BOOTEFI_BOOTMGR
        bool "UEFI Boot Manager"
        default y
        select BOOTMETH_GLOBAL if BOOTSTD
        help
          Select this option if you want to select the UEFI binary to be booted
-         via UEFI variables Boot####, BootOrder, and BootNext. This enables the
-         'bootefi bootmgr' command.
+         via UEFI variables Boot####, BootOrder, and BootNext. You should also
+         normally enable CMD_BOOTEFI_BOOTMGR so that the command is available.
 
 choice
        prompt "Store for non-volatile UEFI variables"
index 8d31fc61c60171803444fee9fd8c616d55f925f2..0a2cb6e3c4766df2c4e660ecfab99e9c25964dc7 100644 (file)
@@ -42,7 +42,7 @@ targets += initrddump.o
 endif
 
 obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
-obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += efi_bootmgr.o
+obj-$(CONFIG_BOOTEFI_BOOTMGR) += efi_bootmgr.o
 obj-y += efi_boottime.o
 obj-y += efi_helper.o
 obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += efi_capsule.o