From: Markus Stockhausen Date: Wed, 1 Oct 2025 06:01:48 +0000 (-0400) Subject: realtek: Enhance MTD/ECC kernel configuration for NAND targets X-Git-Tag: v25.12.0-rc1~1020 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af7a74bad1a4bba9fdb348c06436c843c5f287e4;p=thirdparty%2Fopenwrt.git 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 Link: https://github.com/openwrt/openwrt/pull/20255 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/rtl930x_nand/config-6.12 b/target/linux/realtek/rtl930x_nand/config-6.12 index cdf866603b6..b38391cf609 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 4f261fab365..f77267c816b 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