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 A59D2C433EF for ; Wed, 6 Oct 2021 07:08:41 +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 690606112D for ; Wed, 6 Oct 2021 07:08:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 690606112D 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 DC07182BC7; Wed, 6 Oct 2021 09:08:37 +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=1633504118; bh=3nIvf3I20TnWw8WnYmHi31TqaKeEdeGRrXj5BWB+BK0=; h=To:cc:From:Subject:In-reply-to:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pPVZEY2HKc087kJRGHThDHphLyieLlDKN3k+CmZbfejZGY3Ae74OSkbbH3lZk6uI3 RmMGF94OFZA60zwNg2+t5r34lBsde96wf6k8dq2VsgFMzJVaZwvAroe4jmwPLlZpis xiU0H6nO/JJtXjTQxx/NABBqm8ZfWDjBk+LCf1cL1wZ3jqozgKFG8rd/Sj0z9TLOka 64VlcKMh0LLBCgwh2m/B2ypakfH67Adpl6uzymnMeHFrZT09BIe8oTxLnDIm1ECjUq 8YKxyoNijpve/8OIWAh4WI9Y7KVngv4v/ZtLnNCZUI/7urI/2iIwmFqC9hS5Z99hYr xzrqsYCXSpV+w== 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 9DD6C81918 for ; Wed, 6 Oct 2021 09:08:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1633504116; bh=3nIvf3I20TnWw8WnYmHi31TqaKeEdeGRrXj5BWB+BK0=; h=To:cc:From:Subject:In-reply-to:References:Date:From; b=IMA5TPp0pqESbcReG3R/49hbzItopnIVkmBMuoZHZQywFY5wHpzsvkGCBnflyXByb AiJCLY7Uvt2eD/dSnCP5OO/3eTr7FXFjaeAhJtco/s6kAdndxHViLoeP+lYHrn7jUs T6nE5dzCKByggWIS+x5tiFka3j2zqaYYgipJs5E3/1GYaIy9RVv+fQ/PdzVSIvS3cZ dJ04dt4pQyCdbK7J3v1ErUaoC3sNe430eFle2TPibFOZQSHs0UdoS8OjiR4nor1XDW iVMybTN/61SCIWO6syppEIKjz3QfvnYchwgSkBb4YcDQWiWbXb5tnVrMSEVMgwSqtL 6FfO9/3b6I4Aw== Received: by janitor.denx.de (Postfix, from userid 108) id 4AA4BA00A2; Wed, 6 Oct 2021 09:08:36 +0200 (CEST) Received: from gemini.denx.de (gemini.denx.de [10.4.0.2]) by janitor.denx.de (Postfix) with ESMTPS id 33687A0099; Wed, 6 Oct 2021 09:08:28 +0200 (CEST) Received: from gemini.denx.de (localhost [IPv6:::1]) by gemini.denx.de (Postfix) with ESMTP id 19CC21E0F1B; Wed, 6 Oct 2021 09:08:28 +0200 (CEST) To: Simon Glass cc: U-Boot Mailing List , Tom Rini , Joe Hershberger From: Wolfgang Denk Subject: Re: [PATCH v5 3/5] 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: References: <20211002003848.1803446-1-sjg@chromium.org> <20211001183842.v5.3.If789ba3e2667c46c03eda3386ca84a863baeda55@changeid> <2672911.1633349282@gemini.denx.de> <2738693.1633445755@gemini.denx.de> Comments: In-reply-to Simon Glass message dated "Tue, 05 Oct 2021 09:33:18 -0600." Date: Wed, 06 Oct 2021 09:08:28 +0200 Message-ID: <2772928.1633504108@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 you wrote: > > > 1) This requires that the .env files are run through CPP, which is > > only added in a later patch. > > OK perhaps I should just merge the patches. It is a bit artificial > having two and it seems that people agree we need the += syntax. Yes, some way to append to the environment is useful, and using '+=' is an intuitive syntax for it. I'm just not happy about sneeking in a new, undocumented restriction on U-Boot variable names. Yes, there are probably not many systems around (if any) where a variable name ends in a plus sign, but we should be consistent. I have to admit that I don't have any nice alternative suggestion. If we stick with the rule that only NUL and '=' cannot be used in a variable name, we could write variable=+value instead. But this does not look as nice as '+=', and we need an escape mechanism for the case where we want a simple assignment of a value that starts with a '+'. BTW: If we would add such a feature to U-Boot (which seems to be no bad idea to me) we would probably implement an "env append" command? > > 2) Even if I add an "#include board//env/common.env" in my > > .env files, your logic would trigger on the existence of > > the common.env file and ignore the .env files. > > OK, so I if reverse that, are you happy? What do you think about my > explanation above? The longer I think about it the more I wonder if any hard coded file names are really a good way to handle this. For example there might be the case where we have 4 boards A, B, C and D, and boards A and B would use one env file, and C and D would use another. this does not match the ".env" scheme, and "common.env" does not fit either, as we have two "common" files. I wonder if there should rather be a Kconfig option so each board can select it's env file name; default would be ".env". what do you think? 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 Life would be so much easier if we could just look at the source code. -- Dave Olson