All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Tony Dinh <mibodhi@gmail.com>
Cc: Tom Rini <trini@konsulko.com>,
	 U-Boot Mailing List <u-boot@lists.denx.de>,
	 Phil Sutter <phil@nwl.cc>
Subject: Re: env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS
Date: Fri, 12 Jul 2024 10:14:27 +0200	[thread overview]
Message-ID: <87o773m3h8.fsf@prevas.dk> (raw)
In-Reply-To: <CAJaLiFzx140yJxPs=x+1Rm0+j+xT3cXBN8svqaq6XW9_D1CHyw@mail.gmail.com> (Tony Dinh's message of "Thu, 11 Jul 2024 13:31:34 -0700")

Tony Dinh <mibodhi@gmail.com> writes:

> Hi Tom,
>
> I'm trying to move some envs from a board header file to the default
> env file. I recall that the envs in CONFIG_DEFAULT_ENV_FILE are
> appended to the envs in CFG_EXTRA_ENV_SETTINGS. As you mentioned here
> before:
>
> https://lore.kernel.org/all/20220810170439.GJ1146598@bill-the-cat/
>
> But it looks like envs in CFG_EXTRA_ENV_SETTINGS are completely
> erased, and then the envs are populated with what's in
> CONFIG_DEFAULT_ENV_FILE.
>

Author of CONFIG_DEFAULT_ENV_FILE here.

Yes, the point of that option is that you supply the entire and full
intended default environment in that file. No U-Boot CONFIG_ options of
CFG_* defines or anything else affects what goes into the default env
when that option is used. [At run-time, U-Boot probably injects/sets a
few env vars, but that's true regardless of how the default env came to
be].

I think there may be some confusion with the much newer
CONFIG_ENV_SOURCE_FILE, which is another mechanism entirely. In that
case the pointed-to source file is sent through cpp, thus allowing some
u-boot config stuff to be used/referenced, and I think some further
bells-and-whistles also exist. I don't know if CFG_EXTRA_ENV_SETTINGS
are taken into account in that case or not.

Rasmus

  parent reply	other threads:[~2024-07-12  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 20:31 env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS Tony Dinh
2024-07-11 22:46 ` Tom Rini
2024-07-12  0:31   ` Tony Dinh
2024-07-12  8:14 ` Rasmus Villemoes [this message]
2024-07-12 16:50   ` Tom Rini
2024-07-12 19:28     ` Tony Dinh

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=87o773m3h8.fsf@prevas.dk \
    --to=rasmus.villemoes@prevas.dk \
    --cc=mibodhi@gmail.com \
    --cc=phil@nwl.cc \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.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.