From patchwork Fri Dec 31 16:13:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francis Laniel X-Patchwork-Id: 1574394 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=BqC1J7NH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JQVcL2xDkz9s0r for ; Sat, 1 Jan 2022 03:15:46 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5813583759; Fri, 31 Dec 2021 17:14:44 +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="BqC1J7NH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AF7FA8331E; Fri, 31 Dec 2021 17:14:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 0D9B083433 for ; Fri, 31 Dec 2021 17:14:10 +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-x431.google.com with SMTP id a9so56598386wrr.8 for ; Fri, 31 Dec 2021 08:14:09 -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=4Ng7G3KP3dcOD7BESBG/KL5MciFMKBNLdzyICBiJYhw=; b=BqC1J7NHqQuSjwpe7vMUX/8ZcM9V7mCLTFCVWFGdXvIZT1AEhr+W4tGhnxIDU6Df37 nC6882jAw3TflzLB/0XJb3dLZO5SySBPWNdCYTWWq+NyZhaNJ5mBRENP6gSm7yb+ZMN6 zaFFv0vwxQuxwAWQlNuNZ10WStRqjzCM/Y7Q8= 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=4Ng7G3KP3dcOD7BESBG/KL5MciFMKBNLdzyICBiJYhw=; b=17bb/UekulabhqLZJ9sl7Ubu89M6Izpk2WwpE9xznKEOsaN/ih6bZs7m4pKaRF/CHq 8WdFb5sTdSlSFXXCyaKjtl5MmxAwPp5xCzDdNoXRpLmQ8e7Ypm/TMaFNWi/ZT57QYjHX blsH6GHnAa5tU58brQLb0qegyT5D9lhJNwMNhfZZLbC3/oV7qO5C82D9wmAsC/mZGSYp sVz3xAZGY3IaR+9VYiMN8iaP8+g0OLeX/Yihhm82BojY8rvtxdJCJJ+kJ4EOWEf/hHkb tVHl8iu2ZyQ5PLTwXuB1h1Jfp1WiY4I1gBkYrZVVWLT39ol5/HU9bsiWveofaylvc+Hj MZcA== X-Gm-Message-State: AOAM530+VsvEl0/u0bNroNAXIRWlNJ/AnDfsSpFLUskpfodK5apCNjn9 JxdDptM5FZl8zaw5/GfSiYm53Qqk0ZRWcw== X-Google-Smtp-Source: ABdhPJyhT4t575s6lbkzvhLgEoPj//o0vNZrrk5vTuunKJaJEw0O8+5faSIIr2pxWY96Bp1OSI+5HQ== X-Received: by 2002:adf:ba8b:: with SMTP id p11mr29141699wrg.390.1640967249504; Fri, 31 Dec 2021 08:14:09 -0800 (PST) Received: from pwmachine.home ([2a01:cb14:983:1f00:eef7:8bf8:8ee0:cb1a]) by smtp.gmail.com with ESMTPSA id f6sm31855522wmq.6.2021.12.31.08.14.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Dec 2021 08:14:09 -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 v1 10/21] cli: Add HUSH_2021_PARSER to hush parser choice . Date: Fri, 31 Dec 2021 17:13:16 +0100 Message-Id: <20211231161327.24918-11-francis.laniel@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211231161327.24918-1-francis.laniel@amarulasolutions.com> References: <20211231161327.24918-1-francis.laniel@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean To use hush 2021 as U-Boot shell, one should tick "Use hush 2021 parser" under "Hush flavor to use" choice. Since this is a choice, you cannot use at the same time old and new flavor of hush. Signed-off-by: Francis Laniel Reviewed-by: Simon Glass --- cmd/Kconfig | 8 ++++++++ common/Makefile | 1 + 2 files changed, 9 insertions(+) diff --git a/cmd/Kconfig b/cmd/Kconfig index be24346c56..13d5ceb517 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -35,6 +35,14 @@ choice HUSH_FLAVOR 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. endchoice config CMDLINE_EDITING diff --git a/common/Makefile b/common/Makefile index 8b4627fccf..8b97be8e7a 100644 --- a/common/Makefile +++ b/common/Makefile @@ -9,6 +9,7 @@ obj-y += init/ obj-y += main.o obj-y += exports.o obj-$(CONFIG_HUSH_OLD_PARSER) += cli_hush.o +obj-$(CONFIG_HUSH_2021_PARSER) += cli_hush_2021.o obj-$(CONFIG_AUTOBOOT) += autoboot.o # # boards