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 E5BF5C433EF for ; Tue, 19 Oct 2021 14:11:58 +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 6D98160EFE for ; Tue, 19 Oct 2021 14:11:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6D98160EFE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 D37D28281E; Tue, 19 Oct 2021 16:11:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="oSVBqe1p"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79DED8326F; Tue, 19 Oct 2021 16:11:54 +0200 (CEST) Received: from mail-vk1-xa36.google.com (mail-vk1-xa36.google.com [IPv6:2607:f8b0:4864:20::a36]) (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 C892C82006 for ; Tue, 19 Oct 2021 16:11:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vk1-xa36.google.com with SMTP id u206so3550442vke.10 for ; Tue, 19 Oct 2021 07:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=chUD+blsYb0slojQ3fPQLAtsREeyoOwjYxWlM/L7Xcc=; b=oSVBqe1p5H+pO0SRkjS5IKlBYgguZdMSoU37rdI9L6MUio/XHSXn1r7vhFuJKjoZKP oku2tXGDJLeE7R6d6rROMZwn/66Oh/zkh1WrzkNRVanv3MJoV1ZtTvFEq7hBcvjP6BYl DsY21fMp0WLH1AgMA+K0H9oMouqky57jJuPow= 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=chUD+blsYb0slojQ3fPQLAtsREeyoOwjYxWlM/L7Xcc=; b=DGmoFtjxfstID1/h/ZTl66pMsdNbeZ3X+qKNpxQ9V5t9jNuPndTCZevLs9aWzTT4cB H35FzxokcUHVFDhiyT/zBJKAIA+mgz1QV2FRvBjUGrvPRPW0hrn7xYD6qFeUNUCtACJs +Teo7DZleU1/Xh8F5bQiBIs1cQDIbxNtSOMeq6KRZUYncfp9CJ13kDUjOcbojhQMnqj1 gt7c9lsshOj3N0g3QF21wyOjbn2B5dEMUi+arQkQRrPzX3AN9IRo9+FaDBzlx/b+9YbV eRjxCfDzredxglE5qmFK91r5sj7/H9EsYLwIMrcrCxdG9/5FIU52yPNqgxDmAmcDQDdy djlg== X-Gm-Message-State: AOAM53362p6u64S1jXx8SW1YLrHT4Dwx7+G/Wv/SZtWPX3vEwG+i+/yZ 1CJk7VK0Q7cPcP6ZkroGu6UqBF0SUT0k3bVZW8nQug== X-Google-Smtp-Source: ABdhPJzwX0VkuXRVaVmbtdR6Q8dTdacIjSb1gJrogHAUNTXJDD6lSfwBDH/jA/hVamY5Y/2ophIF6JKAlhZSVKhYN34= X-Received: by 2002:a05:6122:218e:: with SMTP id j14mr15845405vkd.9.1634652709399; Tue, 19 Oct 2021 07:11:49 -0700 (PDT) MIME-Version: 1.0 References: <20211014182257.468649-1-sjg@chromium.org> <20211014122254.v6.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> <3341802.1634308345@gemini.denx.de> <3496103.1634558337@gemini.denx.de> <3546427.1634640369@gemini.denx.de> In-Reply-To: <3546427.1634640369@gemini.denx.de> From: Simon Glass Date: Tue, 19 Oct 2021 08:11:37 -0600 Message-ID: Subject: Re: [PATCH v6 4/7] env: Allow U-Boot scripts to be placed in a .env file To: Wolfgang Denk Cc: U-Boot Mailing List , Heinrich Schuchardt , Tom Rini , 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 Wolfgang, On Tue, 19 Oct 2021 at 04:46, Wolfgang Denk wrote: > > Dear Simon, > > In message you wrote: > > > > Can we just ban + ? > > Why? Just because your awk script is a lousy parser? > > > In the above, foo\+ gives an unknown escape sequence from the C > > preprocessor, then the whole line is ignored by the script > > Really? > > -> cat foo.c > #define A ampersand > #define B berta > > int foo = A \+ B ; > -> gcc -E foo.c > # 0 "foo.c" > # 0 "" > # 0 "" > # 1 "/usr/include/stdc-predef.h" 1 3 4 > # 0 "" 2 > # 1 "foo.c" > > > > int foo = ampersand \+ berta ; > > I do not see any such error message? I thought you were trying to use + at the end of a variable. I used: fred\+=aaa and got cc1: warning: unknown escape sequence: '\='' You can try it yourself by editing sandbox.env in the u-boot-dm/env-working tree. > > > > foo+ = bar produes a variable called "foo+ " in the environment with > > the value " bar" so you probably don't want that. > > This is only because your "parser" is very primitive and sensitive > even to minimal white space changes. Agreed. > > > My original motivation was the complexity of getting the env you want > > using #define > > > > My current motivation is to complete the CONFIG migration, now in its 8th year. > > I fully understand your motivation and appreciate your efforts. OK, so what exactly is needed here? I can do the above tweaks and the cover letter, but what else? Regards, Simon