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 94885C433F5 for ; Sun, 6 Feb 2022 18:39:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 83AB583BB6; Sun, 6 Feb 2022 19:38:15 +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="NS2y1lVO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAA0083C39; Sun, 6 Feb 2022 19:38:05 +0100 (CET) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 A3BA883BEC 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-wm1-x333.google.com with SMTP id n12-20020a05600c3b8c00b0034eb13edb8eso6798529wms.0 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=Gna5al6TrlWUjme0uGbqGmZ/ta8gIrZYXT5JwronY0E=; b=NS2y1lVOnsdN2zlVWalazmNMeZqkohwnw+IsSsovdQCEeweNIuQlE/43em9j22u0nH QAJ4FRnNekCE3SpzXe+hZeP6mRj28LBhK+QfK5ooQ0qvOxGsF0kjLTFrjJb63m6dC/64 lTmZ1ZK8kk7CghihaF3GcssaxG4bvayqFzlwo= 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=Gna5al6TrlWUjme0uGbqGmZ/ta8gIrZYXT5JwronY0E=; b=oiz2n2lUTZtOmY9YczjQ0Lid/vfsHm5BMRZ7Lkt4elJJw2rzNc/VI9Ech1dNsYblv0 vUxAsyb6lUMgMuMhc8UhfOoIjilXqH3tUKpXERZxT5R6VL4+LD+L0qecYFwiBIMZwfhL cN6tsReEqvKqofidampSCbNzB4wAffkho7Yqb6+HLQ683lDkF7nUxgclBRJuUbO0VYNB wX8YsnS0VleoF0fvuBmcTg1G/6w6pcoh8sBZhtbrijsHxOJZuuwmLrBXmoeifNbpuTFG vobEH+NX+7SVt8ouXOGNyd55+ZLp73QsqMbcdy6K/eQjuBjH/OcSGQzzvZmsXtFVZATc HZVA== X-Gm-Message-State: AOAM531scooJPQ239hatQLLlxOhEqUxM6FJE3MCNP2UnQtITpiJL9KVq O26wzLO9uu0Vypy6TOpEuCufH/r6nEGPcQ== X-Google-Smtp-Source: ABdhPJxfhYISqjKK23FI7pMXu10kaEsHbE3LT5ruIMWT6pV029/G74Ka3kqXjd/BXGemvPAb+TKaAQ== X-Received: by 2002:a05:600c:4802:: with SMTP id i2mr3513669wmo.26.1644172666336; Sun, 06 Feb 2022 10:37:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 10:37:45 -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 10/21] cli: Add HUSH_2021_PARSER to hush parser choice Date: Sun, 6 Feb 2022 19:37:06 +0100 Message-Id: <20220206183717.57446-11-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 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 -- 2.25.1