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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EDBDC433EF for ; Fri, 22 Oct 2021 23:29:59 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9258A60F12 for ; Fri, 22 Oct 2021 23:29:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9258A60F12 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F9DA834CF; Sat, 23 Oct 2021 01:29:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="a4PzqGmB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E02882BC0; Sat, 23 Oct 2021 01:29:54 +0200 (CEST) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (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 44D2A82F33; Sat, 23 Oct 2021 01:29:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-yb1-xb30.google.com with SMTP id l201so10326535ybl.9; Fri, 22 Oct 2021 16:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nFdWaYT240bJ34L4PW0/HJUQEDESo5JBEEIOkNsjMTY=; b=a4PzqGmBMKSrDYR6qGVwauvQa5MsEUeWWFEaKIORoejq1Byt+Y3c10hHmod7YZ3G/D 8dMKVqXe1eysZiVrc1in/yzCxVsalfCCGYbbnS0aqXKYA22/AaVIpj2AT00upqPZPwNA 9CkHz60MHaCPDtDif1Te/YdfnSi6qDi8zuIjXpRrzwh/RrK3Shk/RbCy7er3PFy5s5G7 1aYPU+RToT99wFqTbT+9btTIGSmj48ppkPSD0K+V9MjwrlZeOZSUvC6Ao11cqJ+hjbf4 5V+0Hl3vBFWoSS9+Jt4t4fYOQTEg3qytjpffR77frkV0mi1prNuvV/7eN1jyxyRKYfSU lvMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nFdWaYT240bJ34L4PW0/HJUQEDESo5JBEEIOkNsjMTY=; b=ajAXLjdJQFzsaTvOmNP5HwBGsC7OyVM9ll+WyeYQrPtvwxBm5mrZWgeFOBO6OFfkQH MDulXruQnzfS1QoBq3iLllgYtHb12oV8A0DyoSypGg3HXRxUumrR2DkPDtWsW3eHca3J W62PMPElo8ukcuzIg9IHlxKtC/A0ezEzCy1E91ZhJpv9Xj87x52Y89SeRMCje54yiq09 YOKPofQt30JlkJnSE3lPU6NVpVq8M2xXMKbXw60yP5WNaVRScwR/ndEhVvdxGa2tXbfv ZmMLs9EAiI92PafHWJCcT9bqyKINPeYG8urHBFPsMarfpXYniPu/CsMBT6EujGw+060b uoiQ== X-Gm-Message-State: AOAM533HhvcUqf7cIX3kgrDt3wCDDkWw+QwW5wWEtPUvpnSLGp/6MTo+ WP8ahG2NqAvuLgIF6irDHuxvMgi02VMjuwijlIY= X-Google-Smtp-Source: ABdhPJzIUcheVX/98iz+0ZGiWWsYsNP4vtuskHdTp91giviDt7hqcbz1+xEgSQUefzW1ehXVkTRL0nB5vsY3NWZDzH8= X-Received: by 2002:a25:ac9:: with SMTP id 192mr2878005ybk.234.1634945388810; Fri, 22 Oct 2021 16:29:48 -0700 (PDT) MIME-Version: 1.0 References: <20211022030852.1986718-1-sjg@chromium.org> <20211021210847.v10.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> <3765086.1634891366@gemini.denx.de> <20211022142912.GF3577824@bill-the-cat> In-Reply-To: <20211022142912.GF3577824@bill-the-cat> From: Tony Dinh Date: Fri, 22 Oct 2021 16:29:37 -0700 Message-ID: Subject: Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file To: Tom Rini Cc: Wolfgang Denk , Simon Glass , U-Boot Mailing List , u-boot-board-maintainers@lists.denx.de, Rasmus Villemoes , u-boot-custodians@lists.denx.de, Heinrich Schuchardt , =?UTF-8?B?TWFyZWsgQmVow7pu?= , Joe Hershberger Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 Hi all, My 2 cents. As a maintainer for some hobbyist downstream u-boots (tracking mainline) and some out-of-tree u-boots, I do lots of envs scripting. The most common scenario for me is to create an env by combining 2 or more strings. Examples, init_usb, init_sata, init_sata_usb and so on, i.e concatenating "init" with the device name(s). The device names might be some other envs, and so on. Note that I used _ (underscore) and could end up with an env name that has trailing underscore. So I can see the trailing + in env names might occur often in some existing scripts. It's just my preference to use underscore, but someone else might use a + sign! OTOH, It never occurred to me that I can use a backward slash \ in env names. Since we use this escape character in ./include/configs/someboard.h CONFIG_EXTRA_ENV_SETTINGS as a linebreak, I think perhaps nobody would have attempted to make use of that in the env name. So I agree with Tom, we could disallow \ in env name, and use it as a separator during parsing. Such as in the following 2 assignments, the 1st is appending the string bar to foo, the 2nd is assigning the string bar to foo+. foo\+=bar foo+\=bar Thanks, Tony