uboot-mediatek: update to U-Boot 2024.01 release
[openwrt/staging/wigyori.git] / package / boot / uboot-mediatek / patches / 100-11-env-add-support-for-NMBM-upper-MTD-layer.patch
index 0b4ee32b6252615257fdea0f0b84f04db536a331..dbb1e2e59d2510b30934956231629abb82ce3721 100644 (file)
@@ -17,37 +17,17 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
  7 files changed, 180 insertions(+), 3 deletions(-)
  create mode 100644 env/nmbm.c
 
---- a/cmd/nvedit.c
-+++ b/cmd/nvedit.c
-@@ -50,6 +50,7 @@ DECLARE_GLOBAL_DATA_PTR;
-       defined(CONFIG_ENV_IS_IN_EXT4)          || \
-       defined(CONFIG_ENV_IS_IN_MTD)           || \
-       defined(CONFIG_ENV_IS_IN_NAND)          || \
-+      defined(CONFIG_ENV_IS_IN_NMBM)          || \
-       defined(CONFIG_ENV_IS_IN_NVRAM)         || \
-       defined(CONFIG_ENV_IS_IN_ONENAND)       || \
-       defined(CONFIG_ENV_IS_IN_SPI_FLASH)     || \
-@@ -63,7 +64,7 @@ DECLARE_GLOBAL_DATA_PTR;
- #if   !defined(ENV_IS_IN_DEVICE)              && \
-       !defined(CONFIG_ENV_IS_NOWHERE)
- # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|MTD|\
--NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE
-+NAND|NMBM|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE
- #endif
- /*
 --- a/env/Kconfig
 +++ b/env/Kconfig
-@@ -62,7 +62,7 @@ config ENV_IS_NOWHERE
+@@ -59,6 +59,7 @@ config ENV_IS_DEFAULT
+       def_bool y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
+                    !ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \
                     !ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
++                   !ENV_IS_IN_NMBM && \
                     !ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
                     !ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
--                   !ENV_IS_IN_UBI && !ENV_IS_IN_MTD
-+                   !ENV_IS_IN_UBI && !ENV_IS_IN_NMBM && !ENV_IS_IN_MTD
-       help
-         Define this if you don't want to or can't have an environment stored
-         on a storage medium. In this case the environment will still exist
-@@ -312,6 +312,21 @@ config ENV_RANGE
+                    !ENV_IS_IN_UBI && !ENV_IS_IN_MTD
+@@ -315,6 +316,21 @@ config ENV_RANGE
          Specifying a range with more erase blocks than are needed to hold
          CONFIG_ENV_SIZE allows bad blocks within the range to be avoided.
  
@@ -69,7 +49,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
  config ENV_IS_IN_NVRAM
        bool "Environment in a non-volatile RAM"
        depends on !CHAIN_OF_TRUST
-@@ -588,7 +603,7 @@ config ENV_MTD_NAME
+@@ -591,7 +607,7 @@ config ENV_MTD_NAME
  config ENV_OFFSET
        hex "Environment offset"
        depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
@@ -90,7 +70,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
  
 --- a/env/env.c
 +++ b/env/env.c
-@@ -75,6 +75,9 @@ static enum env_location env_locations[]
+@@ -52,6 +52,9 @@ static enum env_location env_locations[]
  #ifdef CONFIG_ENV_IS_IN_NAND
        ENVL_NAND,
  #endif