]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: Make most commands depend on CMDLINE
authorSimon Glass <sjg@chromium.org>
Thu, 26 Oct 2023 18:31:29 +0000 (14:31 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 7 Nov 2023 19:49:09 +0000 (14:49 -0500)
If we disable CMDLINE then we should not ask about enabling the hush
parser nor any of the commands that would be run on the command line as
it is no longer available. Convert the CMDLINE option into a menuconfig
and make every command referenced under cmd/Kconfig depend on it.

This leaves as future work moving the commands that are not under the
cmd/ hierarchy as future work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Makefile
cmd/Kconfig

index 08604ed3c7a5d26174ff2d8d745d350f73879fec..bedcef4b9a4a03a6421edd8dda9e47410a7b0e9f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -851,7 +851,7 @@ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makef
 libs-$(CONFIG_API) += api/
 libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
 libs-y += boot/
-libs-y += cmd/
+libs-$(CONFIG_CMDLINE) += cmd/
 libs-y += common/
 libs-$(CONFIG_OF_EMBED) += dts/
 libs-y += env/
index ba6bfe6fbb9597afe81bf5468937aa2b3a9bd228..6cf71591095b90aea0db6e8267543e9e7e222c67 100644 (file)
@@ -1,7 +1,5 @@
-menu "Command line interface"
-
-config CMDLINE
-       bool "Support U-Boot commands"
+menuconfig CMDLINE
+       bool "Command line interface"
        default y
        help
          Enable U-Boot's command-line functions. This provides a means
@@ -11,9 +9,10 @@ config CMDLINE
          Depending on the number of commands enabled, this can add
          substantially to the size of U-Boot.
 
+if CMDLINE
+
 config HUSH_PARSER
        bool "Use hush shell"
-       depends on CMDLINE
        help
          This option enables the "hush" shell (from Busybox) as command line
          interpreter, thus enabling powerful command line syntax like
@@ -25,7 +24,6 @@ config HUSH_PARSER
 
 config CMDLINE_EDITING
        bool "Enable command line editing"
-       depends on CMDLINE
        default y
        help
          Enable editing and History functions for interactive command line
@@ -40,15 +38,13 @@ config CMDLINE_PS_SUPPORT
 
 config AUTO_COMPLETE
        bool "Enable auto complete using TAB"
-       depends on CMDLINE
        default y
        help
          Enable auto completion of commands using TAB.
 
 config SYS_LONGHELP
        bool "Enable long help messages"
-       depends on CMDLINE
-       default y if CMDLINE
+       default y
        help
          Defined when you want long help messages included
          Do not set this option when short of memory.
@@ -77,8 +73,7 @@ config SYS_MAXARGS
 
 config SYS_XTRACE
        bool "Command execution tracer"
-       depends on CMDLINE
-       default y if CMDLINE
+       default y
        help
          This option enables the possiblity to print all commands before
          executing them and after all variables are evaluated (similar
@@ -2889,4 +2884,5 @@ config CMD_MESON
        default y
        help
          Enable useful commands for the Meson Soc family developed by Amlogic Inc.
-endmenu
+
+endif