[RFC PATCH v1 10/21] cli: Add HUSH_2021_PARSER to hush parser choice .

Francis Laniel francis.laniel at amarulasolutions.com
Fri Dec 31 17:13:16 CET 2021


To use hush 2021 as U-Boot shell, one should tick "Use hush 2021 parser" under
"Hush flavor to use" choice.
Since this is a choice, you cannot use at the same time old and new flavor of
hush.

Signed-off-by: Francis Laniel <francis.laniel at amarulasolutions.com>
---
 cmd/Kconfig     | 8 ++++++++
 common/Makefile | 1 +
 2 files changed, 9 insertions(+)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index be24346c56..13d5ceb517 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -35,6 +35,14 @@ choice HUSH_FLAVOR
 		  2005.
 
 		  It is actually the default U-Boot shell when decided to use hush as shell.
+
+	config HUSH_2021_PARSER
+		bool "Use hush 2021 parser"
+		help
+		  This option enables the new flavor of hush based on hush Busybox from
+		  2021.
+
+		  For the moment, it is highly experimental and should be used at own risks.
 endchoice
 
 config CMDLINE_EDITING
diff --git a/common/Makefile b/common/Makefile
index 8b4627fccf..8b97be8e7a 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -9,6 +9,7 @@ obj-y += init/
 obj-y += main.o
 obj-y += exports.o
 obj-$(CONFIG_HUSH_OLD_PARSER) += cli_hush.o
+obj-$(CONFIG_HUSH_2021_PARSER) += cli_hush_2021.o
 obj-$(CONFIG_AUTOBOOT) += autoboot.o
 
 # # boards
-- 
2.25.1



More information about the U-Boot mailing list