[Concept,11/24] bootctl: Plumb in the feature

Message ID 20251018084117.1798704-12-sjg@u-boot.org
State New
Headers
Series bootctl: Expand bootctl to include a new UI |

Commit Message

Simon Glass Oct. 18, 2025, 8:40 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

The code is present but is not currently enabled. Add Makefile rules
so that it is built. Also add a gitignore for bootctl.ini since this
file is created when 'bootctl run' is used.

Update the Kconfig rule to disable this by default, except for sandbox
the EFI app. Add a dependency on CMDLINE since the textline object
calls cread_line_process_ch() which is otherwise not available.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 .gitignore    | 2 ++
 boot/Kconfig  | 4 ++--
 boot/Makefile | 2 ++
 cmd/Makefile  | 1 +
 4 files changed, 7 insertions(+), 2 deletions(-)
  

Patch

diff --git a/.gitignore b/.gitignore
index 6b95c85b9b8..986ab7ffda3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -134,3 +134,5 @@  __pycache__
 
 # Clang's compilation database file
 /compile_commands.json
+
+bootctl.ini
diff --git a/boot/Kconfig b/boot/Kconfig
index b255245335b..cde4472ca57 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -507,8 +507,8 @@  config BOOT_DEFAULTS
 
 config BOOTCTL
 	bool "Support for boot control"
-	depends on BOOTSTD
-	default y
+	depends on EXPO && CMDLINE
+	default y if SANDBOX || EFI_APP
 	help
 	  This supports an experimental boot control, providing a way to
 	  discover and boot Operating Systems.
diff --git a/boot/Makefile b/boot/Makefile
index 3cb138ae022..cfa5a0a98e9 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -17,6 +17,8 @@  obj-y += image.o image-board.o bootm_final.o
 obj-$(CONFIG_ANDROID_AB) += android_ab.o
 obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o image-android-dt.o
 
+obj-$(CONFIG_$(PHASE_)BOOTCTL) += bootctl/
+
 obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootdev-uclass.o
 obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootflow.o
 obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootmeth-uclass.o
diff --git a/cmd/Makefile b/cmd/Makefile
index 1d65703b625..b73725cfe41 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -21,6 +21,7 @@  obj-$(CONFIG_CMD_AES) += aes.o
 obj-$(CONFIG_CMD_ADC) += adc.o
 obj-$(CONFIG_CMD_ARMFLASH) += armflash.o
 obj-$(CONFIG_BLK) += blk_common.o
+obj-$(CONFIG_CMD_BOOTCTL) += bootctl.o
 obj-$(CONFIG_CMD_BOOTDEV) += bootdev.o
 obj-$(CONFIG_CMD_BOOTFLOW) += bootflow.o
 obj-$(CONFIG_CMD_BOOTMETH) += bootmeth.o