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 F1372C433F5 for ; Mon, 4 Oct 2021 15:39:14 +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 44CE661354 for ; Mon, 4 Oct 2021 15:39:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 44CE661354 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 661C380EFB; Mon, 4 Oct 2021 17:39:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="mXiEbEN8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 45AFF82D85; Mon, 4 Oct 2021 17:39:09 +0200 (CEST) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 A9A7480234 for ; Mon, 4 Oct 2021 17:39:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82c.google.com with SMTP id x9so6064406qtv.0 for ; Mon, 04 Oct 2021 08:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sxG9l54iaYTCfJtmyAPpxCAxBSo8qN4P80tydjX4H5I=; b=mXiEbEN8VuWNXew0xvRAVyaGYq50MYFi0uWUQ1xJWxi2zfKAscdPxPDTYFMS89MHc7 dTDOMJSFUXtMf6rqcIKqepdJdmskjgP2o8YuFHYrhGeB2exIszVtm2QeEcYlcB1CgFbO jrUPeSrvJSqqTcYCDBo7vsdNntsBKMcn8RXEk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sxG9l54iaYTCfJtmyAPpxCAxBSo8qN4P80tydjX4H5I=; b=jRqTUgmEYDvms+76N96/G0eyAZLGfui/nbyXXPLcqVG1wBvaWXgzbiWv6w3Bj0uzIr 1+em4BmjKIdVDvwzmdSnYbg4gNWy7ThBM8HyCABAFkC1NKoIJFQcfMcsFYHk595tmtLV nGU4zb/0VihsV87BtH7K4aCDY60kLU7AbF1LXHUZb+SX79CzRJnk0Y1Sf+w6jw/JbTyJ 9qJ413+OUsDnamvjr/Uhk9y64IN1sOTmSfKJmr8/45J6Lc0XQZk8butPvg7eYI2YlQkP N4iVuN+KKqT3rqUarfJpf9vy9lk59cIKWSGhQHATlcWEgrCJE8A4+ot7gGBYD6Lp+xb9 BAdA== X-Gm-Message-State: AOAM533dexb/iqvAuczhp59M7tcLoPK+3DRdSQl4oOvaM7e52iod9FSk Y5nt0UeTbH8jcv9vWDSiMiS9uQ== X-Google-Smtp-Source: ABdhPJxvKZuCU94VyGhyfqt3QijF0YufIXOEz3a9TZsSeqo8t4Tt9n3pzzRVq2tXHwiOwCzrAfeFrQ== X-Received: by 2002:ac8:4089:: with SMTP id p9mr13810293qtl.363.1633361941508; Mon, 04 Oct 2021 08:39:01 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-ddc6-c860-2365-fdf8.res6.spectrum.com. [2603:6081:7b01:cbda:ddc6:c860:2365:fdf8]) by smtp.gmail.com with ESMTPSA id d14sm8304445qkg.49.2021.10.04.08.39.00 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Oct 2021 08:39:00 -0700 (PDT) Date: Mon, 4 Oct 2021 11:38:59 -0400 From: Tom Rini To: Rasmus Villemoes Cc: Simon Glass , U-Boot Mailing List , Wolfgang Denk , Joe Hershberger Subject: Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file Message-ID: <20211004153859.GS31748@bill-the-cat> References: <20211002003848.1803446-1-sjg@chromium.org> <20211001183842.v5.3.If789ba3e2667c46c03eda3386ca84a863baeda55@changeid> <6bfe8f7a-b769-cf9f-f60e-0998446b3085@prevas.dk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X5TzrvuL/bN6Igmx" Content-Disposition: inline In-Reply-To: <6bfe8f7a-b769-cf9f-f60e-0998446b3085@prevas.dk> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --X5TzrvuL/bN6Igmx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 04, 2021 at 09:28:43AM +0200, Rasmus Villemoes wrote: > On 02/10/2021 02.38, Simon Glass 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. >=20 > Indeed, the pain of CONFIG_EXTRA_ENV_SETTINGS was part of the motivation > for introducing CONFIG_USE_DEFAULT_ENV_FILE. >=20 > > 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//env > > directory called .env (or common.env if you want the same > > environment for all boards). > >=20 > > The environment variables should be of the form "var=3Dvalue". Values c= an > > extend to multiple lines. See the README under 'Environment Variables:' > > for more information and an example. > >=20 > > Comments are not permitted in the environment with this commit. >=20 > Perhaps some remarks on how this compares/relates to > CONFIG_USE_DEFAULT_ENV_FILE and CONFIG_ENV_IMPORT_FDT would be in order? > In particular, the latter seems like it could already do the "amend the > environent per vendor/board" with appropriate settings in the > -u-boot.dtsi files? >=20 > I don't think either of those currently support using CONFIG_ variables > in the definitions, but perhaps that could be fixed. >=20 > I don't have anything against these patches as such, I'd just like to > understand precisely what they bring that cannot already be done with > existing mechanisms. So, the high level requirement is to move the environment out of the board.h file (or the nest of #includes that uses to cobble it together). That does mean that CONFIG_USE_DEFAULT_ENV_FILE at least would likely need some tweaking, but may also be just not as useful, if it's no longer such a pain to modify the default environment. --=20 Tom --X5TzrvuL/bN6Igmx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFbIAkACgkQFHw5/5Y0 tyyxyQv+Ptqz3Y+wMsbKesFw9+/Jhw/FUCOAjSOplWW8WrshaUV1nxMi3d6rA1Yx sHQ+3c7IlxYldua0w6hW2jpOmbctY+NOoWASZpTWI7dmwiowjYROYt7Is12xMcdK QAx1yijpm3mJYgmIY1Dxog13GSbxislS2I80Zg7zoGC18+GafNtxzraK1tk9K7HT Y1EdGl2TxMlwWLrWsHYQ7tW5y3AItUf5gjHz5gkHMaVQXSHiUtc1Fu3Q4HCY810E Bok6Q2+/g0MEkG6akNRWLKbA58y6AhWCeB8seJkJy1/QDVW3HERe6k3kjgms217y V/AisJjz+wEm5dfWJz794fahSl6Hvsc/bqsvJDmzXS0hnZh77nuZw7d4BiyaPKjN xV5Z2TmxSU6WLN5VQzqnjDe5zfLSGeqZSLsfL/ZY4LgrbFcKWBhYCcnLd/QCW3Qp kwdzZy7WJQdSqYC7YgQiRiA4RLzoH+I0e/1Bno2rMg8qQeZME2zUllN90hi6iwOT yjPKJkqZ =dGm1 -----END PGP SIGNATURE----- --X5TzrvuL/bN6Igmx--