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.
No related branches found
No related tags found
Showing
- MAINTAINERS 7 additions, 0 deletionsMAINTAINERS
- Makefile 65 additions, 1 deletionMakefile
- README 0 additions, 328 deletionsREADME
- board/sandbox/sandbox.env 25 additions, 0 deletionsboard/sandbox/sandbox.env
- boot/bootm_os.c 1 addition, 4 deletionsboot/bootm_os.c
- cmd/bootm.c 1 addition, 3 deletionscmd/bootm.c
- cmd/elf.c 1 addition, 2 deletionscmd/elf.c
- config.mk 2 additions, 0 deletionsconfig.mk
- doc/develop/environment.rst 51 additions, 0 deletionsdoc/develop/environment.rst
- doc/develop/index.rst 1 addition, 0 deletionsdoc/develop/index.rst
- doc/usage/environment.rst 465 additions, 0 deletionsdoc/usage/environment.rst
- doc/usage/index.rst 2 additions, 0 deletionsdoc/usage/index.rst
- env/Kconfig 18 additions, 0 deletionsenv/Kconfig
- env/common.c 5 additions, 0 deletionsenv/common.c
- env/embedded.c 1 addition, 0 deletionsenv/embedded.c
- include/configs/sandbox.h 0 additions, 40 deletionsinclude/configs/sandbox.h
- include/env.h 7 additions, 0 deletionsinclude/env.h
- include/env_default.h 11 additions, 0 deletionsinclude/env_default.h
- scripts/env2string.awk 80 additions, 0 deletionsscripts/env2string.awk
- test/py/tests/test_env.py 107 additions, 0 deletionstest/py/tests/test_env.py
Loading
Please register or sign in to comment