[PATCH v4 1/2] configs: Add support in Kconfig and convert for armada boards

Michal Simek michal.simek at amd.com
Fri May 19 10:36:52 CEST 2023



On 5/19/23 06:30, Venkatesh Yadav Abbarapu wrote:
> From: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
> 
> The DEFAULT_ENV_IS_RW is moved to the Kconfig for easier configuration.
> Hence, the CONFIG_DEFAULT_ENV_IS_RW config is added to the defconfig files
> to allow enabling them for armada boards.
> 
> Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu at amd.com>
> ---
>   configs/mvebu_db-88f3720_defconfig          | 1 +
>   configs/mvebu_espressobin-88f3720_defconfig | 1 +
>   configs/mvebu_mcbin-88f8040_defconfig       | 1 +
>   drivers/serial/Kconfig                      | 7 +++++++
>   include/configs/mvebu_armada-37xx.h         | 1 -
>   5 files changed, 10 insertions(+), 1 deletion(-)

Actually the patch is not right even on defconfig and symbol migration.

I took your config fragment and also moved symbols with CONFIG_ prefix

diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index f4767c838f9a..ad5de8b8db6c 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -24,6 +24,13 @@ config BAUDRATE
           in the SPL stage (most drivers) or for choosing a default baudrate
           in the absence of an environment setting (serial_mxc.c).

+config DEFAULT_ENV_IS_RW
+       bool "Make default environment as writable"
+       depends on DM_SERIAL
+       help
+         Select this to enable to make default environment writable. This
+         allows modifying the default environment.
+
  config REQUIRE_SERIAL_CONSOLE
         bool "Require a serial port for console"
         # Running without a serial console is not supported by the
diff --git a/include/configs/mvebu_armada-37xx.h 
b/include/configs/mvebu_armada-37xx.h
index 76e148f55ebf..f41fe404b01c 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -30,7 +30,7 @@
  /*
   * Environment
   */
-#define DEFAULT_ENV_IS_RW              /* required for configuring default 
fdtfile= */
+#define CONFIG_DEFAULT_ENV_IS_RW               /* required for configuring 
default fdtfile= */

  #ifdef CONFIG_MMC
  #define BOOT_TARGET_DEVICES_MMC(func, i) func(MMC, mmc, i)
diff --git a/include/env_default.h b/include/env_default.h
index b16c22d5a28c..227cad7c340c 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -21,7 +21,7 @@ env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
         {
  #elif defined(DEFAULT_ENV_INSTANCE_STATIC)
  static char default_environment[] = {
-#elif defined(DEFAULT_ENV_IS_RW)
+#elif defined(CONFIG_DEFAULT_ENV_IS_RW)
  char default_environment[] = {
  #else
  const char default_environment[] = {
diff --git a/include/env_internal.h b/include/env_internal.h
index 6a6949464689..fcb464263f06 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -89,7 +89,7 @@ typedef struct environment_s {
  extern env_t embedded_environment;
  #endif /* ENV_IS_EMBEDDED */

-#ifdef DEFAULT_ENV_IS_RW
+#ifdef CONFIG_DEFAULT_ENV_IS_RW
  extern char default_environment[];
  #else
  extern const char default_environment[];


And after it run
./tools/moveconfig.py CONFIG_DEFAULT_ENV_IS_RW

And I get this diff.

diff --git a/configs/eDPU_defconfig b/configs/eDPU_defconfig
index 77ea2b2eec78..7654635be82f 100644
--- a/configs/eDPU_defconfig
+++ b/configs/eDPU_defconfig
@@ -81,6 +81,7 @@ CONFIG_PINCTRL_ARMADA_37XX=y
  CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_DM_REGULATOR_GPIO=y
  # CONFIG_SCSI is not set
+CONFIG_DEFAULT_ENV_IS_RW=y
  CONFIG_MVEBU_A3700_UART=y
  CONFIG_MVEBU_A3700_SPI=y
  CONFIG_SYSINFO=y
diff --git a/configs/mvebu_db-88f3720_defconfig b/configs/mvebu_db-88f3720_defconfig
index 829567014fd3..51518cf8e364 100644
--- a/configs/mvebu_db-88f3720_defconfig
+++ b/configs/mvebu_db-88f3720_defconfig
@@ -69,6 +69,7 @@ CONFIG_PHY=y
  CONFIG_MVEBU_COMPHY_SUPPORT=y
  CONFIG_PINCTRL=y
  CONFIG_PINCTRL_ARMADA_37XX=y
+CONFIG_DEFAULT_ENV_IS_RW=y
  CONFIG_MVEBU_A3700_UART=y
  CONFIG_MVEBU_A3700_SPI=y
  CONFIG_USB=y
diff --git a/configs/mvebu_espressobin-88f3720_defconfig 
b/configs/mvebu_espressobin-88f3720_defconfig
index fc394a7e9ded..941db3fbae62 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -89,6 +89,7 @@ CONFIG_MVEBU_COMPHY_SUPPORT=y
  CONFIG_PINCTRL=y
  CONFIG_PINCTRL_ARMADA_37XX=y
  CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DEFAULT_ENV_IS_RW=y
  CONFIG_MVEBU_A3700_UART=y
  CONFIG_MVEBU_A3700_SPI=y
  CONFIG_USB=y
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index fa1989518bd9..6f5a9f2e5528 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -81,6 +81,7 @@ CONFIG_PINCTRL_ARMADA_37XX=y
  CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_DM_REGULATOR_GPIO=y
  # CONFIG_SCSI is not set
+CONFIG_DEFAULT_ENV_IS_RW=y
  CONFIG_MVEBU_A3700_UART=y
  CONFIG_MVEBU_A3700_SPI=y
  CONFIG_SYSINFO=y
diff --git a/include/configs/mvebu_armada-37xx.h 
b/include/configs/mvebu_armada-37xx.h
index f41fe404b01c..18b55be0d8c1 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -30,7 +30,6 @@
  /*
   * Environment
   */
-#define CONFIG_DEFAULT_ENV_IS_RW               /* required for configuring 
default fdtfile= */

  #ifdef CONFIG_MMC
  #define BOOT_TARGET_DEVICES_MMC(func, i) func(MMC, mmc, i)


But your defconfig list is different. Please double check it again and 
definitely there is missing update in headers to use CONFIG_ prefix.

Thanks,
Michal


More information about the U-Boot mailing list