blob: 513e9c4f466cd9f0ebf484bb002425e67a2308af [file] [log] [blame]
developerad3184f2022-08-30 13:15:07 +08001From c10a255caf19008afd1394c645759c40f83d52e0 Mon Sep 17 00:00:00 2001
developer8fe42712022-07-14 08:42:19 +08002From: Evelyn Tsai <evelyn.tsai@mediatek.com>
developerad3184f2022-08-30 13:15:07 +08003Date: Tue, 30 Aug 2022 10:45:21 +0800
4Subject: [PATCH] rrr
developer2cf5f9a2022-03-25 02:46:17 +08005
6---
developerad3184f2022-08-30 13:15:07 +08007 package/kernel/mt76/Makefile | 52 +++++++++++++++++++++++++++++++++---
8 1 file changed, 49 insertions(+), 3 deletions(-)
developer2cf5f9a2022-03-25 02:46:17 +08009
developer1bfe18b2022-07-13 16:05:35 +080010diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
developerad3184f2022-08-30 13:15:07 +080011index ff58d27..8098cbf 100644
developer1bfe18b2022-07-13 16:05:35 +080012--- a/package/kernel/mt76/Makefile
13+++ b/package/kernel/mt76/Makefile
developerad3184f2022-08-30 13:15:07 +080014@@ -220,7 +220,7 @@ endef
developer2cf5f9a2022-03-25 02:46:17 +080015
16 define KernelPackage/mt7915e
17 $(KernelPackage/mt76-default)
18- TITLE:=MediaTek MT7915e wireless driver
19+ TITLE:=MediaTek MT7915e/MT7986/MT7916 wireless driver
20 DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
21 FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
22 AUTOLOAD:=$(call AutoProbe,mt7915e)
developerad3184f2022-08-30 13:15:07 +080023@@ -228,10 +228,18 @@ endef
24
25 define KernelPackage/mt7986-firmware
26 $(KernelPackage/mt76-default)
27- DEPENDS:=@TARGET_mediatek_filogic
28+ DEPENDS:=+@TARGET_mediatek_mt7986
29 TITLE:=MediaTek MT7986 firmware
developer2cf5f9a2022-03-25 02:46:17 +080030 endef
31
developer7800b8d2022-06-23 22:15:56 +080032+define KernelPackage/besra
developer2cf5f9a2022-03-25 02:46:17 +080033+ $(KernelPackage/mt76-default)
34+ TITLE:=MediaTek MT7902/MT7990 wireless driver
developer3ef23332022-06-10 11:48:11 +080035+ DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT
developer7800b8d2022-06-23 22:15:56 +080036+ FILES:= $(PKG_BUILD_DIR)/besra/besra.ko
37+ AUTOLOAD:=$(call AutoProbe,besra)
developer2cf5f9a2022-03-25 02:46:17 +080038+endef
39+
40 define KernelPackage/mt7921-common
41 $(KernelPackage/mt76-default)
42 TITLE:=MediaTek MT7615 wireless driver common code
developerad3184f2022-08-30 13:15:07 +080043@@ -287,6 +295,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
developer2cf5f9a2022-03-25 02:46:17 +080044 NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
45 endif
46
47+ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
48+ NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
49+ PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y
50+endif
51+
52 ifdef CONFIG_PACKAGE_CFG80211_TESTMODE
53 NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE
54 PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y
developerad3184f2022-08-30 13:15:07 +080055@@ -349,11 +362,14 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u
developer2cf5f9a2022-03-25 02:46:17 +080056 endif
57 ifdef CONFIG_PACKAGE_kmod-mt7915e
58 PKG_MAKE_FLAGS += CONFIG_MT7915E=m
developerad3184f2022-08-30 13:15:07 +080059- ifdef CONFIG_TARGET_mediatek_filogic
60+ ifdef CONFIG_TARGET_mediatek_mt7986
61 PKG_MAKE_FLAGS += CONFIG_MT7986_WMAC=y
62 NOSTDINC_FLAGS += -DCONFIG_MT7986_WMAC
63 endif
64 endif
developer7800b8d2022-06-23 22:15:56 +080065+ifdef CONFIG_PACKAGE_kmod-besra
66+ PKG_MAKE_FLAGS += CONFIG_BESRA=m
developerad3184f2022-08-30 13:15:07 +080067+endif
developer2cf5f9a2022-03-25 02:46:17 +080068 ifdef CONFIG_PACKAGE_kmod-mt7921-common
69 PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m
developerad3184f2022-08-30 13:15:07 +080070 endif
71@@ -457,6 +473,12 @@ define KernelPackage/mt7915e/install
developer2cf5f9a2022-03-25 02:46:17 +080072 $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \
73 $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \
74 $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \
75+ $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
76+ $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
77+ $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
developer2cf5f9a2022-03-25 02:46:17 +080078+ $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \
79+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
80+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \
developerb11a5392022-03-31 00:34:47 +080081 $(1)/lib/firmware/mediatek
developerad3184f2022-08-30 13:15:07 +080082 endef
83
84@@ -470,9 +492,32 @@ define KernelPackage/mt7986-firmware/install
85 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
86 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
87 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
88+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
developer2cf5f9a2022-03-25 02:46:17 +080089+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
90+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
developer2cf5f9a2022-03-25 02:46:17 +080091+ $(1)/lib/firmware/mediatek
developerb11a5392022-03-31 00:34:47 +080092+ifdef CONFIG_NET_MEDIATEK_SOC_WED
93+ cp \
94+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \
95+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \
developerad3184f2022-08-30 13:15:07 +080096 $(1)/lib/firmware/mediatek
developere7861102022-04-04 18:16:16 +080097+endif
developerb11a5392022-03-31 00:34:47 +080098 endef
99
developer7800b8d2022-06-23 22:15:56 +0800100+ifdef CONFIG_PACKAGE_kmod-besra
101+define KernelPackage/besra/install
developerb11a5392022-03-31 00:34:47 +0800102+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek
103+ cp \
104+ $(PKG_BUILD_DIR)/firmware/mt7902_wa.bin \
105+ $(PKG_BUILD_DIR)/firmware/mt7902_wm.bin \
106+ $(PKG_BUILD_DIR)/firmware/mt7902_rom_patch.bin \
107+ $(PKG_BUILD_DIR)/firmware/mt7902_wf_rom.bin \
108+ $(PKG_BUILD_DIR)/firmware/mt7902_wf_rom_sram.bin \
109+ $(PKG_BUILD_DIR)/firmware/mt7902_eeprom.bin \
110+ $(1)/lib/firmware/mediatek
111+endef
developer2cf5f9a2022-03-25 02:46:17 +0800112+endif
developerb11a5392022-03-31 00:34:47 +0800113+
developer2cf5f9a2022-03-25 02:46:17 +0800114 define KernelPackage/mt7921e/install
115 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
developerb11a5392022-03-31 00:34:47 +0800116 cp \
developerad3184f2022-08-30 13:15:07 +0800117@@ -513,5 +558,6 @@ $(eval $(call KernelPackage,mt7921-common))
developerb11a5392022-03-31 00:34:47 +0800118 $(eval $(call KernelPackage,mt7921u))
119 $(eval $(call KernelPackage,mt7921s))
120 $(eval $(call KernelPackage,mt7921e))
developer7800b8d2022-06-23 22:15:56 +0800121+$(eval $(call KernelPackage,besra))
developerb11a5392022-03-31 00:34:47 +0800122 $(eval $(call KernelPackage,mt76))
123 $(eval $(call BuildPackage,mt76-test))
developer2cf5f9a2022-03-25 02:46:17 +0800124--
developerad3184f2022-08-30 13:15:07 +08001252.36.1
developer2cf5f9a2022-03-25 02:46:17 +0800126