[PATCH v3 04/32] cmd: Add a few more dependencies on CMDLINE

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Oct 18 15:14:44 CEST 2023


On 10/17/23 00:27, Simon Glass wrote:
> Add this to some more commands to avoid build errors with sandbox.
>
> Note that this is a temporary solution to expose more problems. A later
> patch puts these behind an 'if CMDLINE'
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v3:
> - Add an explation as to why this patch is here
>
>   cmd/Kconfig | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index 5bc0a92d57ad..00a7f84bce99 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -231,6 +231,7 @@ menu "Boot commands"
>
>   config CMD_BOOTD
>   	bool "bootd"
> +	depends on CMDLINE

Why don't we simply use a single "if" for all commands?
Adding the same dependency to 200+ commands does not feel right.

If there is any CONFIG_CMD* that is needed without CMDLINE, then that
code should move to lib/ or drivers/.

Best regards

Heinrich

>   	default y
>   	help
>   	  Run the command stored in the environment "bootcmd", i.e.
> @@ -420,6 +421,7 @@ source lib/efi_selftest/Kconfig
>
>   config CMD_BOOTMENU
>   	bool "bootmenu"
> +	depends on CMDLINE
>   	select MENU
>   	select CHARSET
>   	help
> @@ -486,6 +488,7 @@ config CMD_GO
>
>   config CMD_RUN
>   	bool "run"
> +	depends on CMDLINE
>   	default y
>   	help
>   	  Run the command in the given environment variable.
> @@ -576,6 +579,7 @@ menu "Environment commands"
>
>   config CMD_ASKENV
>   	bool "ask for env variable"
> +	depends on CMDLINE
>   	help
>   	  Ask for environment variable
>
> @@ -2132,6 +2136,7 @@ config CMD_EFICONFIG
>
>   config CMD_EXCEPTION
>   	bool "exception - raise exception"
> +	depends on CMDLINE
>   	depends on ARM || RISCV || SANDBOX || X86
>   	help
>   	  Enable the 'exception' command which allows to raise an exception.
> @@ -2238,6 +2243,7 @@ config CMD_SYSBOOT
>
>   config CMD_QFW
>   	bool "qfw"
> +	depends on CMDLINE
>   	select QFW
>   	help
>   	  This provides access to the QEMU firmware interface.  The main



More information about the U-Boot mailing list