summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorStefan Eichenberger <stefan.eichenberger@toradex.com>2023-02-12 10:23:52 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2023-02-27 10:05:12 +0100
commitcf731ae655f7fe4c18b297655aef5cfb7675dbee (patch)
treed3e500643bbb3ceec964b2bf3d96b326f64b6710 /recipes-bsp
parent497046d1afec92f2e9cd1b0ad53e9e790cb526eb (diff)
u-boot-toradex_2022.07: Fix colibri-imx7 bad block table in flash
Add patch to use the in band bad block table on Colibri iMX7. Related-to: ELB-4989 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> (cherry picked from commit 86e64d70123b2ff55924ec6581c6154e628f661b)
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex/0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch35
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex_2022.07.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-toradex/0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch b/recipes-bsp/u-boot/u-boot-toradex/0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch
new file mode 100644
index 0000000..1c9dc08
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-toradex/0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch
@@ -0,0 +1,35 @@
+From 4bb9265b21bcd6dfa2c2aee04540ab69fc5c3c07 Mon Sep 17 00:00:00 2001
+From: Stefan Eichenberger <stefan.eichenberger@toradex.com>
+Date: Wed, 8 Feb 2023 16:11:49 +0100
+Subject: [PATCH] configs: colibri-imx7: Fix bad block table in flash
+ configuration
+
+Make sure that the bad block table in flash is used on Colibri iMX7.
+Without this configuration enabled U-Boot corrupts the bad block table
+and Linux will update the table on each reboot. The corruption occurs
+because if CONFIG_SYS_NAND_USE_FLASH_BBT is not set, U-boot will store
+bad blocks out of band, while the Linux driver for the iMX7 will store
+them in band in a bad block table.
+
+Upstream-Status: Submitted [https://lore.kernel.org/all/20230210103351.22907-1-francesco@dolcini.it/]
+Fixes: fd8c1fc9430 ("arm: dts: imx7: colibri: add raw NAND support")
+Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
+---
+ configs/colibri_imx7_defconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
+index 64dd93237e..d8afe3ef6f 100644
+--- a/configs/colibri_imx7_defconfig
++++ b/configs/colibri_imx7_defconfig
+@@ -68,6 +68,7 @@ CONFIG_FSL_USDHC=y
+ CONFIG_MTD=y
+ CONFIG_DM_MTD=y
+ CONFIG_MTD_RAW_NAND=y
++CONFIG_SYS_NAND_USE_FLASH_BBT=y
+ CONFIG_NAND_MXS_DT=y
+ CONFIG_SYS_NAND_ONFI_DETECTION=y
+ CONFIG_MTD_UBI_FASTMAP=y
+--
+2.37.2
+
diff --git a/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb b/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb
index 27d616f..a6327ca 100644
--- a/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb
+++ b/recipes-bsp/u-boot/u-boot-toradex_2022.07.bb
@@ -25,6 +25,7 @@ TDX_PATCHES = " \
file://0013-configs-colibri-imx7-Enable-bootd-command.patch \
file://0001-ARM-imx8mp-verdin-imx8mp-Add-memory-size-detection.patch \
file://0001-apalis-colibri_imx6-imx6ull-_imx7-update-env-memory-.patch \
+ file://0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch \
"
# patches which are not (yet) in the latest master
TDX_PATCHES:use-head-next = " \