boot: Create a new CONFIG_BOOT option

At present we assume that the cmdline is enabled, so CMD_BOOTM is used
to determine the presence of the boot_run() function.

As a first step towards enabling boot_run() without CONFIG_CMDLINE,
create a new BOOT option. Select it in BOOT_DEFAULTS and make CMD_BOOTM
depend on it. Make it default y to mirror the bootm command.

The intention with this option is that it covers the core code used by
all boot commands (e.g. zboot, bootm, booti). This includes
bootm_run_states() and functions called from there.

The name 'BOOT' is used instead of 'BOOTM', since bootm is actually a
command and it may be that we might wish, for example, to enable the
'zboot' part of the boot functionality, without enabling the 'bootm'
part of it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-31 10:30:36 +01:00
parent e303563e64
commit 6cbad6bb9b
2 changed files with 10 additions and 0 deletions

View File

@@ -385,6 +385,14 @@ endif # VPL
endif # FIT
config BOOT
bool
default y
help
Enables the main boot functionality, called 'bootm' in the code. This
is used by commands like bootm, bootz, and booti to effect a boot.
If CMDLINE is disabled, booting is still possible via standard boot.
config PXE_UTILS
bool
select MENU
@@ -419,6 +427,7 @@ config BOOT_DEFAULTS
bool # Common defaults for standard boot and distroboot
select BOOT_DEFAULTS_FEATURES
select BOOT_DEFAULTS_CMDS if CMDLINE
select BOOT
help
These are not required but are commonly needed to support a good
selection of booting methods. Enable this to improve the capability