[U-Boot] [PATCH] rockchip: board: puma-rk3399: define ENV_SIZE for SPI FLASH

Klaus Goger klaus.goger at theobroma-systems.com
Thu Dec 7 20:14:18 UTC 2017


be942f2e0d introduced a common CONFIG_ENV_SIZE of 32k in rockchip-common.h
On puma-rk3399 with ENV_IN_SPI active we place the environment in the
gap between SPL and the FIT image. Previously undefined it defaulted to
one sector defined with CONFIG_ENV_SECT_SIZE. With the now larger
environment a saveenv overwrites the FIT image. Therefore we now
redefine CONFIG_ENV_SIZE if build for ENV_IS_IN_SPI_FLASH.

Signed-off-by: Klaus Goger <klaus.goger at theobroma-systems.com>

---

 include/configs/puma_rk3399.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/puma_rk3399.h b/include/configs/puma_rk3399.h
index 39d0786266..c9d475ebbb 100644
--- a/include/configs/puma_rk3399.h
+++ b/include/configs/puma_rk3399.h
@@ -20,6 +20,8 @@
 #if defined(CONFIG_ENV_IS_IN_MMC)
 #define CONFIG_SYS_MMC_ENV_DEV 1
 #elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
+#undef CONFIG_ENV_SIZE
+#define CONFIG_ENV_SIZE	SZ_8K
 #define CONFIG_ENV_SECT_SIZE		(8 * 1024)
 #define CONFIG_ENV_SPI_BUS		CONFIG_SF_DEFAULT_BUS
 #define CONFIG_ENV_SPI_CS		CONFIG_SF_DEFAULT_CS
-- 
2.11.0



More information about the U-Boot mailing list