On 27.06.25 10:49, Michal Simek wrote:
Add option to disable help command in size constrained systems to save some
space.
Signed-off-by: Michal Simek <[email protected]>
The patch looks fine to me.
When I read through cmd/help.c I am wondering why it has
#ifdef CONFIG_CMDLINE
I would assume that without CMDLINE we wouldn't have this command.
Definitively after your patch this the case.
Please, update the tests in
test/py/tests/test_help.py
to depend on the new Kconfig symbol.
Best regards
Heinrich
---
cmd/Kconfig | 6 ++++++
cmd/Makefile | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f21d27cb27f2..3f4221cb4d02 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -189,6 +189,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 80cf70b7fe8c..718eff4ed197 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