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 62EDBC43334 for ; Thu, 16 Jun 2022 22:41:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 642A0844C1; Fri, 17 Jun 2022 00:41:21 +0200 (CEST) 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="S9jw9ALs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D64D8435C; Fri, 17 Jun 2022 00:40:56 +0200 (CEST) Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 E6ADF8437A for ; Fri, 17 Jun 2022 00:33:05 +0200 (CEST) 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-x429.google.com with SMTP id c21so3566728wrb.1 for ; Thu, 16 Jun 2022 15:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nQwKJUQqAdkqUD/0iiCCRrblDqwDiQJT1OiSM5sLIBs=; b=S9jw9ALsEfFUDm1mWL3jl6D4aAp8yeXFjQb1ZawYs4jRfDdnbkQtBCmE2Of//1Ms94 Tbv7KmM2hlcDyuD9bntSyaOyFpzVLnpIACsHL3KwEreYVIaDjiOOQuBobnCAxuppDW12 PX454GroBoV8PxW93WuagqHYn9lY3O+I7SFGo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nQwKJUQqAdkqUD/0iiCCRrblDqwDiQJT1OiSM5sLIBs=; b=Rbz+I7S/8mDd/dZdZXnDPUlQCWFO8uOEmAMb3F/qDhvnsBl0kAtmTZ1xxQz2j8KNSr eq+BhmPMzqf1tO/fx80+t/2wSOZ+XSO08nJbPHtUi7cjgws3gnzSWRes0EqNt+Do1ADk 0slhtQi7KFmy+v7xUx8YCGV/r3MzHO8/3fVMuEcbmmMrt1CtHJxH7a5vTlA+tI13dmml Vwmyr+nnlc9uVo1T4CqYPqGr22vPsvtjCqHNJLFyCFN7tjfhnPYfwyERS2PBTs3SFE4h TgKbXDESGjNHo5lJEApNQsY1vuCv76pr8kJxtQr9QnLSQLjkEHvf+wt4GmXQ/6pNlz5F VA6w== X-Gm-Message-State: AJIora8uT0GMDs8kziZL8UcEGQKhfT7D3/01+ff/rrhekobvgYGmmIrR SeGpFhLA3J1bp5/1L7z7dnno0TGkaR7yHQ== X-Google-Smtp-Source: AGRyM1sFv3+OBPmlKH+4fuEiOs9+qvOsGl55DlM7OHjF1ciALnMko1YojmusLlEy1GwwI8PdDVZ+5w== X-Received: by 2002:a5d:6f04:0:b0:219:f718:b66e with SMTP id ay4-20020a5d6f04000000b00219f718b66emr6701632wrb.40.1655418782353; Thu, 16 Jun 2022 15:33:02 -0700 (PDT) Received: from pwmachine.home (17.pool80-103-97.dynamic.orange.es. [80.103.97.17]) by smtp.gmail.com with ESMTPSA id n4-20020a05600c4f8400b003971fc23185sm7912044wmq.20.2022.06.16.15.33.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 15:33:01 -0700 (PDT) From: Francis Laniel To: u-boot@lists.denx.de Cc: Marek Behun , Michael Nazzareno Trimarchi , Simon Glass , Wolfgang Denk , Harald Seiler , Tom Rini , Francis Laniel Subject: [RFC PATCH v4 10/28] cli: Add menu for hush parser Date: Fri, 17 Jun 2022 00:31:40 +0200 Message-Id: <20220616223158.9225-11-francis.laniel@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220616223158.9225-1-francis.laniel@amarulasolutions.com> References: <20220616223158.9225-1-francis.laniel@amarulasolutions.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean 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 --- cmd/Kconfig | 21 +++++++++++++++++++++ common/Makefile | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 09193b61b9..ce19ad2080 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 + config CMDLINE_EDITING bool "Enable command line editing" depends on CMDLINE diff --git a/common/Makefile b/common/Makefile index 75c24e3249..6f2df987ae 100644 --- a/common/Makefile +++ b/common/Makefile @@ -8,7 +8,8 @@ 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_HUSH_2021_PARSER) += cli_hush_2021.o obj-$(CONFIG_AUTOBOOT) += autoboot.o # # boards -- 2.25.1