[PATCH v2 2/2] colibri-imx7: improve env badblock management

Marcel Ziswiler marcel at ziswiler.com
Thu Feb 3 18:41:25 CET 2022


From: Francesco Dolcini <francesco.dolcini at toradex.com>

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 <francesco.dolcini at toradex.com>

---

(no changes since v1)

 include/configs/colibri_imx7.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index faf27ba4fa..92e24ea8c6 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -180,6 +180,11 @@
 #define CONFIG_SYS_INIT_SP_ADDR \
 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
+/* environment organization */
+#if defined(CONFIG_ENV_IS_IN_NAND)
+#define CONFIG_ENV_RANGE	(4 * CONFIG_ENV_SIZE)
+#endif
+
 #ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND
 /* NAND stuff */
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
-- 
2.34.1



More information about the U-Boot mailing list