From cd02128056d52256f994414345f2ae84c4ce7d14 Mon Sep 17 00:00:00 2001 From: Francesco Dolcini Date: Fri, 27 Aug 2021 11:15:47 +0200 Subject: colibri-imx7: improve env badblock management Use the complete 512kb (4 blocks) nand partition reserved for u-boot environment instead of just the first block, this allows the module to have a working environment even if 3 blocks are bad. Signed-off-by: Francesco Dolcini --- include/configs/colibri_imx7.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 3f3d0078c7..43e7f93829 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -211,6 +211,8 @@ /* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_SYS_MMC_ENV_PART 1 +#elif defined(CONFIG_ENV_IS_IN_NAND) +#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE) #endif #ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND -- cgit v1.2.3