diff mbox series

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

Message ID 20211231161327.24918-11-francis.laniel@amarulasolutions.com
State RFC
Delegated to: Tom Rini
Headers show
Series Modernize U-Boot shell | expand

Commit Message

Francis Laniel Dec. 31, 2021, 4:13 p.m. UTC
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@amarulasolutions.com>
---
 cmd/Kconfig     | 8 ++++++++
 common/Makefile | 1 +
 2 files changed, 9 insertions(+)

Comments

Simon Glass Jan. 12, 2022, 8:03 p.m. UTC | #1
On Fri, 31 Dec 2021 at 09:14, Francis Laniel
<francis.laniel@amarulasolutions.com> wrote:
>
> 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@amarulasolutions.com>
> ---
>  cmd/Kconfig     | 8 ++++++++
>  common/Makefile | 1 +
>  2 files changed, 9 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

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