[PoC 011/241] global: Migrate CONFIG_ENV_IS_EMBEDDED to CFG
Tom Rini
trini at konsulko.com
Sun Nov 20 14:30:02 CET 2022
Signed-off-by: Tom Rini <trini at konsulko.com>
---
env/Makefile | 2 +-
include/env_internal.h | 12 ++++++------
scripts/config_whitelist.txt | 2 +-
tools/Makefile | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/env/Makefile b/env/Makefile
index c4ad65432865..78e82173507f 100644
--- a/env/Makefile
+++ b/env/Makefile
@@ -11,7 +11,7 @@ obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += flags.o
ifndef CONFIG_SPL_BUILD
obj-y += callback.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
-extra-$(CONFIG_ENV_IS_EMBEDDED) += embedded.o
+extra-$(CFG_ENV_IS_EMBEDDED) += embedded.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += embedded.o
extra-$(CONFIG_ENV_IS_IN_FLASH) += embedded.o
obj-$(CONFIG_ENV_IS_IN_NVRAM) += embedded.o
diff --git a/include/env_internal.h b/include/env_internal.h
index f30fd6159d87..690e6da81078 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -41,8 +41,8 @@
(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
# define ENV_IS_EMBEDDED
# endif
-# ifdef CONFIG_ENV_IS_EMBEDDED
-# error "do not define CONFIG_ENV_IS_EMBEDDED in your board config"
+# ifdef CFG_ENV_IS_EMBEDDED
+# error "do not define CFG_ENV_IS_EMBEDDED in your board config"
# error "it is calculated automatically for you"
# endif
#endif /* CONFIG_ENV_IS_IN_FLASH */
@@ -61,15 +61,15 @@ extern unsigned long nand_env_oob_offset;
* For the flash types where embedded env is supported, but it cannot be
* calculated automatically (i.e. NAND), take the board opt-in.
*/
-#if defined(CONFIG_ENV_IS_EMBEDDED) && !defined(ENV_IS_EMBEDDED)
+#if defined(CFG_ENV_IS_EMBEDDED) && !defined(ENV_IS_EMBEDDED)
# define ENV_IS_EMBEDDED
#endif
/* The build system likes to know if the env is embedded */
#ifdef DO_DEPS_ONLY
# ifdef ENV_IS_EMBEDDED
-# ifndef CONFIG_ENV_IS_EMBEDDED
-# define CONFIG_ENV_IS_EMBEDDED
+# ifndef CFG_ENV_IS_EMBEDDED
+# define CFG_ENV_IS_EMBEDDED
# endif
# endif
#endif
@@ -88,7 +88,7 @@ extern unsigned long nand_env_oob_offset;
* If the environment is in RAM, allocate extra space for it in the malloc
* region.
*/
-#if defined(CONFIG_ENV_IS_EMBEDDED)
+#if defined(CFG_ENV_IS_EMBEDDED)
#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN
#elif (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE < CONFIG_SYS_MONITOR_BASE) || \
(CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) || \
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 8d9496e6edba..040b0c89049a 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -11,7 +11,7 @@ CFG_DM9000_NO_SROM
CFG_DM9000_USE_16BIT
CFG_DW_WDT_CLOCK_KHZ
CFG_ENV_FLAGS_LIST_STATIC
-CONFIG_ENV_IS_EMBEDDED
+CFG_ENV_IS_EMBEDDED
CONFIG_ENV_SETTINGS_BUTTONS_AND_LEDS
CONFIG_ENV_SETTINGS_NAND_V1
CONFIG_ENV_SETTINGS_NAND_V2
diff --git a/tools/Makefile b/tools/Makefile
index 26be0a7ba2ea..b76876307a74 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -36,7 +36,7 @@ endif
subdir-$(HOST_TOOLS_ALL) += gdb
# Merge all the different vars for envcrc into one
-ENVCRC-$(CONFIG_ENV_IS_EMBEDDED) = y
+ENVCRC-$(CFG_ENV_IS_EMBEDDED) = y
ENVCRC-$(CONFIG_ENV_IS_IN_EEPROM) = y
ENVCRC-$(CONFIG_ENV_IS_IN_FLASH) = y
ENVCRC-$(CONFIG_ENV_IS_IN_ONENAND) = y
--
2.25.1
More information about the U-Boot
mailing list