[openwrt/openwrt] realtek: Enhance MTD/ECC kernel configuration for NAND targets

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 5 03:14:10 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/af7a74bad1a4bba9fdb348c06436c843c5f287e4

commit af7a74bad1a4bba9fdb348c06436c843c5f287e4
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Oct 1 02:01:48 2025 -0400

    realtek: Enhance MTD/ECC kernel configuration for NAND targets
    
    The Realtek NAND kernel configuration has some shortcomings.
    Fix this as follows:
    
    - MTD_NAND_ECC_REALTEK selects MTD_NAND_ECC and this selects
      MTD_NAND_CORE. For consistency add both config options.
    
    - The partition layout of the Linksys switches requires some tricky
      concatenation to keep dual boot active. Add CONFIG_MTD_VIRT_CONCAT
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/20255
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/rtl930x_nand/config-6.12 | 3 +++
 target/linux/realtek/rtl931x_nand/config-6.12 | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/target/linux/realtek/rtl930x_nand/config-6.12 b/target/linux/realtek/rtl930x_nand/config-6.12
index cdf866603b..b38391cf60 100644
--- a/target/linux/realtek/rtl930x_nand/config-6.12
+++ b/target/linux/realtek/rtl930x_nand/config-6.12
@@ -145,6 +145,8 @@ CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_ECC_REALTEK=y
 CONFIG_MTD_SPI_NAND=y
 CONFIG_MTD_SPI_NOR=y
@@ -157,6 +159,7 @@ CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_DEVLINK=y
diff --git a/target/linux/realtek/rtl931x_nand/config-6.12 b/target/linux/realtek/rtl931x_nand/config-6.12
index 4f261fab36..f77267c816 100644
--- a/target/linux/realtek/rtl931x_nand/config-6.12
+++ b/target/linux/realtek/rtl931x_nand/config-6.12
@@ -156,6 +156,8 @@ CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_ECC_REALTEK=y
 CONFIG_MTD_SPI_NAND=y
 CONFIG_MTD_SPI_NOR=y
@@ -168,6 +170,7 @@ CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NET_DEVLINK=y




More information about the lede-commits mailing list