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 B8F23C433EF for ; Fri, 22 Oct 2021 08:29:38 +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 02F8D6108D for ; Fri, 22 Oct 2021 08:29:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 02F8D6108D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de 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 DAECB834C9; Fri, 22 Oct 2021 10:29:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634891376; bh=D56WmDo2rmgyusPRjT5WYQiMSeNdm1YuFa4hfJFEDb4=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uEeshRZQNpDE0B2p6f92I17SsVtWh1cUtx1L0w2/TGU3Yjm3RcDsE1s0EPsNkbgli 4aDuleL++xMq9kVBoGvug7U0GE+5gwOAi0mSAxqyzQrYi2PI4ITgzAfrFcIT5jp0+5 lZk1/ag01yCkg3Z59bazqj5Qpu0xUhhSeKgKGWWEEzwfDbAWh8YmWfW9O/dq3emmbE hfItNk/uBAmaxjnERW7w8t0kbUqr61Lx6tsOI59uj0kaPO1TLJcBznJBNMA31Tj2Ab 4Uavo0JXBAVzSL2qOXlEwIF7MhKZBmUxdX5RNlhmXyp5bq9sb3+feGnYn93h7K0Rod wfY7clTNjXH6g== Received: from janitor.denx.de (unknown [62.91.23.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: noc@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id C08D9834BD; Fri, 22 Oct 2021 10:29:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1634891373; bh=D56WmDo2rmgyusPRjT5WYQiMSeNdm1YuFa4hfJFEDb4=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=A5yR7bbFfPIrL+l2qc3T6r/Pm3hrGCFHX3Rwj3lfBKaduRm+fmeN2yV+zLVZkITsj ynomdn6PqoJefGauwySMU2hkvQsbOCSNDe/Pt5LhKUxC2A9k+F5fsPd3CfuyUIFzo5 trk6Gf3VOqmj2vK9jLpo9reAzkLj2HxBETFrmMJNiOSgHtvBwokuZ+eJiLOL2l0wDC l1HkQ6zCO4HIiP1ehA1ENP7XJ8V1KwD8Qs6+sEpJ/XXpa+50ljtrxPlhtARg5ExckH RZ+kRC9j2lmHsmohZEx3OyiLkS+nrFqscJ47pHqZ7HNEoDdL7NEnMirTbEL29ILNOS aIMqPdemJ6QZw== Received: by janitor.denx.de (Postfix, from userid 108) id 746CBA0162; Fri, 22 Oct 2021 10:29:33 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id 8F9E4A0060; Fri, 22 Oct 2021 10:29:26 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id 33CFF1E0F1B; Fri, 22 Oct 2021 10:29:26 +0200 (CEST) To: Simon Glass cc: U-Boot Mailing List , u-boot-board-maintainers@lists.denx.de, Rasmus Villemoes , u-boot-custodians@lists.denx.de, Tom Rini , Heinrich Schuchardt , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Joe Hershberger From: Wolfgang Denk Subject: Re: [PATCH v10 3/9] env: Allow U-Boot scripts to be placed in a .env file MIME-Version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8bit In-reply-to: <20211021210847.v10.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> References: <20211022030852.1986718-1-sjg@chromium.org> <20211021210847.v10.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> Comments: In-reply-to Simon Glass message dated "Thu, 21 Oct 2021 21:08:46 -0600." Date: Fri, 22 Oct 2021 10:29:26 +0200 Message-ID: <3765086.1634891366@gemini.denx.de> 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 Dear Simon, In message <20211021210847.v10.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> you wrote: > At present U-Boot environment variables, and thus scripts, are defined > by CONFIG_EXTRA_ENV_SETTINGS. It is painful to add large amounts of text > to this file and dealing with quoting and newlines is harder than it > should be. It would be better if we could just type the script into a > text file and have it included by U-Boot. > > Add a feature that brings in a .env file associated with the board > config, if present. To use it, create a file in a board/ > directory, typically called .env and controlled by the > CONFIG_ENV_SOURCE_FILE option. > > The environment variables should be of the form "var=value". Values can > extend to multiple lines. See the README under 'Environment Variables:' > for more information and an example. The README does not contain this information as it has been moved into doc/usage/environment.rst I think the documentation is lacking a hint that multiline definitions will always be separated by spaces. > Also support += to allow variables to be appended to. This is needed when > using the preprocessor. I cannot see what the preprocessor has to do with this feature. It would be useful in any case, even without the preporcessor. The documentation reads: "Variables can contain `+` characters but in the unlikely event that you want to have a variable name ending in plus, put a backslash before the `+` so that the script knows you are not adding to an existing variable but assigning to a new one:: maximum\+=value " However, '\' is also a legal character in a variable name (and doubled backslashes or apostrophes etc. are legal, too), so above line should actually set the environment variable "maximum\+" to "value". Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Steal five dollars and you were a petty thief. Steal thousands of dollars and you are either a government or a hero. - Terry Pratchett, _Going_Postal_