blob: f429c7eb4d4b15bbdd7d7bc6ada0922003328c82 [file] [log] [blame]
developer1bfe18b2022-07-13 16:05:35 +08001diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
developer2ff8b782023-01-10 18:28:20 +08002index 6e852bc0..3759473c 100644
developer1bfe18b2022-07-13 16:05:35 +08003--- a/package/kernel/mt76/Makefile
4+++ b/package/kernel/mt76/Makefile
developerf6ebf632023-01-06 19:15:00 +08005@@ -232,7 +232,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)
developerf6ebf632023-01-06 19:15:00 +080014@@ -246,10 +246,18 @@ 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
developer782053a2022-10-24 17:40:58 +080023+define KernelPackage/mt7996e
24+ $(KernelPackage/mt76-default)
25+ TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver
developer4fb99042022-11-08 00:25:27 +080026+ DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT
developer782053a2022-10-24 17:40:58 +080027+ FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
28+ AUTOLOAD:=$(call AutoProbe,mt7996e)
29+endef
30+
developer356ecec2022-11-14 10:25:04 +080031 define KernelPackage/mt7921-firmware
developer2cf5f9a2022-03-25 02:46:17 +080032 $(KernelPackage/mt76-default)
developer356ecec2022-11-14 10:25:04 +080033 TITLE:=MediaTek MT7921 firmware
developerf6ebf632023-01-06 19:15:00 +080034@@ -310,6 +318,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
developerf6ebf632023-01-06 19:15:00 +080046@@ -372,11 +385,14 @@ 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
52 PKG_MAKE_FLAGS += CONFIG_MT7986_WMAC=y
53 NOSTDINC_FLAGS += -DCONFIG_MT7986_WMAC
54 endif
55 endif
developer782053a2022-10-24 17:40:58 +080056+ifdef CONFIG_PACKAGE_kmod-mt7996e
57+ PKG_MAKE_FLAGS += CONFIG_MT7996E=m
58+endif
developer2cf5f9a2022-03-25 02:46:17 +080059 ifdef CONFIG_PACKAGE_kmod-mt7921-common
60 PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m
developerad3184f2022-08-30 13:15:07 +080061 endif
developerf6ebf632023-01-06 19:15:00 +080062@@ -391,7 +407,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7921e
developer6145e8f2022-12-19 12:19:22 +080063 endif
64
65 define Build/Compile
66- +$(KERNEL_MAKE) $(PKG_JOBS) \
67+ +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \
68+ $(KERNEL_MAKE_FLAGS) \
69 $(PKG_MAKE_FLAGS) \
70 M="$(PKG_BUILD_DIR)" \
71 NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
developer2ff8b782023-01-10 18:28:20 +080072@@ -484,6 +501,8 @@ define KernelPackage/mt7915-firmware/install
developer2cf5f9a2022-03-25 02:46:17 +080073 $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \
74 $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \
75 $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \
developer2cf5f9a2022-03-25 02:46:17 +080076+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \
77+ $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \
developerb11a5392022-03-31 00:34:47 +080078 $(1)/lib/firmware/mediatek
developerad3184f2022-08-30 13:15:07 +080079 endef
80
developer2ff8b782023-01-10 18:28:20 +080081@@ -493,6 +512,7 @@ define KernelPackage/mt7916-firmware/install
82 $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \
83 $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \
84 $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \
85+ $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \
86 $(1)/lib/firmware/mediatek
87 endef
88
89@@ -506,8 +526,29 @@ define KernelPackage/mt7986-firmware/install
developerad3184f2022-08-30 13:15:07 +080090 $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \
91 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \
92 $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \
93+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \
developer2cf5f9a2022-03-25 02:46:17 +080094+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \
95+ $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \
developer2ff8b782023-01-10 18:28:20 +080096 $(1)/lib/firmware/mediatek
developerb11a5392022-03-31 00:34:47 +080097+ifdef CONFIG_NET_MEDIATEK_SOC_WED
98+ cp \
99+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \
100+ $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \
developer2ff8b782023-01-10 18:28:20 +0800101+ $(1)/lib/firmware/mediatek
developere7861102022-04-04 18:16:16 +0800102+endif
developer2ff8b782023-01-10 18:28:20 +0800103+endef
104+
developer782053a2022-10-24 17:40:58 +0800105+ifdef CONFIG_PACKAGE_kmod-mt7996e
106+define KernelPackage/mt7996e/install
developer13601d92022-11-08 22:17:56 +0800107+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
developer782053a2022-10-24 17:40:58 +0800108+ cp \
developer13601d92022-11-08 22:17:56 +0800109+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
110+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
111+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
112+ $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
113+ $(1)/lib/firmware/mediatek/mt7996
developer2ff8b782023-01-10 18:28:20 +0800114 endef
developer2cf5f9a2022-03-25 02:46:17 +0800115+endif
developer2ff8b782023-01-10 18:28:20 +0800116
developer356ecec2022-11-14 10:25:04 +0800117 define KernelPackage/mt7921-firmware/install
developer2cf5f9a2022-03-25 02:46:17 +0800118 $(INSTALL_DIR) $(1)/lib/firmware/mediatek
developer2ff8b782023-01-10 18:28:20 +0800119@@ -553,5 +594,6 @@ $(eval $(call KernelPackage,mt7921-common))
developerb11a5392022-03-31 00:34:47 +0800120 $(eval $(call KernelPackage,mt7921u))
121 $(eval $(call KernelPackage,mt7921s))
122 $(eval $(call KernelPackage,mt7921e))
developer782053a2022-10-24 17:40:58 +0800123+$(eval $(call KernelPackage,mt7996e))
developerb11a5392022-03-31 00:34:47 +0800124 $(eval $(call KernelPackage,mt76))
125 $(eval $(call BuildPackage,mt76-test))