blob: 64517c32b45c3d0e1de8f3719c6e821be2439ff2 [file] [log] [blame]
developer38ae70f2023-07-20 22:03:56 +08001diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
developer2506b452023-09-19 14:11:49 +08002index 9a3597f..cfb48d4 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)
developerbdff3cf2023-09-19 13:55:47 +080014@@ -253,7 +253,7 @@ endef
developer1ee54d02022-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
developer6b966f52022-03-25 02:46:17 +080021 endef
22
developer2506b452023-09-19 14:11:49 +080023@@ -312,8 +312,8 @@ endef
24
developerbdff3cf2023-09-19 13:55:47 +080025 define KernelPackage/mt7996e
developer6b966f52022-03-25 02:46:17 +080026 $(KernelPackage/mt76-default)
developer2506b452023-09-19 14:11:49 +080027- TITLE:=MediaTek MT7996E wireless driver
developerbdff3cf2023-09-19 13:55:47 +080028- DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac
developer2506b452023-09-19 14:11:49 +080029+ TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver
developerbdff3cf2023-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
developer6b966f52022-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
developerbdff3cf2023-09-19 13:55:47 +080046@@ -427,7 +432,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u
developer6b966f52022-03-25 02:46:17 +080047 endif
48 ifdef CONFIG_PACKAGE_kmod-mt7915e
49 PKG_MAKE_FLAGS += CONFIG_MT7915E=m
developer1ee54d02022-08-30 13:15:07 +080050- ifdef CONFIG_TARGET_mediatek_filogic
51+ ifdef CONFIG_TARGET_mediatek_mt7986
developer9c0688c2023-05-18 21:12:08 +080052 PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y
53 NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC
developer1ee54d02022-08-30 13:15:07 +080054 endif
developerbdff3cf2023-09-19 13:55:47 +080055@@ -464,7 +469,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e
developer91981ad2022-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)" \
developerbdff3cf2023-09-19 13:55:47 +080065@@ -557,6 +563,8 @@ define KernelPackage/mt7915-firmware/install
developer6b966f52022-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 \
developer6b966f52022-03-25 02:46:17 +080069+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
70+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \
developer16092652022-03-31 00:34:47 +080071 $(1)/lib/firmware/mediatek
developer1ee54d02022-08-30 13:15:07 +080072 endef
73
developerbdff3cf2023-09-19 13:55:47 +080074@@ -566,6 +574,7 @@ define KernelPackage/mt7916-firmware/install
developerde7be6c2023-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
developerbdff3cf2023-09-19 13:55:47 +080082@@ -588,9 +597,34 @@ define KernelPackage/mt7986-firmware/install
developer1ee54d02022-08-30 13:15:07 +080083 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
84 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
85 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
86+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
developer6b966f52022-03-25 02:46:17 +080087+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
88+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
developerde7be6c2023-01-10 18:28:20 +080089 $(1)/lib/firmware/mediatek
developer16092652022-03-31 00:34:47 +080090+ifdef CONFIG_NET_MEDIATEK_SOC_WED
91+ cp \
92+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \
93+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \
developerde7be6c2023-01-10 18:28:20 +080094+ $(1)/lib/firmware/mediatek
developer049f58d2022-04-04 18:16:16 +080095+endif
developer9c0688c2023-05-18 21:12:08 +080096 endef
97
developerd693fb52022-10-24 17:40:58 +080098+ifdef CONFIG_PACKAGE_kmod-mt7996e
99+define KernelPackage/mt7996e/install
developer98a8ac82022-11-08 22:17:56 +0800100+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
developerd693fb52022-10-24 17:40:58 +0800101+ cp \
developer98a8ac82022-11-08 22:17:56 +0800102+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
103+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
developer62a499e2023-05-22 11:26:35 +0800104+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \
developer98a8ac82022-11-08 22:17:56 +0800105+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
developer9c0688c2023-05-18 21:12:08 +0800106+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \
developer98a8ac82022-11-08 22:17:56 +0800107+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
developer38ae70f2023-07-20 22:03:56 +0800108+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \
developer62a499e2023-05-22 11:26:35 +0800109+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_tm.bin \
developer98a8ac82022-11-08 22:17:56 +0800110+ $(1)/lib/firmware/mediatek/mt7996
developer9c0688c2023-05-18 21:12:08 +0800111+endef
developer6b966f52022-03-25 02:46:17 +0800112+endif
developer9c0688c2023-05-18 21:12:08 +0800113+
developer293afb52022-11-14 10:25:04 +0800114 define KernelPackage/mt7921-firmware/install
developer6b966f52022-03-25 02:46:17 +0800115 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
developer9c0688c2023-05-18 21:12:08 +0800116 cp \