From: Tom Rini <trini@konsulko.com>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Simon Glass <sjg@chromium.org>,
U-Boot Mailing List <u-boot@lists.denx.de>,
Wolfgang Denk <wd@denx.de>,
Joe Hershberger <joe.hershberger@ni.com>
Subject: Re: [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file
Date: Mon, 4 Oct 2021 11:38:59 -0400 [thread overview]
Message-ID: <20211004153859.GS31748@bill-the-cat> (raw)
In-Reply-To: <6bfe8f7a-b769-cf9f-f60e-0998446b3085@prevas.dk>
[-- Attachment #1: Type: text/plain, Size: 2082 bytes --]
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.
>
> Indeed, the pain of CONFIG_EXTRA_ENV_SETTINGS was part of the motivation
> for introducing CONFIG_USE_DEFAULT_ENV_FILE.
>
> > 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/<vendor>/env
> > directory called <board>.env (or common.env if you want the same
> > environment for all boards).
> >
> > 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.
> >
> > Comments are not permitted in the environment with this commit.
>
> 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?
>
> I don't think either of those currently support using CONFIG_ variables
> in the definitions, but perhaps that could be fixed.
>
> 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.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2021-10-04 15:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-02 0:38 [PATCH v5 0/5] env: Allow environment in text files Simon Glass
2021-10-02 0:38 ` [PATCH v5 1/5] sandbox: Drop distro_boot Simon Glass
2021-10-02 0:38 ` [PATCH v5 2/5] doc: Move environment documentation to rST Simon Glass
2021-10-04 12:05 ` Wolfgang Denk
2021-10-02 0:38 ` [PATCH v5 3/5] env: Allow U-Boot scripts to be placed in a .env file Simon Glass
2021-10-04 7:28 ` Rasmus Villemoes
2021-10-04 15:38 ` Tom Rini [this message]
2021-10-05 14:42 ` Simon Glass
2021-10-04 12:08 ` Wolfgang Denk
2021-10-05 14:42 ` Simon Glass
2021-10-05 14:55 ` Wolfgang Denk
2021-10-05 15:33 ` Simon Glass
2021-10-05 15:52 ` Tom Rini
2021-10-05 17:27 ` Simon Glass
2021-10-06 7:08 ` Wolfgang Denk
2021-10-02 0:38 ` [PATCH v5 4/5] env: Allow environment files to use the C preprocessor Simon Glass
2021-10-04 12:12 ` Wolfgang Denk
2021-10-02 0:38 ` [PATCH v5 5/5] sandbox: Use a text-based environment Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211004153859.GS31748@bill-the-cat \
--to=trini@konsulko.com \
--cc=joe.hershberger@ni.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=wd@denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.