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 B4E5BC433F5 for ; Sun, 6 Feb 2022 18:39:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 92AC583BF2; Sun, 6 Feb 2022 19:38:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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="QIU4bgw8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E70EF83BD6; Sun, 6 Feb 2022 19:37:57 +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 0D2C883BED for ; Sun, 6 Feb 2022 19:37:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (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 m5so3868904wrb.2 for ; Sun, 06 Feb 2022 10:37:46 -0800 (PST) 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=YCuMl5lB/N6n5C2B9HMHRbIZcGROlv1bU1OUQCAXRls=; b=QIU4bgw8f0NORWXZvVmFFQUQFonhhXgDhhj8qIHyESw+Xld3tm+oEPcgpWoDJov5Gr rs08NZ0Oo1yxoBkIBt1InKwHFpYBcXS/6TCKWqS0mFLGenSiroPPea03Nq7SrvXZVQ35 9bFNNODkXB00k9NcqD0mgejWbTpUZeh7lG+4o= 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=YCuMl5lB/N6n5C2B9HMHRbIZcGROlv1bU1OUQCAXRls=; b=RSPE/s435K7mdUt7wu7fRgUvnbjQdhzK/kN8YZZtnR5kj5vJgG6p3mTsH0xeeSCdnA hTAEwksx185aPlL0ttcTZk2424o4IM2UcU+++0WffRNXmlwULsj0Q9sJDFTNgd+Mww6e lBk9SSh8R33a9aztdO7ILpffYixLIBZM8souRH6aEb+KHPS0RB6IXO0TIBuHIVCqGVb5 oykzRRMudfJImK+WVy8rYIk4sOt5elr6+qSxhTAJ5Sw1NbrEOYFZ2Yinya/90kFVFA/d mmOGlixuUuqvE8wt0LZhwXpGbMhvKmBLLS0YQDdf+VASpaL7DVQ8y+2D36J4ChkJ+IqQ JfGg== X-Gm-Message-State: AOAM531HsSKbKAzYZQkmqDRoF/iDk5HH3xSxdKu4/CammwRY8igTKRlM vXFlH+OmFM/6mCvMqT/sBjvuqpw6SwLELQ== X-Google-Smtp-Source: ABdhPJy1xuwhdaASNiJrFMzbMItKBuxPkJmnIsgE0+8TUD+UosiSl2ZvA+I+3eg+GnS1VdGIgejIDw== X-Received: by 2002:adf:d1e9:: with SMTP id g9mr7211138wrd.166.1644172665456; Sun, 06 Feb 2022 10:37:45 -0800 (PST) Received: from pwmachine.home ([2a01:cb14:983:1f00:e5b3:218b:cb92:2549]) by smtp.gmail.com with ESMTPSA id ay29sm7095011wmb.38.2022.02.06.10.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 10:37:44 -0800 (PST) From: Francis Laniel To: u-boot@lists.denx.de Cc: Marek Behun , Michael Nazzareno Trimarchi , Simon Glass , Wolfgang Denk , Harald Seiler , Francis Laniel Subject: [RFC PATCH v2 09/21] cli: Add choice for hush parser Date: Sun, 6 Feb 2022 19:37:05 +0100 Message-Id: <20220206183717.57446-10-francis.laniel@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220206183717.57446-1-francis.laniel@amarulasolutions.com> References: <20220206183717.57446-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 choice 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 Reviewed-by: Simon Glass --- cmd/Kconfig | 14 ++++++++++++++ common/Makefile | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) 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 -- 2.25.1