blob: 87a1686c03f198fceb50a35f36075261f9dcf728 [file] [log] [blame]
developer38ae70f2023-07-20 22:03:56 +08001diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
developeraa71cb02024-03-19 15:44:33 +08002index 4f0fb5f6..54635763 100644
developeref832a52022-07-13 16:05:35 +08003--- a/package/kernel/mt76/Makefile
4+++ b/package/kernel/mt76/Makefile
developer9c0688c2023-05-18 21:12:08 +08005@@ -233,7 +233,7 @@ endef
developer6b966f52022-03-25 02:46:17 +08006
7 define KernelPackage/mt7915e
8 $(KernelPackage/mt76-default)
9- TITLE:=MediaTek MT7915e wireless driver
10+ TITLE:=MediaTek MT7915e/MT7986/MT7916 wireless driver
developer8681f492023-01-06 19:15:00 +080011 DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
developer6b966f52022-03-25 02:46:17 +080012 FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
13 AUTOLOAD:=$(call AutoProbe,mt7915e)
developer117b1c22023-10-18 16:34:53 +080014@@ -247,13 +247,13 @@ endef
developer3ecd15b2023-10-16 14:38:12 +080015
16 define KernelPackage/mt7981-firmware
17 $(KernelPackage/mt76-default)
18- DEPENDS:=@TARGET_mediatek_filogic
19+ DEPENDS:=+@TARGET_mediatek_mt7981
20 TITLE:=MediaTek MT7981 firmware
21 endef
22
developer1ee54d02022-08-30 13:15:07 +080023 define KernelPackage/mt7986-firmware
24 $(KernelPackage/mt76-default)
25- DEPENDS:=@TARGET_mediatek_filogic
26+ DEPENDS:=+@TARGET_mediatek_mt7986
27 TITLE:=MediaTek MT7986 firmware
developer6b966f52022-03-25 02:46:17 +080028 endef
29
developer0f5d7c02023-12-05 17:08:28 +080030@@ -317,8 +317,8 @@ endef
developer2506b452023-09-19 14:11:49 +080031
developerbdff3cf2023-09-19 13:55:47 +080032 define KernelPackage/mt7996e
developer6b966f52022-03-25 02:46:17 +080033 $(KernelPackage/mt76-default)
developer2506b452023-09-19 14:11:49 +080034- TITLE:=MediaTek MT7996E wireless driver
developerf2510f62023-12-11 09:47:19 +080035- DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core
developer2506b452023-09-19 14:11:49 +080036+ TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver
developerbdff3cf2023-09-19 13:55:47 +080037+ DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT
38 FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
39 AUTOLOAD:=$(call AutoProbe,mt7996e)
40 endef
developeraa71cb02024-03-19 15:44:33 +080041@@ -376,6 +376,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
developer6b966f52022-03-25 02:46:17 +080042 NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
43 endif
44
45+ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
46+ NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
47+ PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y
48+endif
49+
50 ifdef CONFIG_PACKAGE_CFG80211_TESTMODE
51 NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE
52 PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y
developeraa71cb02024-03-19 15:44:33 +080053@@ -438,7 +443,11 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u
developer6b966f52022-03-25 02:46:17 +080054 endif
55 ifdef CONFIG_PACKAGE_kmod-mt7915e
56 PKG_MAKE_FLAGS += CONFIG_MT7915E=m
developer1ee54d02022-08-30 13:15:07 +080057- ifdef CONFIG_TARGET_mediatek_filogic
58+ ifdef CONFIG_TARGET_mediatek_mt7986
developer3ecd15b2023-10-16 14:38:12 +080059+ PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
60+ NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
61+ endif
developer117b1c22023-10-18 16:34:53 +080062+ ifdef CONFIG_TARGET_mediatek_mt7981
63 PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
64 NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
65 endif
developeraa71cb02024-03-19 15:44:33 +080066@@ -475,7 +484,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e
developer91981ad2022-12-19 12:19:22 +080067 endif
68
69 define Build/Compile
70- +$(KERNEL_MAKE) $(PKG_JOBS) \
71+ +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
72+ $(KERNEL_MAKE_FLAGS) \
73 $(PKG_MAKE_FLAGS) \
74 M="$(PKG_BUILD_DIR)" \
75 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
developeraa71cb02024-03-19 15:44:33 +080076@@ -568,6 +578,8 @@ define KernelPackage/mt7915-firmware/install
developer6b966f52022-03-25 02:46:17 +080077 $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \
78 $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \
79 $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \
developer6b966f52022-03-25 02:46:17 +080080+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
81+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \
developer16092652022-03-31 00:34:47 +080082 $(1)/lib/firmware/mediatek
developer1ee54d02022-08-30 13:15:07 +080083 endef
84
developeraa71cb02024-03-19 15:44:33 +080085@@ -577,6 +589,7 @@ define KernelPackage/mt7916-firmware/install
developerde7be6c2023-01-10 18:28:20 +080086 $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
87 $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
88 $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
89+ $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \
90 $(1)/lib/firmware/mediatek
91 endef
92
developeraa71cb02024-03-19 15:44:33 +080093@@ -586,7 +599,13 @@ define KernelPackage/mt7981-firmware/install
developer8018aba2023-09-22 12:54:39 +080094 $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \
95 $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \
96 $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \
developer3ecd15b2023-10-16 14:38:12 +080097+ $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin \
developeraa71cb02024-03-19 15:44:33 +080098 $(1)/lib/firmware/mediatek
developer8018aba2023-09-22 12:54:39 +080099+ifdef CONFIG_NET_MEDIATEK_SOC_WED
100+ cp \
101+ $(PKG_BUILD_DIR)/firmware/mt7981_wo.bin \
developeraa71cb02024-03-19 15:44:33 +0800102+ $(1)/lib/firmware/mediatek
developer8018aba2023-09-22 12:54:39 +0800103+endif
104 endef
105
106 define KernelPackage/mt7986-firmware/install
developeraa71cb02024-03-19 15:44:33 +0800107@@ -597,8 +616,60 @@ define KernelPackage/mt7986-firmware/install
developerd67efd72023-09-30 09:20:29 +0800108 $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \
109 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \
developer1ee54d02022-08-30 13:15:07 +0800110 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
developerd67efd72023-09-30 09:20:29 +0800111+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
112+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
developer1ee54d02022-08-30 13:15:07 +0800113+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
developer6b966f52022-03-25 02:46:17 +0800114+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
115+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
developerd67efd72023-09-30 09:20:29 +0800116 $(1)/lib/firmware/mediatek
developer16092652022-03-31 00:34:47 +0800117+ifdef CONFIG_NET_MEDIATEK_SOC_WED
118+ cp \
119+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \
120+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \
developerd67efd72023-09-30 09:20:29 +0800121+ $(1)/lib/firmware/mediatek
developer049f58d2022-04-04 18:16:16 +0800122+endif
developeraa71cb02024-03-19 15:44:33 +0800123+endef
124+
developerd693fb52022-10-24 17:40:58 +0800125+ifdef CONFIG_PACKAGE_kmod-mt7996e
126+define KernelPackage/mt7996e/install
developer98a8ac82022-11-08 22:17:56 +0800127+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
developerd693fb52022-10-24 17:40:58 +0800128+ cp \
developer98a8ac82022-11-08 22:17:56 +0800129+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
130+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
developer62a499e2023-05-22 11:26:35 +0800131+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \
developer98a8ac82022-11-08 22:17:56 +0800132+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
developer9c0688c2023-05-18 21:12:08 +0800133+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \
developer0f5d7c02023-12-05 17:08:28 +0800134+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa_233.bin \
135+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_233.bin \
136+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm_233.bin \
137+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch_233.bin \
developer98a8ac82022-11-08 22:17:56 +0800138+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
developer0f5d7c02023-12-05 17:08:28 +0800139+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_233.bin \
developer38ae70f2023-07-20 22:03:56 +0800140+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \
developera4b5ea32023-09-25 14:02:31 +0800141+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \
142+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \
143+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm.bin \
144+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \
145+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \
developer117b1c22023-10-18 16:34:53 +0800146+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5i.bin \
147+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5e.bin \
148+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2e5e.bin \
developera4b5ea32023-09-25 14:02:31 +0800149+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \
150+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \
151+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_23.bin \
152+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \
153+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \
developer117b1c22023-10-18 16:34:53 +0800154+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2i5i.bin \
155+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2e5e.bin \
developera4b5ea32023-09-25 14:02:31 +0800156+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_24.bin \
157+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_24.bin \
158+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_24.bin \
159+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_24.bin \
160+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_24.bin \
developer117b1c22023-10-18 16:34:53 +0800161+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_24_2i5i.bin \
developer98a8ac82022-11-08 22:17:56 +0800162+ $(1)/lib/firmware/mediatek/mt7996
developeraa71cb02024-03-19 15:44:33 +0800163 endef
developer6b966f52022-03-25 02:46:17 +0800164+endif
developeraa71cb02024-03-19 15:44:33 +0800165
developer293afb52022-11-14 10:25:04 +0800166 define KernelPackage/mt7921-firmware/install
developer6b966f52022-03-25 02:46:17 +0800167 $(INSTALL_DIR) $(1)/lib/firmware/mediatek