blob: 21d9080f85b11d591d4183a57db92959088fef65 [file] [log] [blame]
developer782de842023-07-20 22:03:56 +08001diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
developer1b6cf7e2023-12-11 09:47:19 +08002index 762f474c..6a856513 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)
developer45006c22023-10-18 16:34:53 +080014@@ -247,13 +247,13 @@ endef
developer41703212023-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
developerad3184f2022-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
developer2cf5f9a2022-03-25 02:46:17 +080028 endef
29
developer79625c42023-12-05 17:08:28 +080030@@ -317,8 +317,8 @@ endef
developer0443cd32023-09-19 14:11:49 +080031
developer1f7be6f2023-09-19 13:55:47 +080032 define KernelPackage/mt7996e
developer2cf5f9a2022-03-25 02:46:17 +080033 $(KernelPackage/mt76-default)
developer0443cd32023-09-19 14:11:49 +080034- TITLE:=MediaTek MT7996E wireless driver
developer1b6cf7e2023-12-11 09:47:19 +080035- DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core
developer0443cd32023-09-19 14:11:49 +080036+ TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver
developer1f7be6f2023-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
developer79625c42023-12-05 17:08:28 +080041@@ -370,6 +370,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH
developer2cf5f9a2022-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
developer79625c42023-12-05 17:08:28 +080053@@ -432,7 +437,11 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u
developer2cf5f9a2022-03-25 02:46:17 +080054 endif
55 ifdef CONFIG_PACKAGE_kmod-mt7915e
56 PKG_MAKE_FLAGS += CONFIG_MT7915E=m
developerad3184f2022-08-30 13:15:07 +080057- ifdef CONFIG_TARGET_mediatek_filogic
58+ ifdef CONFIG_TARGET_mediatek_mt7986
developer41703212023-10-16 14:38:12 +080059+ PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
60+ NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
61+ endif
developer45006c22023-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
developer79625c42023-12-05 17:08:28 +080066@@ -469,7 +478,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e
developer6145e8f2022-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)" \
developer79625c42023-12-05 17:08:28 +080076@@ -562,6 +572,8 @@ define KernelPackage/mt7915-firmware/install
developer2cf5f9a2022-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 \
developer2cf5f9a2022-03-25 02:46:17 +080080+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
81+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \
developerb11a5392022-03-31 00:34:47 +080082 $(1)/lib/firmware/mediatek
developerad3184f2022-08-30 13:15:07 +080083 endef
84
developer79625c42023-12-05 17:08:28 +080085@@ -571,6 +583,7 @@ define KernelPackage/mt7916-firmware/install
developer2ff8b782023-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
developer79625c42023-12-05 17:08:28 +080093@@ -580,7 +593,13 @@ define KernelPackage/mt7981-firmware/install
developera0f6f5d2023-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 \
developer41703212023-10-16 14:38:12 +080097+ $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin \
developer45006c22023-10-18 16:34:53 +080098+ $(1)/lib/firmware/mediatek
developera0f6f5d2023-09-22 12:54:39 +080099+ifdef CONFIG_NET_MEDIATEK_SOC_WED
100+ cp \
101+ $(PKG_BUILD_DIR)/firmware/mt7981_wo.bin \
developer45006c22023-10-18 16:34:53 +0800102 $(1)/lib/firmware/mediatek
developera0f6f5d2023-09-22 12:54:39 +0800103+endif
104 endef
105
106 define KernelPackage/mt7986-firmware/install
developer79625c42023-12-05 17:08:28 +0800107@@ -591,9 +610,62 @@ define KernelPackage/mt7986-firmware/install
developer4d417ec2023-09-30 09:20:29 +0800108 $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \
109 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \
developerad3184f2022-08-30 13:15:07 +0800110 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
developer4d417ec2023-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 \
developerad3184f2022-08-30 13:15:07 +0800113+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
developer2cf5f9a2022-03-25 02:46:17 +0800114+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
115+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
developer4d417ec2023-09-30 09:20:29 +0800116 $(1)/lib/firmware/mediatek
developerb11a5392022-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 \
developer4d417ec2023-09-30 09:20:29 +0800121+ $(1)/lib/firmware/mediatek
developere7861102022-04-04 18:16:16 +0800122+endif
developer45006c22023-10-18 16:34:53 +0800123 endef
124
developer782053a2022-10-24 17:40:58 +0800125+ifdef CONFIG_PACKAGE_kmod-mt7996e
126+define KernelPackage/mt7996e/install
developer13601d92022-11-08 22:17:56 +0800127+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
developer782053a2022-10-24 17:40:58 +0800128+ cp \
developer13601d92022-11-08 22:17:56 +0800129+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
130+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
developera0210aa2023-05-22 11:26:35 +0800131+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \
developer13601d92022-11-08 22:17:56 +0800132+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
developer36a9a092023-05-18 21:12:08 +0800133+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \
developer79625c42023-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 \
developer13601d92022-11-08 22:17:56 +0800138+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
developer79625c42023-12-05 17:08:28 +0800139+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_233.bin \
developer782de842023-07-20 22:03:56 +0800140+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \
developera0210aa2023-05-22 11:26:35 +0800141+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_tm.bin \
developer9fba7b92023-09-25 14:02:31 +0800142+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \
143+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \
144+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm.bin \
145+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \
146+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \
developer45006c22023-10-18 16:34:53 +0800147+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5i.bin \
148+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5e.bin \
149+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2e5e.bin \
developer9fba7b92023-09-25 14:02:31 +0800150+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \
151+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \
152+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_23.bin \
153+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \
154+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \
developer45006c22023-10-18 16:34:53 +0800155+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2i5i.bin \
156+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2e5e.bin \
developer9fba7b92023-09-25 14:02:31 +0800157+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_24.bin \
158+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_24.bin \
159+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_24.bin \
160+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_24.bin \
161+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_24.bin \
developer45006c22023-10-18 16:34:53 +0800162+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_24_2i5i.bin \
developer13601d92022-11-08 22:17:56 +0800163+ $(1)/lib/firmware/mediatek/mt7996
developer45006c22023-10-18 16:34:53 +0800164+endef
developer2cf5f9a2022-03-25 02:46:17 +0800165+endif
developer45006c22023-10-18 16:34:53 +0800166+
developer356ecec2022-11-14 10:25:04 +0800167 define KernelPackage/mt7921-firmware/install
developer2cf5f9a2022-03-25 02:46:17 +0800168 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
developer45006c22023-10-18 16:34:53 +0800169 cp \