blob: 2cfa8fa7c21563b2a672c7c95054d04347ddfe34 [file] [log] [blame]
developer782de842023-07-20 22:03:56 +08001diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
developer4d417ec2023-09-30 09:20:29 +08002index cc8221d7..aba9eaed 100644
developer1bfe18b2022-07-13 16:05:35 +08003--- a/package/kernel/mt76/Makefile
4+++ b/package/kernel/mt76/Makefile
developer36a9a092023-05-18 21:12:08 +08005@@ -233,7 +233,7 @@ endef
developer2cf5f9a2022-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
developerf6ebf632023-01-06 19:15:00 +080011 DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY
developer2cf5f9a2022-03-25 02:46:17 +080012 FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko
13 AUTOLOAD:=$(call AutoProbe,mt7915e)
developer1f7be6f2023-09-19 13:55:47 +080014@@ -253,7 +253,7 @@ endef
developerad3184f2022-08-30 13:15:07 +080015
16 define KernelPackage/mt7986-firmware
17 $(KernelPackage/mt76-default)
18- DEPENDS:=@TARGET_mediatek_filogic
19+ DEPENDS:=+@TARGET_mediatek_mt7986
20 TITLE:=MediaTek MT7986 firmware
developer2cf5f9a2022-03-25 02:46:17 +080021 endef
22
developer0443cd32023-09-19 14:11:49 +080023@@ -312,8 +312,8 @@ endef
24
developer1f7be6f2023-09-19 13:55:47 +080025 define KernelPackage/mt7996e
developer2cf5f9a2022-03-25 02:46:17 +080026 $(KernelPackage/mt76-default)
developer0443cd32023-09-19 14:11:49 +080027- TITLE:=MediaTek MT7996E wireless driver
developer1f7be6f2023-09-19 13:55:47 +080028- DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac
developer0443cd32023-09-19 14:11:49 +080029+ TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver
developer1f7be6f2023-09-19 13:55:47 +080030+ DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT
31 FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
32 AUTOLOAD:=$(call AutoProbe,mt7996e)
33 endef
34@@ -365,6 +365,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
developer2cf5f9a2022-03-25 02:46:17 +080035 NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH
36 endif
37
38+ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
39+ NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS
40+ PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y
41+endif
42+
43 ifdef CONFIG_PACKAGE_CFG80211_TESTMODE
44 NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE
45 PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y
developer1f7be6f2023-09-19 13:55:47 +080046@@ -427,7 +432,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u
developer2cf5f9a2022-03-25 02:46:17 +080047 endif
48 ifdef CONFIG_PACKAGE_kmod-mt7915e
49 PKG_MAKE_FLAGS += CONFIG_MT7915E=m
developerad3184f2022-08-30 13:15:07 +080050- ifdef CONFIG_TARGET_mediatek_filogic
51+ ifdef CONFIG_TARGET_mediatek_mt7986
developer36a9a092023-05-18 21:12:08 +080052 PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
53 NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
developerad3184f2022-08-30 13:15:07 +080054 endif
developer1f7be6f2023-09-19 13:55:47 +080055@@ -464,7 +469,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e
developer6145e8f2022-12-19 12:19:22 +080056 endif
57
58 define Build/Compile
59- +$(KERNEL_MAKE) $(PKG_JOBS) \
60+ +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
61+ $(KERNEL_MAKE_FLAGS) \
62 $(PKG_MAKE_FLAGS) \
63 M="$(PKG_BUILD_DIR)" \
64 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
developer1f7be6f2023-09-19 13:55:47 +080065@@ -557,6 +563,8 @@ define KernelPackage/mt7915-firmware/install
developer2cf5f9a2022-03-25 02:46:17 +080066 $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \
67 $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \
68 $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \
developer2cf5f9a2022-03-25 02:46:17 +080069+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
70+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \
developerb11a5392022-03-31 00:34:47 +080071 $(1)/lib/firmware/mediatek
developerad3184f2022-08-30 13:15:07 +080072 endef
73
developer1f7be6f2023-09-19 13:55:47 +080074@@ -566,6 +574,7 @@ define KernelPackage/mt7916-firmware/install
developer2ff8b782023-01-10 18:28:20 +080075 $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
76 $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
77 $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
78+ $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \
79 $(1)/lib/firmware/mediatek
80 endef
81
developera0f6f5d2023-09-22 12:54:39 +080082@@ -575,7 +584,13 @@ define KernelPackage/mt7981-firmware/install
83 $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \
84 $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \
85 $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \
86+ $(PKG_BUILD_DIR)/firmware/mt7981_eeprom.bin \
87 $(1)/lib/firmware/mediatek
88+ifdef CONFIG_NET_MEDIATEK_SOC_WED
89+ cp \
90+ $(PKG_BUILD_DIR)/firmware/mt7981_wo.bin \
91+ $(1)/lib/firmware/mediatek
92+endif
93 endef
94
95 define KernelPackage/mt7986-firmware/install
developer4d417ec2023-09-30 09:20:29 +080096@@ -586,8 +601,53 @@ define KernelPackage/mt7986-firmware/install
97 $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \
98 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \
developerad3184f2022-08-30 13:15:07 +080099 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
developer4d417ec2023-09-30 09:20:29 +0800100+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
101+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
developerad3184f2022-08-30 13:15:07 +0800102+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
developer2cf5f9a2022-03-25 02:46:17 +0800103+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
104+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
developer4d417ec2023-09-30 09:20:29 +0800105 $(1)/lib/firmware/mediatek
developerb11a5392022-03-31 00:34:47 +0800106+ifdef CONFIG_NET_MEDIATEK_SOC_WED
107+ cp \
108+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \
109+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \
developer4d417ec2023-09-30 09:20:29 +0800110+ $(1)/lib/firmware/mediatek
developere7861102022-04-04 18:16:16 +0800111+endif
developer4d417ec2023-09-30 09:20:29 +0800112+endef
113+
developer782053a2022-10-24 17:40:58 +0800114+ifdef CONFIG_PACKAGE_kmod-mt7996e
115+define KernelPackage/mt7996e/install
developer13601d92022-11-08 22:17:56 +0800116+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
developer782053a2022-10-24 17:40:58 +0800117+ cp \
developer13601d92022-11-08 22:17:56 +0800118+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
119+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
developera0210aa2023-05-22 11:26:35 +0800120+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \
developer13601d92022-11-08 22:17:56 +0800121+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
developer36a9a092023-05-18 21:12:08 +0800122+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \
developer13601d92022-11-08 22:17:56 +0800123+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
developer782de842023-07-20 22:03:56 +0800124+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \
developera0210aa2023-05-22 11:26:35 +0800125+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_tm.bin \
developer9fba7b92023-09-25 14:02:31 +0800126+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \
127+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \
128+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm.bin \
129+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \
130+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \
131+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom.bin \
132+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \
133+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \
134+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_23.bin \
135+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \
136+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \
137+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23.bin \
138+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_24.bin \
139+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_24.bin \
140+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_24.bin \
141+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_24.bin \
142+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_24.bin \
143+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_24.bin \
developer13601d92022-11-08 22:17:56 +0800144+ $(1)/lib/firmware/mediatek/mt7996
developer4d417ec2023-09-30 09:20:29 +0800145 endef
developer2cf5f9a2022-03-25 02:46:17 +0800146+endif
developer4d417ec2023-09-30 09:20:29 +0800147
developer356ecec2022-11-14 10:25:04 +0800148 define KernelPackage/mt7921-firmware/install
developer2cf5f9a2022-03-25 02:46:17 +0800149 $(INSTALL_DIR) $(1)/lib/firmware/mediatek