
Dear Simon,
In message 20211019164418.v9.3.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@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@denx.de
Best regards,
Wolfgang Denk