[RFC PATCH] Provide mechanism for build-time default env entries

Wolfgang Denk wd at denx.de
Mon Jan 20 17:51:19 CET 2020


Dear Joel,

In message <20200119073738.29189-1-mrjoel at lixil.net> you wrote:
> This enables the building user to specify environment values to be
> included in the static default_environment with an image. This is
> useful to build multiple otherwise like configured images, varying
> by environment unique entries.
>
> ---
>
> I expected something like this to already be present, but couldn't
> find such a mechanism. I also assumed that something similar may
> have been proposed previously, but also couldn't find anything via
> searching.
...

> +config USER_ENV_SETTINGS
> +	string "User build-time additional environment entries"
> +	help
> +	  This value is reserved for the building user to provide custom
> +	  environment entries to be added to the default environment. Care must
> +	  be taken to not break the environment, incompatible entries may cause
> +	  failure to compile, or failure of the target board to properly
> +	  initialize or boot. The format is key=value pairs, with entries
> +	  separated by C-style escaped null terminated values, such as:
> +	    "key1=valueA\0key2=valueB\0key3=valueC".

Something in your descripotion must be missing, or this change makes
no sense to me.

>  #ifdef	CONFIG_EXTRA_ENV_SETTINGS
>  	CONFIG_EXTRA_ENV_SETTINGS
> +#endif
> +#ifdef	CONFIG_USER_ENV_SETTINGS
> +	CONFIG_USER_ENV_SETTINGS
>  #endif

What exactly is the difference between CONFIG_EXTRA_ENV_SETTINGS and
CONFIG_USER_ENV_SETTINGS for you, i. e. what can you do with
CONFIG_USER_ENV_SETTINGS that cannot be done in exatly the same way
with CONFIG_EXTRA_ENV_SETTINGS?

Maybe it would help if you include any code that is actually using
this feature?

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 at denx.de
A supercomputer is a machine that runs an endless loop in 2 seconds.


More information about the U-Boot mailing list