diff mbox series

[RFC,v1,09/21] cli: Add choice for hush parser.

Message ID 20211231161327.24918-10-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
For the moment, the choice contains only entry: HUSH_OLD_PARSER which is the
default.
The goal of this commit is to prepare the field to add a new hush parser and it
does not change anything to actual behavior.

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

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:
>
> For the moment, the choice contains only entry: HUSH_OLD_PARSER which is the
> default.
> The goal of this commit is to prepare the field to add a new hush parser and it
> does not change anything to actual behavior.
>
> Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
> ---
>  cmd/Kconfig     | 14 ++++++++++++++
>  common/Makefile |  2 +-
>  2 files changed, 15 insertions(+), 1 deletion(-)
>

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

Patch

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 02c298fdbe..be24346c56 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -23,6 +23,20 @@  config HUSH_PARSER
 	  If disabled, you get the old, much simpler behaviour with a somewhat
 	  smaller memory footprint.
 
+choice HUSH_FLAVOR
+	bool "Hush flavor to use"
+	depends on HUSH_PARSER
+	default HUSH_OLD_PARSER
+
+	config HUSH_OLD_PARSER
+		bool "Use hush old parser"
+		help
+		  This option enables the old flavor of hush based on hush Busybox from
+		  2005.
+
+		  It is actually the default U-Boot shell when decided to use hush as shell.
+endchoice
+
 config CMDLINE_EDITING
 	bool "Enable command line editing"
 	depends on CMDLINE
diff --git a/common/Makefile b/common/Makefile
index c500bcd7d8..8b4627fccf 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -8,7 +8,7 @@  ifndef CONFIG_SPL_BUILD
 obj-y += init/
 obj-y += main.o
 obj-y += exports.o
-obj-$(CONFIG_HUSH_PARSER) += cli_hush.o
+obj-$(CONFIG_HUSH_OLD_PARSER) += cli_hush.o
 obj-$(CONFIG_AUTOBOOT) += autoboot.o
 
 # # boards