[PATCH v3] gemini: Convert to use module for Realtek switch

Linus Walleij linus.walleij at linaro.org
Fri Feb 7 13:48:06 PST 2025


Only the DIR-685 uses a Realtek DSA switch currently so
convert this platform to load it from a module and save
memory on all other devices.

At the same time drop the rt2800 PCI package that this
device actually isn't using, it needs an out-of-tree
wireless driver.

Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
Not all Gemini platforms are using a DSA switch, so
by converting the switches into packages and just selecting
that package for the one device needing it we save a lot
of space (600KB+) on all other devices.
---
Changes in v3:
- Rebased on top of Luiz' RTL kmod packages
- Link to v2: https://lore.kernel.org/r/20250113-gemini-rtl-dsa-module-v2-0-7d0214b4414f@linaro.org

Changes in v2:
- Fix typo in one subpackage description
- Link to v1: http://patchwork.ozlabs.org/project/openwrt/list/?series=440011
---
 target/linux/gemini/config-6.6     | 7 -------
 target/linux/gemini/image/Makefile | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/target/linux/gemini/config-6.6 b/target/linux/gemini/config-6.6
index 2e590540afa95fdc52d5d17f4592b37cf45b7f93..c2e0cdd488ae0a4913a58b5f74297f96faf2252f 100644
--- a/target/linux/gemini/config-6.6
+++ b/target/linux/gemini/config-6.6
@@ -287,13 +287,6 @@ CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NET_DEVLINK=y
-CONFIG_NET_DSA=y
-CONFIG_NET_DSA_REALTEK=y
-# CONFIG_NET_DSA_REALTEK_MDIO is not set
-# CONFIG_NET_DSA_REALTEK_RTL8365MB is not set
-CONFIG_NET_DSA_REALTEK_RTL8366RB=y
-CONFIG_NET_DSA_REALTEK_SMI=y
-CONFIG_NET_DSA_TAG_RTL4_A=y
 CONFIG_NET_EGRESS=y
 CONFIG_NET_INGRESS=y
 CONFIG_NET_NS=y
diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile
index a7988cf5fbefd7e2c11dd8d024053e80074ad9d2..389c8f8c442af8323de57c3f22b287716af88dfd 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -158,7 +158,7 @@ define Device/dlink_dir-685
 	DEVICE_MODEL := DIR-685 Xtreme N Storage Router
 	DEVICE_DTS := gemini-dlink-dir-685
 	DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) \
-			kmod-rt2800-pci
+			kmod-dsa-rtl8366rb
 	IMAGES := factory.bin sysupgrade.bin
 	# Pad to 128k erase blocks with 160 bytes WRGG header
 	IMAGE/factory.bin := append-kernel | pad-offset 128k 160 | append-rootfs | dir685-pad-rootfs | dir685-image

---
base-commit: b61c192e75a89db918e9bb236df3dd6dc9878181
change-id: 20250112-gemini-rtl-dsa-module-54c870d0860b

Best regards,
-- 
Linus Walleij <linus.walleij at linaro.org>




More information about the openwrt-devel mailing list