env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS
Rasmus Villemoes
rasmus.villemoes at prevas.dk
Fri Jul 12 10:14:27 CEST 2024
Tony Dinh <mibodhi at 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
More information about the U-Boot
mailing list