Since the dawn of time for the Allwinner support in mainline U-Boot
we store the environment to the SD card and write directly at
544KB from the beginning of the device. This leads to problems when
the U-Boot proper image grows beyond 504KB and eventually overlaps.
With one release of having the environment preferably in a FAT
partition, let's now turn off the MMC variant fallback, so we get back
all the space we need to implement features.
In case someone desperately needs to turn direct MMC environment back
on, let's move that to 896KB (128K below 1MB), so that we won't be
easily limited anymore.

Signed-off-by: Andre Przywara <andre.przyw...@arm.com>
---
 env/Kconfig                    | 5 +++--
 include/configs/sunxi-common.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/env/Kconfig b/env/Kconfig
index a3c6298273..b404855542 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -152,7 +152,7 @@ config ENV_IS_IN_MMC
        bool "Environment in an MMC device"
        depends on !CHAIN_OF_TRUST
        depends on MMC
-       default y if ARCH_SUNXI
+       default y if ARCH_SUNXI && !ARM64
        default y if ARCH_EXYNOS4
        default y if MX6SX || MX7D
        default y if TEGRA30 || TEGRA124
@@ -443,7 +443,8 @@ config ENV_OFFSET
        hex "Environment Offset"
        depends on !ENV_IS_IN_UBI
        depends on !ENV_IS_NOWHERE
-       default 0x88000 if ARCH_SUNXI
+       default 0x88000 if ARCH_SUNXI && !ARM64
+       default 0xe0000 if ARCH_SUNXI && ARM64
        help
          Offset from the start of the device (or partition)
 
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index e4e7c22778..1c881286dd 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -148,7 +148,7 @@
  * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used
  * directly in a makefile, without the preprocessor expansion.
  */
-#define CONFIG_BOARD_SIZE_LIMIT                0x7e000
+#define CONFIG_BOARD_SIZE_LIMIT                0xd6000
 #endif
 
 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
-- 
2.14.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to