From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EDB7C433FE for ; Wed, 9 Nov 2022 11:47:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C70CF83F5B; Wed, 9 Nov 2022 12:47:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="FF7AHgWS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 84AD280F1E; Wed, 9 Nov 2022 12:47:46 +0100 (CET) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1EF038419C for ; Wed, 9 Nov 2022 12:47:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=francis.laniel@amarulasolutions.com Received: by mail-wr1-x42b.google.com with SMTP id bk15so25303086wrb.13 for ; Wed, 09 Nov 2022 03:47:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EqtRL/C0vblsAVjEry4JJUTwj5M6+hb1B2EMGtwbQLw=; b=FF7AHgWSBI5yNwbRbUBgrgMS5ars3eHAZJHn8T78gnEKJxZ1rqgoNnXEizB/m4fUXq jS6nBRXd5MHZOoIOdTg9BhEtGOdAwTfNarBpYREQEB8w7NsbhV2PHgAoh9K5QhkaquaB eudaRoTR456DHg4GVmuzfjoiB5NkF5MZcSEoY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EqtRL/C0vblsAVjEry4JJUTwj5M6+hb1B2EMGtwbQLw=; b=HtR0FvWzKwcqxoC3EZSGu4vOKWGLUc+hGI2aK2Qrmtp+r/LFd8yWiNjsAfx8gu8xBI MN+Ff0jabVeL69LA7t6Ti/sJUbNauDf08ay/xigX/Eo7zi1ivKWAiuNWSqKbofYOTggR q7zYrZapsVOgU6+HvDbMnW3LBWP3FPFcRT9lqXO9r9+RsIpW8wbuqXGbPiH5dYkR61rz 2lHfb9zvF298IaXkg7U3rvq8VFYXij4pNhNk1ocuPlPfSl97DvoMfgHDmD5pdm1sDfoX iXDiWNS4LGR68CeFqx7aXgRI7xpq0x08GYArbxUvhYWyOl6tJQNB9KzQR/aeS5q6RWPM jgsg== X-Gm-Message-State: ACrzQf1n5rfCXve6lhWdH29pC7AgbtPMMZL9lvVsVOQ+f1FbLwVq2KhP s2oxTDAZW4776gi5XiU2BmBSUQ== X-Google-Smtp-Source: AMsMyM7gx1cmxIzOKc5JCUTrOI8dvpxlI5NnVGnItSJkqTIRyzl393/4m87REwhut6clmWhLE6/P7A== X-Received: by 2002:adf:cd86:0:b0:236:6056:14d3 with SMTP id q6-20020adfcd86000000b00236605614d3mr40117953wrj.30.1667994463649; Wed, 09 Nov 2022 03:47:43 -0800 (PST) Received: from machine.localnet (85-170-25-210.rev.numericable.fr. [85.170.25.210]) by smtp.gmail.com with ESMTPSA id o39-20020a05600c33a700b003b47e75b401sm1223113wmp.37.2022.11.09.03.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 03:47:43 -0800 (PST) From: Francis Laniel To: Tom Rini , Simon Glass Cc: Patrick DELAUNAY , u-boot@lists.denx.de, Michael Nazzareno Trimarchi , Aleksandar Gerasimovski , Holger Brunck , Masahisa Kojima , Heinrich Schuchardt , Philippe Reynes , Ovidiu Panait , Ashok Reddy Soma , Thomas Huth , Artem Lapkin Subject: Re: [RFC PATCH v5 09/24] cli: Add menu for hush parser Date: Tue, 08 Nov 2022 23:26:37 +0100 Message-ID: <7222357.bo2iyVLy2q@machine> In-Reply-To: References: <20221101192029.10231-1-francis.laniel@amarulasolutions.com> <20221108152129.GR6335@bill-the-cat> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi. Le mardi 8 novembre 2022, 21:15:12 CET Simon Glass a =E9crit : > Hi, >=20 > On Tue, 8 Nov 2022 at 08:21, Tom Rini wrote: > > On Mon, Nov 07, 2022 at 08:28:42AM -0700, Simon Glass wrote: > > > Hi Patrick, > > >=20 > > > On Mon, 7 Nov 2022 at 05:32, Patrick DELAUNAY > > >=20 > > > wrote: > > > > Hi, > > > >=20 > > > > On 11/1/22 20:20, Francis Laniel wrote: > > > > > For the moment, the menu contains only entry: HUSH_OLD_PARSER whi= ch > > > > > is the > > > > > default. > > > > > The goal is to prepare the field to add a new hush parser which > > > > > guarantees > > > > > actual behavior is still correct. > > > > >=20 > > > > > Signed-off-by: Francis Laniel > > > > > --- > > > > >=20 > > > > > cmd/Kconfig | 21 +++++++++++++++++++++ > > > > > common/Makefile | 3 ++- > > > > > 2 files changed, 23 insertions(+), 1 deletion(-) > > > > >=20 > > > > > 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 > > > > >=20 > > > > > If disabled, you get the old, much simpler behaviour with= a > > > > > somewhat > > > > > smaller memory footprint. > > > > >=20 > > > > > +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 deci= ded > > > > > 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 sho= uld > > > > > be used at own risks. +endmenu > > > > > + > > > >=20 > > > > I think "choice" can be made sense here > > > >=20 > > > > =3D> only one version is used > > > >=20 > > > >=20 > > > > choice > > > >=20 > > > > prompt "Hush flavor to use" > > > > default HUSH_OLD_PARSER > > > > =20 > > > > depends on HUSH_PARSER > > > >=20 > > > > config HUSH_OLD_PARSER > > > >=20 > > > > bool "Use hush old parser" > > > >=20 > > > > config HUSH_2021_PARSER > > > >=20 > > > > bool "Use hush 2021 parser" > > > >=20 > > > > endchoice > > >=20 > > > 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. > >=20 > > 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. >=20 > Oh that's good. I heard people worrying about compatibility and size > of the new shell, so thought we might need both. Thank all of you for your feedback! I think being able to change the shell at run time with "parser set" could= =20 also be useful for people to test if they are worried their board will not= =20 work with the new one. So, they can test a feature with the old shell, change at runtime to the ne= w=20 one and see if everything is correct. =20 > Regards, > Simon Best regards.