[PATCH v9 3/7] env: Allow U-Boot scripts to be placed in a .env file

Wolfgang Denk wd at denx.de
Thu Oct 21 11:50:02 CEST 2021


Dear Simon,

In message <20211019164418.v9.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe at changeid> you 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.
>
> 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>
> directory, typically called <board>.env and controlled by the
> CONFIG_ENV_SOURCE_FILE option.
>
> 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. Note that variables names may
> not end in + due to the += syntax below.

I still object to placing new, arbitrary restrictions on what may or
may not be used in environment variable names.

We have discussed alternative implementations, and trivial changes
like using "=+" instead of "+=" as append operator do not require
such restictions.

Thus, and only for the restictions on variable names:

Naked-by: Wolfgang Denk <wd at denx.de>

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
There is is no reason for any individual to have a computer in  their
home.      -- Ken Olsen (President of Digital Equipment Corporation),
              Convention of the World Future Society, in Boston, 1977


More information about the U-Boot mailing list