public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: [v4 11/24] efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR
Date: Thu, 19 Oct 2023 11:00:52 -0400	[thread overview]
Message-ID: <20231019150105.714407-11-trini@konsulko.com> (raw)
In-Reply-To: <20231019150105.714407-1-trini@konsulko.com>

From: Simon Glass <sjg@chromium.org>

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>
---
Cc: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Changes in v4:
- Integrate AKASHI Takahiro's feedback from v3
- Reword the help text on CMD_BOOTEFI_BOOTMGR slightly
---
 cmd/Kconfig             | 11 ++++++++++-
 lib/efi_loader/Kconfig  |  6 +++---
 lib/efi_loader/Makefile |  2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 16e5cb8f0633..872cb49150cc 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -379,6 +379,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
@@ -2110,7 +2119,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
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index d20aaab6dba4..13cad6342c36 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -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"
diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
index 8d31fc61c601..0a2cb6e3c476 100644
--- a/lib/efi_loader/Makefile
+++ b/lib/efi_loader/Makefile
@@ -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
-- 
2.34.1


  parent reply	other threads:[~2023-10-19 15:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 15:00 [v4 01/24] buildman: Use oldconfig when adjusting the config Tom Rini
2023-10-19 15:00 ` [v4 02/24] virtio: Make VIRTIO_NET depend on NETDEVICES Tom Rini
2023-10-19 15:00 ` [v4 03/24] dfu: Make DFU_TFTP " Tom Rini
2023-10-19 15:00 ` [v4 04/24] version: Separate our version string from the version command Tom Rini
2023-10-19 15:00 ` [v4 05/24] qemu: Correct CMD_QFW dependencies in Kconfig Tom Rini
2023-10-19 15:00 ` [v4 06/24] Kconfig: Move CONFIG_SYS_[CP]BSIZE to common/Kconfig Tom Rini
2023-10-19 15:00 ` [v4 07/24] env: Move env_set() out of cmd/nvedit.c and in to env/common.c Tom Rini
2023-10-19 15:00 ` [v4 08/24] test: Make UNIT_TEST depend on CMDLINE Tom Rini
2023-10-19 15:00 ` [v4 09/24] video: Don't require the font command Tom Rini
2023-10-19 15:00 ` [v4 10/24] cli_simple: Rework this support slightly Tom Rini
2023-10-19 15:00 ` Tom Rini [this message]
2023-10-19 15:16   ` [v4 11/24] efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR Heinrich Schuchardt
2023-10-19 15:19     ` Tom Rini
2023-10-19 15:24       ` Heinrich Schuchardt
2023-10-19 15:28         ` Tom Rini
2023-10-20 12:21       ` AKASHI Takahiro
2023-10-20 13:58         ` Tom Rini
2023-10-19 15:00 ` [v4 12/24] bootmeth: Make BOOTMETH_EFILOADER depend on CMD_BOOTEFI Tom Rini
2023-10-19 15:00 ` [v4 13/24] autoboot: Correct dependencies on CMDLINE Tom Rini
2023-10-19 15:00 ` [v4 14/24] boot: Make DISTRO_DEFAULTS select CMDLINE Tom Rini
2023-10-19 15:00 ` [v4 15/24] boot: Rework BOOT_DEFAULTS to allow for CMDLINE to be disabled Tom Rini
2023-10-19 15:00 ` [v4 16/24] boot: Move SYS_BOOTM_LEN to be by LEGACY_IMAGE_FORMAT Tom Rini
2023-10-19 15:00 ` [v4 17/24] bootmeth_cros: Require bootm.o and bootm_os.o Tom Rini
2023-10-19 15:00 ` [v4 18/24] bootmeth_script: Depend on CMDLINE Tom Rini
2023-10-19 15:01 ` [v4 19/24] boot: Make preboot and bootcmd require CMDLINE Tom Rini
2023-10-19 15:01 ` [v4 20/24] cmd: Make most commands depend on CMDLINE Tom Rini
2023-10-19 15:01 ` [v4 21/24] sandbox: Disable CONFIG_DISTRO_DEFAULTS Tom Rini
2023-10-19 15:01 ` [v4 22/24] sandbox: Avoid requiring CMDLINE Tom Rini
2023-10-19 15:01 ` [v4 23/24] sandbox: Add <asm/barrier.h> Tom Rini
2023-10-21  2:39   ` Sean Anderson
2023-10-19 15:01 ` [v4 24/24] clk_k210.c: Clean up how we handle nop Tom Rini
2023-10-20 21:53   ` [v4.1 1/2] sandbox: Add a test for disabling CONFIG_CMDLINE Tom Rini
2023-10-20 21:53     ` [v4.1 2/2] CI, pytest: Add a test for sandbox without LTO Tom Rini
2023-10-21 15:43       ` Simon Glass
2023-10-21 18:34         ` Tom Rini
2023-10-23  7:05           ` Simon Glass
2023-10-23 13:37             ` Tom Rini
2023-10-23 17:13               ` Simon Glass
2023-10-23 17:27                 ` Tom Rini
2023-10-24 18:02                   ` Simon Glass
2023-10-24 18:07                     ` Tom Rini
2023-10-24 21:39                       ` Simon Glass
2023-10-24 22:01                         ` Tom Rini
2023-10-21  2:39   ` [v4 24/24] clk_k210.c: Clean up how we handle nop Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231019150105.714407-11-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=sjg@chromium.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox