From 0f44d5549ed814744b95b2450fbacfa14192587d Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 9 Jun 2025 21:26:39 +0200 Subject: env: Rename SYS_MMC_ENV_DEV to ENV_MMC_DEVICE_INDEX Rename the variable and add ENV_ prefix, so that all configuration options which are related to environment would have an CONFIG_ENV_ prefix. No functional change. Use ENV_MMC_DEVICE_INDEX to clarify this is the SD/MMC device index, a number, as enumerated by U-Boot. Update the help text accordingly. Signed-off-by: Marek Vasut --- doc/device-tree-bindings/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/device-tree-bindings/config.txt b/doc/device-tree-bindings/config.txt index f50c68bbdc3..a617e7f84f8 100644 --- a/doc/device-tree-bindings/config.txt +++ b/doc/device-tree-bindings/config.txt @@ -70,7 +70,7 @@ u-boot,mmc-env-offset-redundant (int) u-boot,mmc-env-partition (int) if present, the environment shall be placed at the last CONFIG_ENV_SIZE blocks of the partition on the - CONFIG_SYS_MMC_ENV_DEV. + CONFIG_ENV_MMC_DEVICE_INDEX. if u-boot,mmc-env-offset* is present, this setting will take precedence. In that case, only if the partition is not found, -- cgit v1.3.1 From ffc4914703a2b897d51e3412703b1d4f42081b42 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 9 Jun 2025 21:26:41 +0200 Subject: env: Rename ENV_MMC_PARTITION to ENV_MMC_SW_PARTITION Rename the variable and add ENV_ prefix, so that all configuration options which are related to environment would have an CONFIG_ENV_ prefix. No functional change. Use ENV_MMC_SW_PARTITION to clarify this is the SD/MMC software partition table entry selector. Update the help text accordingly. Signed-off-by: Marek Vasut --- doc/device-tree-bindings/config.txt | 2 +- env/Kconfig | 19 +++++++++++-------- env/mmc.c | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/device-tree-bindings/config.txt b/doc/device-tree-bindings/config.txt index a617e7f84f8..fffb69e75de 100644 --- a/doc/device-tree-bindings/config.txt +++ b/doc/device-tree-bindings/config.txt @@ -76,7 +76,7 @@ u-boot,mmc-env-partition (int) precedence. In that case, only if the partition is not found, mmc-env-offset* will be tried. - Note that CONFIG_ENV_MMC_PARTITION overrides this device-tree setting. + Note that CONFIG_ENV_MMC_SW_PARTITION overrides this device-tree setting. u-boot,no-apm-finalize (bool) For x86 devices running on coreboot, this tells U-Boot not to lock diff --git a/env/Kconfig b/env/Kconfig index 3317f3c5603..52f5cb86584 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -719,17 +719,20 @@ config ENV_MMC_EMMC_HW_PARTITION partition 0 or the first boot partition, which is 1 or some other defined partition. -config USE_ENV_MMC_PARTITION - bool "use the mmc environment partition name" +config ENV_MMC_USE_SW_PARTITION + bool "Use SD/MMC environment software partition name" depends on ENV_IS_IN_MMC -config ENV_MMC_PARTITION - string "mmc environment partition name" - depends on USE_ENV_MMC_PARTITION +config ENV_MMC_SW_PARTITION + bool "SD/MMC environment software partition name" + depends on ENV_MMC_USE_SW_PARTITION help - MMC partition name used to save environment variables. - If this variable is unset, u-boot will try to get the env partition name - from the device-tree's /config node. + SD/MMC software partition name used to save environment variables. + This is a software partition name, i.e. one in partition table, not + an eMMC HW partition (see ENV_MMC_EMMC_HW_PARTITION for eMMC HW + partition configuration). If this variable is unset, u-boot will + try to get the env partition name from the device-tree's /config + node. config ENV_MMC_USE_DT bool "Read partition name and offset in DT" diff --git a/env/mmc.c b/env/mmc.c index 5d1cb78e5ca..11375bd4464 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -161,8 +161,8 @@ static inline s64 mmc_offset(struct mmc *mmc, int copy) hwpart = mmc_get_env_part(mmc); #endif -#if defined(CONFIG_ENV_MMC_PARTITION) - str = CONFIG_ENV_MMC_PARTITION; +#if defined(CONFIG_ENV_MMC_SW_PARTITION) + str = CONFIG_ENV_MMC_SW_PARTITION; #else /* look for the partition in mmc CONFIG_ENV_MMC_DEVICE_INDEX */ str = ofnode_conf_read_str(dt_prop.partition); -- cgit v1.3.1 From fb5235239aad43c41d528b2e6c8bd6c7b390cde1 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 9 Jun 2025 21:26:42 +0200 Subject: env: Rename DEFAULT_ENV_FILE to ENV_DEFAULT_ENV_TEXT_FILE Rename the variable and add ENV_ prefix, so that all configuration options which are related to environment would have an CONFIG_ENV_ prefix. No functional change. Also rename USE_DEFAULT_ENV_FILE to USE_ENV_DEFAULT_ENV_TEXT_FILE . Signed-off-by: Marek Vasut --- Makefile | 4 ++-- board/qualcomm/qcom-phone.config | 2 +- boot/Kconfig | 6 +++--- configs/qcom_defconfig | 4 ++-- configs/qcom_ipq9574_mmc_defconfig | 4 ++-- doc/usage/environment.rst | 4 ++-- env/Kconfig | 6 +++--- include/env_default.h | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/Makefile b/Makefile index c7b82299c19..c9c0d4646a9 100644 --- a/Makefile +++ b/Makefile @@ -1973,7 +1973,7 @@ ifeq ($(wildcard $(LDSCRIPT)),) @/bin/false endif -ifeq ($(CONFIG_USE_DEFAULT_ENV_FILE),y) +ifeq ($(CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE),y) prepare1: $(defaultenv_h) envtools: $(defaultenv_h) @@ -2053,7 +2053,7 @@ $(timestamp_h): $(srctree)/Makefile FORCE $(dt_h): $(srctree)/Makefile FORCE $(call filechk,dt.h) -$(defaultenv_h): $(CONFIG_DEFAULT_ENV_FILE:"%"=%) FORCE +$(defaultenv_h): $(CONFIG_ENV_DEFAULT_ENV_TEXT_FILE:"%"=%) FORCE $(call filechk,defaultenv.h) # --------------------------------------------------------------------------- diff --git a/board/qualcomm/qcom-phone.config b/board/qualcomm/qcom-phone.config index 913c91757c1..d24094eefdd 100644 --- a/board/qualcomm/qcom-phone.config +++ b/board/qualcomm/qcom-phone.config @@ -1,5 +1,5 @@ # Settings for phones -CONFIG_DEFAULT_ENV_FILE="board/qualcomm/qcom-phone.env" +CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="board/qualcomm/qcom-phone.env" # Hang on panic so the error message can be read CONFIG_PANIC_HANG=y # We use pause in various places to allow text to be read diff --git a/boot/Kconfig b/boot/Kconfig index 30eb5b328d7..01349e9096b 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1845,7 +1845,7 @@ config USE_BOOTARGS config BOOTARGS string "Boot arguments" - depends on USE_BOOTARGS && !USE_DEFAULT_ENV_FILE + depends on USE_BOOTARGS && !ENV_USE_DEFAULT_ENV_TEXT_FILE help This can be used to pass arguments to the bootm command. The value of CONFIG_BOOTARGS goes into the environment value "bootargs". Note that @@ -1880,7 +1880,7 @@ config USE_BOOTCOMMAND config BOOTCOMMAND string "bootcmd value" - depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE + depends on USE_BOOTCOMMAND && !ENV_USE_DEFAULT_ENV_TEXT_FILE default "bootflow scan -lb" if BOOTSTD_DEFAULTS && CMD_BOOTFLOW_FULL default "bootflow scan" if BOOTSTD_DEFAULTS && !CMD_BOOTFLOW_FULL default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS @@ -1903,7 +1903,7 @@ config USE_PREBOOT config PREBOOT string "preboot default value" - depends on USE_PREBOOT && !USE_DEFAULT_ENV_FILE + depends on USE_PREBOOT && !ENV_USE_DEFAULT_ENV_TEXT_FILE default "usb start" if USB_KEYBOARD default "" help diff --git a/configs/qcom_defconfig b/configs/qcom_defconfig index b8399701da0..5eb027ba27b 100644 --- a/configs/qcom_defconfig +++ b/configs/qcom_defconfig @@ -42,8 +42,8 @@ CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_OF_LIVE=y CONFIG_OF_UPSTREAM_BUILD_VENDOR=y -CONFIG_USE_DEFAULT_ENV_FILE=y -CONFIG_DEFAULT_ENV_FILE="board/qualcomm/default.env" +CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE=y +CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="board/qualcomm/default.env" CONFIG_BUTTON_QCOM_PMIC=y CONFIG_CLK=y CONFIG_CLK_STUB=y diff --git a/configs/qcom_ipq9574_mmc_defconfig b/configs/qcom_ipq9574_mmc_defconfig index 8d7d3d92c73..c7ce4f5c237 100644 --- a/configs/qcom_ipq9574_mmc_defconfig +++ b/configs/qcom_ipq9574_mmc_defconfig @@ -28,8 +28,8 @@ CONFIG_CMD_PART=y CONFIG_EFI_PARTITION=y CONFIG_OF_LIVE=y CONFIG_ENV_IS_IN_MMC=y -CONFIG_USE_DEFAULT_ENV_FILE=y -CONFIG_DEFAULT_ENV_FILE="board/qualcomm/default.env" +CONFIG_USE_ENV_DEFAULT_ENV_TEXT_FILE=y +CONFIG_ENV_DEFAULT_ENV_TEXT_FILE="board/qualcomm/default.env" CONFIG_CLK=y CONFIG_CLK_QCOM_IPQ9574=y CONFIG_MSM_GPIO=y diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst index 7e2f2863d06..bb6c351b441 100644 --- a/doc/usage/environment.rst +++ b/doc/usage/environment.rst @@ -562,8 +562,8 @@ only effect after the next boot (yes, that's just like Windows). External environment file ------------------------- -The `CONFIG_USE_DEFAULT_ENV_FILE` option provides a way to bypass the -environment generation in U-Boot. If enabled, then `CONFIG_DEFAULT_ENV_FILE` +The `CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE` option provides a way to bypass the +environment generation in U-Boot. If enabled, then `CONFIG_ENV_DEFAULT_ENV_TEXT_FILE` provides the name of a file which is converted into the environment, completely bypassing the standard environment variables in `env_default.h`. diff --git a/env/Kconfig b/env/Kconfig index 52f5cb86584..65ab8b6392d 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -749,7 +749,7 @@ config SCSI_ENV_PART_UUID help UUID of the SCSI partition that you want to store the environment in. -config USE_DEFAULT_ENV_FILE +config ENV_USE_DEFAULT_ENV_TEXT_FILE bool "Create default environment from file" help Normally, the default environment is automatically generated @@ -758,9 +758,9 @@ config USE_DEFAULT_ENV_FILE you can instead define the entire default environment in an external file. -config DEFAULT_ENV_FILE +config ENV_DEFAULT_ENV_TEXT_FILE string "Path to default environment file" - depends on USE_DEFAULT_ENV_FILE + depends on ENV_USE_DEFAULT_ENV_TEXT_FILE help The path containing the default environment. The format is the same as accepted by the mkenvimage tool: lines diff --git a/include/env_default.h b/include/env_default.h index 6e8f2ea90e7..9caf22cdd1d 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -27,7 +27,7 @@ char default_environment[] = { #else const char default_environment[] = { #endif -#ifndef CONFIG_USE_DEFAULT_ENV_FILE +#ifndef CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE #ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0" #endif @@ -136,7 +136,7 @@ const char default_environment[] = { "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" #endif "\0" -#else /* CONFIG_USE_DEFAULT_ENV_FILE */ +#else /* CONFIG_ENV_USE_DEFAULT_ENV_TEXT_FILE */ #include "generated/defaultenv_autogenerated.h" #endif #ifdef DEFAULT_ENV_INSTANCE_EMBEDDED -- cgit v1.3.1