summaryrefslogtreecommitdiff
path: root/include/env_internal.h
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2020-12-23 14:21:28 +0300
committerStefan Roese <sr@denx.de>2021-02-08 10:52:50 +0300
commit93f4048bc2f00d2d1bda962701077ad1afbfacdf (patch)
treec53dc8ed10f44b899b50d9acc15d66835b011abf /include/env_internal.h
parent3936fd998668846f77468d8f6a662e906920969c (diff)
downloadu-boot-93f4048bc2f00d2d1bda962701077ad1afbfacdf.tar.xz
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_internal.h')
-rw-r--r--include/env_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/env_internal.h b/include/env_internal.h
index b26dc6239c..708c833a55 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -111,7 +111,11 @@ typedef struct environment_s {
extern env_t embedded_environment;
#endif /* ENV_IS_EMBEDDED */
+#ifdef DEFAULT_ENV_IS_RW
+extern unsigned char default_environment[];
+#else
extern const unsigned char default_environment[];
+#endif
#ifndef DO_DEPS_ONLY