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 <ptpt52@gmail.com>
This commit is contained in:
Chen Minqiang 2018-11-30 18:48:49 +08:00 committed by Mathias Kresin
parent 7a32a73e52
commit 40692f0fb5
2 changed files with 28 additions and 25 deletions

View File

@ -28,7 +28,7 @@ define Device/alfa-network_ac1200rm
DTS := AC1200RM DTS := AC1200RM
IMAGE_SIZE := 16064k IMAGE_SIZE := 16064k
DEVICE_TITLE := ALFA Network AC1200RM 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 endef
TARGET_DEVICES += alfa-network_ac1200rm TARGET_DEVICES += alfa-network_ac1200rm
@ -51,6 +51,7 @@ define Device/ArcherC20i
IMAGES += factory.bin IMAGES += factory.bin
DEVICE_PACKAGES := kmod-mt76x0e DEVICE_PACKAGES := kmod-mt76x0e
DEVICE_TITLE := TP-Link ArcherC20i DEVICE_TITLE := TP-Link ArcherC20i
DEVICE_PACKAGES := kmod-mt76x0e
endef endef
TARGET_DEVICES += ArcherC20i TARGET_DEVICES += ArcherC20i
@ -65,6 +66,7 @@ define Device/ArcherC50v1
IMAGE/factory-us.bin := tplink-v2-image -e -w 0 IMAGE/factory-us.bin := tplink-v2-image -e -w 0
IMAGE/factory-eu.bin := tplink-v2-image -e -w 2 IMAGE/factory-eu.bin := tplink-v2-image -e -w 2
DEVICE_TITLE := TP-Link ArcherC50v1 DEVICE_TITLE := TP-Link ArcherC50v1
DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += ArcherC50v1 TARGET_DEVICES += ArcherC50v1
@ -75,7 +77,7 @@ define Device/ArcherMR200
TPLINK_FLASHLAYOUT := 8MLmtk TPLINK_FLASHLAYOUT := 8MLmtk
TPLINK_HWID := 0xd7500001 TPLINK_HWID := 0xd7500001
TPLINK_HWREV := 0x4a 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 DEVICE_TITLE := TP-Link ArcherMR200
endef endef
TARGET_DEVICES += ArcherMR200 TARGET_DEVICES += ArcherMR200
@ -122,7 +124,7 @@ define Device/d240
DTS := D240 DTS := D240
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := Sanlinking Technologies D240 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 endef
TARGET_DEVICES += d240 TARGET_DEVICES += d240
@ -177,7 +179,7 @@ TARGET_DEVICES += dlink_dwr-116-a1
define Device/dlink_dwr-118-a2 define Device/dlink_dwr-118-a2
DTS := DWR-118-A2 DTS := DWR-118-A2
DEVICE_TITLE := D-Link 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_ROM_ID := DLK6E3814001
DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FAMILY_MEMBER := 0x6E38
DLINK_FIRMWARE_SIZE := 0xFE0000 DLINK_FIRMWARE_SIZE := 0xFE0000
@ -231,7 +233,6 @@ define Device/ex2700
KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-uImage-fakehdr filesystem KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | append-uImage-fakehdr filesystem
IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ IMAGE/factory.bin := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \
netgear-dni netgear-dni
DEVICE_PACKAGES := -kmod-mt76 -kmod-mt7603 -kmod-mt76x2 -kmod-mt76-core
DEVICE_TITLE := Netgear EX2700 DEVICE_TITLE := Netgear EX2700
endef endef
TARGET_DEVICES += ex2700 TARGET_DEVICES += ex2700
@ -243,7 +244,7 @@ define Device/ex3700-ex3800
IMAGE_SIZE := 7744k IMAGE_SIZE := 7744k
IMAGES += factory.chk IMAGES += factory.chk
IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-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 DEVICE_TITLE := Netgear EX3700/EX3800
SUPPORTED_DEVICES := ex3700 SUPPORTED_DEVICES := ex3700
endef endef
@ -276,7 +277,7 @@ define Device/gl-mt750
DTS := GL-MT750 DTS := GL-MT750
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := GL-Inet GL-MT750 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 endef
TARGET_DEVICES += gl-mt750 TARGET_DEVICES += gl-mt750
@ -292,7 +293,7 @@ define Device/hc5761
DTS := HC5761 DTS := HC5761
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := HiWiFi HC5761 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 endef
TARGET_DEVICES += hc5761 TARGET_DEVICES += hc5761
@ -300,7 +301,7 @@ define Device/hc5861
DTS := HC5861 DTS := HC5861
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := HiWiFi HC5861 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 endef
TARGET_DEVICES += hc5861 TARGET_DEVICES += hc5861
@ -362,8 +363,7 @@ define Device/lava_lr-25g001
IMAGES += factory.bin IMAGES += factory.bin
IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata
IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory
DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-mt76 kmod-mt76x0-common \ DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-mt76x0e
kmod-mt76x0e
endef endef
TARGET_DEVICES += lava_lr-25g001 TARGET_DEVICES += lava_lr-25g001
@ -371,7 +371,7 @@ define Device/miwifi-mini
DTS := MIWIFI-MINI DTS := MIWIFI-MINI
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := Xiaomi MiWiFi Mini DEVICE_TITLE := Xiaomi MiWiFi Mini
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
endef endef
TARGET_DEVICES += miwifi-mini TARGET_DEVICES += miwifi-mini
@ -419,7 +419,7 @@ TARGET_DEVICES += mt7620a_v22sg
define Device/mzk-750dhp define Device/mzk-750dhp
DTS := MZK-750DHP DTS := MZK-750DHP
DEVICE_TITLE := Planex MZK-750DHP DEVICE_TITLE := Planex MZK-750DHP
DEVICE_PACKAGES := kmod-mt76 DEVICE_PACKAGES := kmod-mt76x0e
endef endef
TARGET_DEVICES += mzk-750dhp TARGET_DEVICES += mzk-750dhp
@ -432,7 +432,7 @@ TARGET_DEVICES += mzk-ex300np
define Device/mzk-ex750np define Device/mzk-ex750np
DTS := MZK-EX750NP DTS := MZK-EX750NP
DEVICE_TITLE := Planex MZK-EX750NP DEVICE_TITLE := Planex MZK-EX750NP
DEVICE_PACKAGES := kmod-mt76 DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += mzk-ex750np TARGET_DEVICES += mzk-ex750np
@ -453,7 +453,7 @@ TARGET_DEVICES += oy-0001
define Device/psg1208 define Device/psg1208
DTS := PSG1208 DTS := PSG1208
DEVICE_TITLE := Phicomm PSG1208 DEVICE_TITLE := Phicomm PSG1208
DEVICE_PACKAGES := kmod-mt76 DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += psg1208 TARGET_DEVICES += psg1208
@ -503,14 +503,14 @@ define Device/rt-ac51u
DTS := RT-AC51U DTS := RT-AC51U
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := Asus RT-AC51U 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 endef
TARGET_DEVICES += rt-ac51u TARGET_DEVICES += rt-ac51u
define Device/tiny-ac define Device/tiny-ac
DTS := TINY-AC DTS := TINY-AC
DEVICE_TITLE := Dovado Tiny AC DEVICE_TITLE := Dovado Tiny AC
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci
endef endef
TARGET_DEVICES += tiny-ac TARGET_DEVICES += tiny-ac
@ -522,7 +522,7 @@ define Device/edimax_br-6478ac-v2
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \ IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \ edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \
append-metadata | check-size $$$$(IMAGE_SIZE) 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 endef
TARGET_DEVICES += edimax_br-6478ac-v2 TARGET_DEVICES += edimax_br-6478ac-v2
@ -534,7 +534,7 @@ define Device/tplink_c2-v1
TPLINK_HWREV := 50 TPLINK_HWREV := 50
IMAGES += factory.bin IMAGES += factory.bin
DEVICE_TITLE := TP-Link Archer C2 v1 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 endef
TARGET_DEVICES += tplink_c2-v1 TARGET_DEVICES += tplink_c2-v1
@ -547,7 +547,7 @@ define Device/tplink_c20-v1
TPLINK_HWREVADD := 0x1 TPLINK_HWREVADD := 0x1
IMAGES += factory.bin IMAGES += factory.bin
DEVICE_TITLE := TP-Link ArcherC20 v1 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 endef
TARGET_DEVICES += tplink_c20-v1 TARGET_DEVICES += tplink_c20-v1
@ -571,6 +571,7 @@ define Device/whr-1166d
DTS := WHR-1166D DTS := WHR-1166D
IMAGE_SIZE := 15040k IMAGE_SIZE := 15040k
DEVICE_TITLE := Buffalo WHR-1166D DEVICE_TITLE := Buffalo WHR-1166D
DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += whr-1166d TARGET_DEVICES += whr-1166d
@ -652,6 +653,7 @@ define Device/y1
DTS := Y1 DTS := Y1
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := Lenovo Y1 DEVICE_TITLE := Lenovo Y1
DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += y1 TARGET_DEVICES += y1
@ -659,6 +661,7 @@ define Device/y1s
DTS := Y1S DTS := Y1S
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
DEVICE_TITLE := Lenovo Y1S DEVICE_TITLE := Lenovo Y1S
DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += y1s TARGET_DEVICES += y1s
@ -675,14 +678,14 @@ define Device/we1026-5g-16m
IMAGE_SIZE := 16777216 IMAGE_SIZE := 16777216
SUPPORTED_DEVICES += we1026-5g-16m SUPPORTED_DEVICES += we1026-5g-16m
DEVICE_TITLE := Zbtlink ZBT-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 endef
TARGET_DEVICES += we1026-5g-16m TARGET_DEVICES += we1026-5g-16m
define Device/zbt-ape522ii define Device/zbt-ape522ii
DTS := ZBT-APE522II DTS := ZBT-APE522II
DEVICE_TITLE := Zbtlink ZBT-APE522II DEVICE_TITLE := Zbtlink ZBT-APE522II
DEVICE_PACKAGES := kmod-mt76 DEVICE_PACKAGES := kmod-mt76x2
endef endef
TARGET_DEVICES += zbt-ape522ii TARGET_DEVICES += zbt-ape522ii
@ -710,7 +713,7 @@ define Device/zbt-we826-16M
IMAGE_SIZE := $(ralink_default_fw_size_16M) IMAGE_SIZE := $(ralink_default_fw_size_16M)
SUPPORTED_DEVICES += zbt-we826 SUPPORTED_DEVICES += zbt-we826
DEVICE_TITLE := Zbtlink ZBT-WE826 (16M) 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 endef
TARGET_DEVICES += zbt-we826-16M TARGET_DEVICES += zbt-we826-16M
@ -718,7 +721,7 @@ define Device/zbt-we826-32M
DTS := ZBT-WE826-32M DTS := ZBT-WE826-32M
IMAGE_SIZE := $(ralink_default_fw_size_32M) IMAGE_SIZE := $(ralink_default_fw_size_32M)
DEVICE_TITLE := Zbtlink ZBT-WE826 (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 endef
TARGET_DEVICES += zbt-we826-32M TARGET_DEVICES += zbt-we826-32M

View File

@ -7,7 +7,7 @@ BOARDNAME:=MT7620 based boards
FEATURES+=usb FEATURES+=usb
CPU_TYPE:=24kc 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 define Target/Description
Build firmware images for Ralink MT7620 based boards. Build firmware images for Ralink MT7620 based boards.