diff options
author | Pali Rohár <pali@kernel.org> | 2020-12-23 12:21:28 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-02-08 08:52:50 +0100 |
commit | 93f4048bc2f00d2d1bda962701077ad1afbfacdf (patch) | |
tree | c53dc8ed10f44b899b50d9acc15d66835b011abf /include/env_default.h | |
parent | 3936fd998668846f77468d8f6a662e906920969c (diff) | |
download | u-boot-93f4048bc2f00d2d1bda962701077ad1afbfacdf.zip u-boot-93f4048bc2f00d2d1bda962701077ad1afbfacdf.tar.gz u-boot-93f4048bc2f00d2d1bda962701077ad1afbfacdf.tar.bz2 |
env: Allow to set default_environment[] from board code via compile option DEFAULT_ENV_IS_RW
This change allows board code to modify default_environment[] array when
compile option DEFAULT_ENV_IS_RW is specified in board config file.
Some board default variables depend on runtime configuration which is not
known at compile time. Therefore allow to set default_environment[] array
as non-const and allow board code to modify it when it is needed.
Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'include/env_default.h')
-rw-r--r-- | include/env_default.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/env_default.h b/include/env_default.h index 8a0c305..ea31a8e 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -19,6 +19,8 @@ env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = { { #elif defined(DEFAULT_ENV_INSTANCE_STATIC) static char default_environment[] = { +#elif defined(DEFAULT_ENV_IS_RW) +uchar default_environment[] = { #else const uchar default_environment[] = { #endif |