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 33492C6FD1D for ; Thu, 30 Mar 2023 20:01:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9BEE385F50; Thu, 30 Mar 2023 21:58:56 +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="hNYf7TjC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35D8085F57; Thu, 30 Mar 2023 21:58:51 +0200 (CEST) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 A9F13860A6 for ; Thu, 30 Mar 2023 21:48:57 +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-wm1-x330.google.com with SMTP id o24-20020a05600c511800b003ef59905f26so12510087wms.2 for ; Thu, 30 Mar 2023 12:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1680205737; 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=cKuTDfZcdYHEGsf948xEhN7jC1mBPPK9m0E5oJ3xSZA=; b=hNYf7TjCllKDx0S2pggRL1dZBnpfslHBhSCsf5CPY91FIPNtpojYVuL49b3NoxhlBJ w8KdmW4Jh/xoHxSPmSHEPIf6r6JtO70JjDT8gyVl7OMTMqHL+oImF/84Dnvjt6fQGOKT llCul/tAXTGVJ6qZtuDU2qaI/XrS822g8Rs5k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680205737; 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=cKuTDfZcdYHEGsf948xEhN7jC1mBPPK9m0E5oJ3xSZA=; b=A8qwlXl9DPSThonJhtNvq7t5w8vJRoCowSWrjn7sb0o7tQCVa+/oHhxKzlJBGo81Sc 9HtIo1tW0FP5Kb7on9b/3Fazv4H2lrNpGHUbnxZ5Ru5xXszwqLEkBQKB0RNAEFmB4zaO te25zRveqlS6JPPtSF2gAuuIWPKRYqqnDKniIRvU+dtilipq38FeGKPnLtjZdiYFFzO9 AgzJHB6CKdMlWyyEWOIyf9I2vXk1EC6NsoLGIPCuHQS5TmEwv8Nqa1z/sbTZNfwERTrq XFXecTX7kCYpAC8YnX3WPC7CJDr/plfpAH9OWwgRyQb+uqiCQNhjrC8PTCgG0hACJVLy 8IcQ== X-Gm-Message-State: AO0yUKVq4nIWbrzAnJ4U3c68pSarI+aRA1E9AdagPuRoR0hbu3KLHh+R o1UCkVG+hWu+qbCA6djCIyfhn8H6sZQIONVMWZwgIg== X-Google-Smtp-Source: AK7set866qDF3imCyJYpTNb0YqCrXf/gwXsDs58eLZBuS/bw/D24PVl3ZlBW/GjGQ2XVtwjlSpeeXg== X-Received: by 2002:a1c:7206:0:b0:3ed:2352:eebd with SMTP id n6-20020a1c7206000000b003ed2352eebdmr19118754wmc.11.1680205737155; Thu, 30 Mar 2023 12:48:57 -0700 (PDT) Received: from pwmachine.numericable.fr ([78.30.11.60]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003e203681b26sm203762wme.29.2023.03.30.12.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Mar 2023 12:48:56 -0700 (PDT) From: Francis Laniel To: u-boot@lists.denx.de Cc: Michael Nazzareno Trimarchi , Tom Rini , Simon Glass , Harald Seiler , Francis Laniel , "Albert ARIBAUD (3ADEV)" , Tony Dinh , Sergei Antonov , Ilias Apalodimas , Heinrich Schuchardt , Masahisa Kojima , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Stefan Roese , John Keeping , Roger Knecht , Neil Armstrong , Sughosh Ganu , Alexey Romanov , Patrice Chotard , Fabrice Gasnier , Hector Palacios , Marek Vasut , Rasmus Villemoes , AKASHI Takahiro , Rui Miguel Silva , Linus Walleij , Andrew Scull Subject: [RFC PATCH v7 09/23] cli: Add menu for hush parser Date: Thu, 30 Mar 2023 20:46:57 +0100 Message-Id: <20230330194716.23623-10-francis.laniel@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230330194716.23623-1-francis.laniel@amarulasolutions.com> References: <20230330194716.23623-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.8 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 2caa4af71c..1b9d04680d 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 a50302d8b5..ddb89306ee 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.34.1