From 93f4048bc2f00d2d1bda962701077ad1afbfacdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Wed, 23 Dec 2020 12:21:28 +0100 Subject: env: Allow to set default_environment[] from board code via compile option DEFAULT_ENV_IS_RW MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Andre Heider --- include/env_default.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/env_default.h') diff --git a/include/env_default.h b/include/env_default.h index 8a0c3057f0a..ea31a8eddfa 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 -- cgit v1.2.3