]> git.baikalelectronics.ru Git - uboot.git/commit
Merge branch '2021-11-16-env-rework' into next
authorTom Rini <trini@konsulko.com>
Wed, 17 Nov 2021 01:55:12 +0000 (20:55 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 17 Nov 2021 01:55:12 +0000 (20:55 -0500)
commit67f7937038d89baf65de2846a92313e6b4978d2b
tree9e86d3aeaf5e46cd0e23bbb8bfc0e6e5406617e0
parent0ba1e220a3c0e1cf699a9e5ee4a1935d0ec47a95
parent4eac6c8743bf95fda8b1496aa230ce332712ba4b
Merge branch '2021-11-16-env-rework' into next

To quote Simon:

One barrier to completing the 7-year-long Kconfig migration is that
the default environment is implemented using ad-hoc CONFIG options.
At present U-Boot environment variables, and thus scripts, are defined
by CONFIG_EXTRA_ENV_SETTINGS.

It is not really feasible to move the environment to Kconfig as it is
hundreds of lines of text in some cases.

Even considering the current situation, it is painful to add large
amounts of text to the config-header 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.

This is already supported by the CONFIG_USE_DEFAULT_ENV_FILE feature. But
that does not support use of CONFIG options or comments, so is best suited
for use by other build systems wanting to define the U-Boot environment.

Add a feature that brings in a .env file associated with the board
config, if present. To use it, create a file board/<vendor>/<board>.env or
use CONFIG_ENV_SOURCE_FILE to set a filename.

The environment variables should be of the form "var=value". Values can
extend to multiple lines. This series converts the existing environment
documentation to rST and updates it to explain how to use this.