From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: Patrick DELAUNAY <patrick.delaunay@foss.st.com>,
Francis Laniel <francis.laniel@amarulasolutions.com>,
u-boot@lists.denx.de,
Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
Aleksandar Gerasimovski
<aleksandar.gerasimovski@hitachienergy.com>,
Holger Brunck <holger.brunck@hitachienergy.com>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Philippe Reynes <philippe.reynes@softathome.com>,
Ovidiu Panait <ovidiu.panait@windriver.com>,
Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>,
Thomas Huth <thuth@redhat.com>,
Artem Lapkin <email2tema@gmail.com>
Subject: Re: [RFC PATCH v5 09/24] cli: Add menu for hush parser
Date: Tue, 8 Nov 2022 10:21:29 -0500 [thread overview]
Message-ID: <20221108152129.GR6335@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ2MNj8Wxf51hde+ws5qC0yxrFuzNa9HmL4VyS339iEDzA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2577 bytes --]
On Mon, Nov 07, 2022 at 08:28:42AM -0700, Simon Glass wrote:
> Hi Patrick,
>
> On Mon, 7 Nov 2022 at 05:32, Patrick DELAUNAY
> <patrick.delaunay@foss.st.com> wrote:
> >
> > Hi,
> >
> > On 11/1/22 20:20, Francis Laniel wrote:
> > > For the moment, the menu contains only entry: HUSH_OLD_PARSER which is the
> > > default.
> > > The goal is to prepare the field to add a new hush parser which guarantees
> > > actual behavior is still correct.
> > >
> > > Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
> > > ---
> > > cmd/Kconfig | 21 +++++++++++++++++++++
> > > common/Makefile | 3 ++-
> > > 2 files changed, 23 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/cmd/Kconfig b/cmd/Kconfig
> > > index 3f6bc70d43..c15d7c51f7 100644
> > > --- a/cmd/Kconfig
> > > +++ b/cmd/Kconfig
> > > @@ -23,6 +23,27 @@ config HUSH_PARSER
> > > If disabled, you get the old, much simpler behaviour with a somewhat
> > > smaller memory footprint.
> > >
> > > +menu "Hush flavor to use"
> > > + depends on HUSH_PARSER
> > > +
> > > + config HUSH_OLD_PARSER
> > > + bool "Use hush old parser"
> > > + default y
> > > + 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.
> > > +
> > > + 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.
> > > +endmenu
> > > +
> >
> >
> > I think "choice" can be made sense here
> >
> > => only one version is used
> >
> >
> > choice
> > prompt "Hush flavor to use"
> > default HUSH_OLD_PARSER
> >
> > depends on HUSH_PARSER
> >
> >
> > config HUSH_OLD_PARSER
> >
> > bool "Use hush old parser"
> >
> > config HUSH_2021_PARSER
> >
> > bool "Use hush 2021 parser"
> >
> > endchoice
>
> We need to be able to build both and then select the correct one at
> runtime, at least for sandbox. Otherwise we would need yet another
> sandbox build. So I think what we have here makes sense.
I think choice is fine, as that's for testing. Once we're ready to merge
this we'll not keep both around for long.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-11-08 15:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 19:20 [RFC PATCH v5 00/24] Modernize U-Boot shell Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 01/24] test: Add framework to test hush behavior Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 02/24] test: hush: Test hush if/else Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 03/24] test/py: hush_if_test: Remove the test file Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 04/24] test: hush: Test hush variable expansion Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 05/24] test: hush: Test hush commands list Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 06/24] test: hush: Test hush loops Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 07/24] cli: Add Busybox upstream hush.c file Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 08/24] cli: Port Busybox 2021 hush to U-Boot Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 09/24] cli: Add menu for hush parser Francis Laniel
2022-11-07 12:32 ` Patrick DELAUNAY
2022-11-07 15:28 ` Simon Glass
2022-11-08 15:21 ` Tom Rini [this message]
2022-11-08 20:15 ` Simon Glass
2022-11-08 22:26 ` Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 10/24] global_data.h: add GD_FLG_HUSH_OLD_PARSER flag Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 11/24] cmd: Add new parser command Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 12/24] cli: Enables using hush 2021 parser as command line parser Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 13/24] cli: hush_2021: Enable variables expansion for hush 2021 Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 14/24] cli: hush_2021: Add functions to be called from run_command() Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 15/24] cli: add hush 2021 as parser for run_command*() Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 16/24] test: hush: Fix instructions list tests for hush 2021 Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 17/24] test: hush: Fix variable expansion " Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 19/24] cli: hush_2021: Enable if keyword Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 20/24] test: hush: Fix if tests for hush 2021 Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 21/24] cli: hush_2021: Enable loops Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 22/24] test: hush: Fix loop tests for hush 2021 Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 23/24] cli: hush_2021: Add upstream commits up to 24th March 2022 Francis Laniel
2022-11-01 19:20 ` [RFC PATCH v5 24/24] DO NOT MERGE: only to make CI happy Francis Laniel
2022-12-23 4:15 ` Marek Vasut
2022-12-31 14:49 ` Francis Laniel
2022-11-02 8:08 ` [RFC PATCH v5 00/24] Modernize U-Boot shell Holger Brunck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221108152129.GR6335@bill-the-cat \
--to=trini@konsulko.com \
--cc=aleksandar.gerasimovski@hitachienergy.com \
--cc=ashok.reddy.soma@xilinx.com \
--cc=email2tema@gmail.com \
--cc=francis.laniel@amarulasolutions.com \
--cc=holger.brunck@hitachienergy.com \
--cc=masahisa.kojima@linaro.org \
--cc=michael@amarulasolutions.com \
--cc=ovidiu.panait@windriver.com \
--cc=patrick.delaunay@foss.st.com \
--cc=philippe.reynes@softathome.com \
--cc=sjg@chromium.org \
--cc=thuth@redhat.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox