From 5cf6a06ae8835738121e39c0f6c581d4a669f651 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 13 Jun 2022 22:57:30 -0400 Subject: env: Do not make CONFIG_EXTRA_ENV_TEXT and CONFIG_EXTRA_ENV_SETTINGS conflict Largely, the use of CONFIG_EXTRA_ENV_SETTINGS can be migrated directly to come from CONFIG_EXTRA_ENV_TEXT. The biggest case that cannot easily be migrated is distro_bootcmd support. Rather than block migration on this, remove the #error here so that we can being moving forward. Cc: Joe Hershberger Cc: Wolfgang Denk Cc: Simon Glass Signed-off-by: Tom Rini --- include/env_default.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/env_default.h') diff --git a/include/env_default.h b/include/env_default.h index 7004a6fef29..7113e08e6b0 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -109,9 +109,6 @@ const char default_environment[] = { "bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0" #endif #ifdef CONFIG_EXTRA_ENV_TEXT -# ifdef CONFIG_EXTRA_ENV_SETTINGS -# error "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS" -# endif /* This is created in the Makefile */ CONFIG_EXTRA_ENV_TEXT #endif -- cgit v1.2.3 From bf904ea41883d7dacd77a1c257d10cc89a0ec394 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 13 Jun 2022 22:57:35 -0400 Subject: Rename CONFIG_SYS_AUTOLAOD to CONFIG_SYS_DISABLE_AUTOLOAD The "autoload" environment variable is always checked with env_get_yesno as it can be set to any form of no. The default behavior of env_get_yesno is to return -1 on variables that are not set, which acts as true in general (we test for non-zero return). To convert CONFIG_SYS_AUTOLOAD to Kconfig, given that it was almost always used to set autoload to no, first rename to CONFIG_SYS_DISABLE_AUTOLOAD for consistency sake. Then, make it so that if enabled we set autoload=0 in the default environment. Migrate all platforms which set CONFIG_SYS_AUTOLOAD to non-true or that set autoload to false in their default environment to using CONFIG_SYS_DISABLE_AUTOLOAD Signed-off-by: Tom Rini --- include/env_default.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/env_default.h') diff --git a/include/env_default.h b/include/env_default.h index 7113e08e6b0..d1508b3ff44 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -59,8 +59,8 @@ const char default_environment[] = { #ifdef CONFIG_SERVERIP "serverip=" __stringify(CONFIG_SERVERIP) "\0" #endif -#ifdef CONFIG_SYS_AUTOLOAD - "autoload=" CONFIG_SYS_AUTOLOAD "\0" +#ifdef CONFIG_SYS_DISABLE_AUTOLOAD + "autoload=0\0" #endif #ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0" -- cgit v1.2.3 From a331017c237c7da159a1657984250d656ed1c487 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 13 Jun 2022 22:57:36 -0400 Subject: Complete migration of MTDPARTS_DEFAULT / MTDIDS_DEFAULT, include in environment - Ensure that everyone setting mtdids= and mtdparts= is doing so via the CONFIG options. - If the CONFIG options are set, ensure that the default environment sets mtdparts / mtdids. Signed-off-by: Tom Rini --- include/env_default.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/env_default.h') diff --git a/include/env_default.h b/include/env_default.h index d1508b3ff44..4e461c815a7 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -108,6 +108,12 @@ const char default_environment[] = { #if defined(CONFIG_BOOTCOUNT_BOOTLIMIT) && (CONFIG_BOOTCOUNT_BOOTLIMIT > 0) "bootlimit=" __stringify(CONFIG_BOOTCOUNT_BOOTLIMIT)"\0" #endif +#ifdef CONFIG_MTDIDS_DEFAULT + "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" +#endif +#ifdef CONFIG_MTDPARTS_DEFAULT + "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" +#endif #ifdef CONFIG_EXTRA_ENV_TEXT /* This is created in the Makefile */ CONFIG_EXTRA_ENV_TEXT -- cgit v1.2.3