diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2018-03-20 13:38:45 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-04-07 03:45:28 +0300 |
commit | f3d8f7dd73ac5dde258eb786d4a01869395b56d7 (patch) | |
tree | ac0438620f8ac9bacd7a390ec03f05f6ad50dd01 /env/Kconfig | |
parent | 11dfd1a331e915b17f3dd25c4ca98382d400719e (diff) | |
download | u-boot-f3d8f7dd73ac5dde258eb786d4a01869395b56d7.tar.xz |
Allow providing default environment from file
Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is
somewhat inflexible, partly because the cpp language does not allow
appending to an existing macro. This prevents reuse of "environment
fragments" for different boards, which in turn makes maintaining that
environment consistently tedious and error-prone.
This implements a Kconfig option for allowing one to define the entire
default environment in an external file, which can then, for example, be
generated programmatically as part of a Yocto recipe, or simply be kept
in version control separately from the U-boot repository.
Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'env/Kconfig')
-rw-r--r-- | env/Kconfig | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/env/Kconfig b/env/Kconfig index 3bc1a35f65..680441c74c 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -479,4 +479,22 @@ config ENV_SIZE endif +config USE_DEFAULT_ENV_FILE + bool "Create default environment from file" + help + Normally, the default environment is automatically generated + based on the settings of various CONFIG_* options, as well + as the CONFIG_EXTRA_ENV_SETTINGS. By selecting this option, + you can instead define the entire default environment in an + external file. + +config DEFAULT_ENV_FILE + string "Path to default environment file" + depends on USE_DEFAULT_ENV_FILE + help + The path containing the default environment. The format is + the same as accepted by the mkenvimage tool: lines + containing key=value pairs, blank lines and lines beginning + with # are ignored. + endmenu |