From 40692f0fb55ca5bd2426701b3a9e64e3b7487a7d Mon Sep 17 00:00:00 2001 From: Chen Minqiang Date: Fri, 30 Nov 2018 18:48:49 +0800 Subject: [PATCH] ramips: mt7620: select only the matching mt76 driver Because every device has selected the corresponding mt76 driver, we can now disable the mt76 metapackage by default to make sure that other devices (those don't need mt76) avoid selecting unwanted packages. We can find the hardware specifies and determine the dependencies on these sites: https://wikidevi.com/wiki/ https://openwrt.org/toh/hwdata/ Signed-off-by: Chen Minqiang --- target/linux/ramips/image/mt7620.mk | 51 +++++++++++++++------------- target/linux/ramips/mt7620/target.mk | 2 +- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index c0d9cf2892..c526f9681e 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -28,7 +28,7 @@ define Device/alfa-network_ac1200rm DTS := AC1200RM IMAGE_SIZE := 16064k DEVICE_TITLE := ALFA Network AC1200RM - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci uboot-envtools endef TARGET_DEVICES += alfa-network_ac1200rm @@ -51,6 +51,7 @@ define Device/ArcherC20i IMAGES += factory.bin DEVICE_PACKAGES := kmod-mt76x0e DEVICE_TITLE := TP-Link ArcherC20i + DEVICE_PACKAGES := kmod-mt76x0e endef TARGET_DEVICES += ArcherC20i @@ -65,6 +66,7 @@ define Device/ArcherC50v1 IMAGE/factory-us.bin := tplink-v2-image -e -w 0 IMAGE/factory-eu.bin := tplink-v2-image -e -w 2 DEVICE_TITLE := TP-Link ArcherC50v1 + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += ArcherC50v1 @@ -75,7 +77,7 @@ define Device/ArcherMR200 TPLINK_FLASHLAYOUT := 8MLmtk TPLINK_HWID := 0xd7500001 TPLINK_HWREV := 0x4a - DEVICE_PACKAGES := kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem DEVICE_TITLE := TP-Link ArcherMR200 endef TARGET_DEVICES += ArcherMR200 @@ -122,7 +124,7 @@ define Device/d240 DTS := D240 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Sanlinking Technologies D240 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76-core kmod-mt76x2 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 endef TARGET_DEVICES += d240 @@ -177,7 +179,7 @@ TARGET_DEVICES += dlink_dwr-116-a1 define Device/dlink_dwr-118-a2 DTS := DWR-118-A2 DEVICE_TITLE := D-Link DWR-118 A2 - DEVICE_PACKAGES := kmod-usb2 jboot-tools kmod-mt76 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 jboot-tools DLINK_ROM_ID := DLK6E3814001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 @@ -231,7 +233,6 @@ define Device/ex2700 KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-uImage-fakehdr filesystem IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ netgear-dni - DEVICE_PACKAGES := -kmod-mt76 -kmod-mt7603 -kmod-mt76x2 -kmod-mt76-core DEVICE_TITLE := Netgear EX2700 endef TARGET_DEVICES += ex2700 @@ -243,7 +244,7 @@ define Device/ex3700-ex3800 IMAGE_SIZE := 7744k IMAGES += factory.chk IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk - DEVICE_PACKAGES := -kmod-mt76 kmod-mt76x2 + DEVICE_PACKAGES := mod-mt76x2 DEVICE_TITLE := Netgear EX3700/EX3800 SUPPORTED_DEVICES := ex3700 endef @@ -276,7 +277,7 @@ define Device/gl-mt750 DTS := GL-MT750 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := GL-Inet GL-MT750 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci endef TARGET_DEVICES += gl-mt750 @@ -292,7 +293,7 @@ define Device/hc5761 DTS := HC5761 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := HiWiFi HC5761 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += hc5761 @@ -300,7 +301,7 @@ define Device/hc5861 DTS := HC5861 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := HiWiFi HC5861 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += hc5861 @@ -362,8 +363,7 @@ define Device/lava_lr-25g001 IMAGES += factory.bin IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-mt76 kmod-mt76x0-common \ - kmod-mt76x0e + DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-mt76x0e endef TARGET_DEVICES += lava_lr-25g001 @@ -371,7 +371,7 @@ define Device/miwifi-mini DTS := MIWIFI-MINI IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Xiaomi MiWiFi Mini - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci endef TARGET_DEVICES += miwifi-mini @@ -419,7 +419,7 @@ TARGET_DEVICES += mt7620a_v22sg define Device/mzk-750dhp DTS := MZK-750DHP DEVICE_TITLE := Planex MZK-750DHP - DEVICE_PACKAGES := kmod-mt76 + DEVICE_PACKAGES := kmod-mt76x0e endef TARGET_DEVICES += mzk-750dhp @@ -432,7 +432,7 @@ TARGET_DEVICES += mzk-ex300np define Device/mzk-ex750np DTS := MZK-EX750NP DEVICE_TITLE := Planex MZK-EX750NP - DEVICE_PACKAGES := kmod-mt76 + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += mzk-ex750np @@ -453,7 +453,7 @@ TARGET_DEVICES += oy-0001 define Device/psg1208 DTS := PSG1208 DEVICE_TITLE := Phicomm PSG1208 - DEVICE_PACKAGES := kmod-mt76 + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += psg1208 @@ -503,14 +503,14 @@ define Device/rt-ac51u DTS := RT-AC51U IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Asus RT-AC51U - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb-core kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport endef TARGET_DEVICES += rt-ac51u define Device/tiny-ac DTS := TINY-AC DEVICE_TITLE := Dovado Tiny AC - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci endef TARGET_DEVICES += tiny-ac @@ -522,7 +522,7 @@ define Device/edimax_br-6478ac-v2 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \ append-metadata | check-size $$$$(IMAGE_SIZE) - DEVICE_PACKAGES := kmod-mt76 kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport endef TARGET_DEVICES += edimax_br-6478ac-v2 @@ -534,7 +534,7 @@ define Device/tplink_c2-v1 TPLINK_HWREV := 50 IMAGES += factory.bin DEVICE_TITLE := TP-Link Archer C2 v1 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-switch-rtl8366-smi kmod-switch-rtl8367b endef TARGET_DEVICES += tplink_c2-v1 @@ -547,7 +547,7 @@ define Device/tplink_c20-v1 TPLINK_HWREVADD := 0x1 IMAGES += factory.bin DEVICE_TITLE := TP-Link ArcherC20 v1 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += tplink_c20-v1 @@ -571,6 +571,7 @@ define Device/whr-1166d DTS := WHR-1166D IMAGE_SIZE := 15040k DEVICE_TITLE := Buffalo WHR-1166D + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += whr-1166d @@ -652,6 +653,7 @@ define Device/y1 DTS := Y1 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Lenovo Y1 + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += y1 @@ -659,6 +661,7 @@ define Device/y1s DTS := Y1S IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Lenovo Y1S + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += y1s @@ -675,14 +678,14 @@ define Device/we1026-5g-16m IMAGE_SIZE := 16777216 SUPPORTED_DEVICES += we1026-5g-16m DEVICE_TITLE := Zbtlink ZBT-WE1026-5G (16M) - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 endef TARGET_DEVICES += we1026-5g-16m define Device/zbt-ape522ii DTS := ZBT-APE522II DEVICE_TITLE := Zbtlink ZBT-APE522II - DEVICE_PACKAGES := kmod-mt76 + DEVICE_PACKAGES := kmod-mt76x2 endef TARGET_DEVICES += zbt-ape522ii @@ -710,7 +713,7 @@ define Device/zbt-we826-16M IMAGE_SIZE := $(ralink_default_fw_size_16M) SUPPORTED_DEVICES += zbt-we826 DEVICE_TITLE := Zbtlink ZBT-WE826 (16M) - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 endef TARGET_DEVICES += zbt-we826-16M @@ -718,7 +721,7 @@ define Device/zbt-we826-32M DTS := ZBT-WE826-32M IMAGE_SIZE := $(ralink_default_fw_size_32M) DEVICE_TITLE := Zbtlink ZBT-WE826 (32M) - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 endef TARGET_DEVICES += zbt-we826-32M diff --git a/target/linux/ramips/mt7620/target.mk b/target/linux/ramips/mt7620/target.mk index b58cdcbc1f..544254604e 100644 --- a/target/linux/ramips/mt7620/target.mk +++ b/target/linux/ramips/mt7620/target.mk @@ -7,7 +7,7 @@ BOARDNAME:=MT7620 based boards FEATURES+=usb CPU_TYPE:=24kc -DEFAULT_PACKAGES += kmod-rt2800-pci kmod-rt2800-soc kmod-mt76 wpad-basic +DEFAULT_PACKAGES += kmod-rt2800-pci kmod-rt2800-soc wpad-basic define Target/Description Build firmware images for Ralink MT7620 based boards. -- 2.25.1