summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/Kconfig6
-rw-r--r--cmd/Makefile2
-rw-r--r--cmd/help.c6
-rw-r--r--test/py/tests/test_help.py1
4 files changed, 8 insertions, 7 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 1ba3cfcb28a..37495c261a6 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -190,6 +190,12 @@ config CMD_FWU_METADATA
help
Command to read the metadata and dump it's contents
+config CMD_HELP
+ bool "help"
+ default y
+ help
+ Command to show help information about other commands.
+
config CMD_HISTORY
bool "history"
depends on CMDLINE_EDITING
diff --git a/cmd/Makefile b/cmd/Makefile
index 80cf70b7fe8..718eff4ed19 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -7,7 +7,7 @@ ifndef CONFIG_XPL_BUILD
# core command
obj-y += boot.o
obj-$(CONFIG_CMD_BOOTM) += bootm.o
-obj-y += help.o
+obj-$(CONFIG_CMD_HELP) += help.o
obj-y += panic.o
obj-y += version.o
diff --git a/cmd/help.c b/cmd/help.c
index 56579e28d31..1be83ba607d 100644
--- a/cmd/help.c
+++ b/cmd/help.c
@@ -9,13 +9,9 @@
static int do_help(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
-#ifdef CONFIG_CMDLINE
struct cmd_tbl *start = ll_entry_start(struct cmd_tbl, cmd);
const int len = ll_entry_count(struct cmd_tbl, cmd);
return _do_help(start, len, cmdtp, flag, argc, argv);
-#else
- return 0;
-#endif
}
U_BOOT_CMD(
@@ -27,7 +23,6 @@ U_BOOT_CMD(
" - print detailed usage of 'command'"
);
-#ifdef CONFIG_CMDLINE
/*
* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names
* nor can we rely on the CONFIG_SYS_LONGHELP helper macro
@@ -39,4 +34,3 @@ ll_entry_declare(struct cmd_tbl, question_mark, cmd) = {
""
#endif /* CONFIG_SYS_LONGHELP */
};
-#endif
diff --git a/test/py/tests/test_help.py b/test/py/tests/test_help.py
index 12cb36b7b98..afb57201ba3 100644
--- a/test/py/tests/test_help.py
+++ b/test/py/tests/test_help.py
@@ -4,6 +4,7 @@
import pytest
+@pytest.mark.buildconfigspec('cmd_help')
def test_help(ubman):
"""Test that the "help" command can be executed."""