developer | 782de84 | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 1 | diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |
| 2 | index 2ab6d6d6..fa81509b 100644 |
developer | 1bfe18b | 2022-07-13 16:05:35 +0800 | [diff] [blame] | 3 | --- a/package/kernel/mt76/Makefile |
| 4 | +++ b/package/kernel/mt76/Makefile |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 5 | @@ -233,7 +233,7 @@ endef |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 6 | |
| 7 | define KernelPackage/mt7915e |
| 8 | $(KernelPackage/mt76-default) |
| 9 | - TITLE:=MediaTek MT7915e wireless driver |
| 10 | + TITLE:=MediaTek MT7915e/MT7986/MT7916 wireless driver |
developer | f6ebf63 | 2023-01-06 19:15:00 +0800 | [diff] [blame] | 11 | DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 12 | FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko |
| 13 | AUTOLOAD:=$(call AutoProbe,mt7915e) |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 14 | @@ -253,10 +253,18 @@ endef |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 15 | |
| 16 | define KernelPackage/mt7986-firmware |
| 17 | $(KernelPackage/mt76-default) |
| 18 | - DEPENDS:=@TARGET_mediatek_filogic |
| 19 | + DEPENDS:=+@TARGET_mediatek_mt7986 |
| 20 | TITLE:=MediaTek MT7986 firmware |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 21 | endef |
| 22 | |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 23 | +define KernelPackage/mt7996e |
| 24 | + $(KernelPackage/mt76-default) |
| 25 | + TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver |
developer | 4fb9904 | 2022-11-08 00:25:27 +0800 | [diff] [blame] | 26 | + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 27 | + FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko |
| 28 | + AUTOLOAD:=$(call AutoProbe,mt7996e) |
| 29 | +endef |
| 30 | + |
developer | 356ecec | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 31 | define KernelPackage/mt7921-firmware |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 32 | $(KernelPackage/mt76-default) |
developer | 356ecec | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 33 | TITLE:=MediaTek MT7921 firmware |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 34 | @@ -317,6 +325,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 35 | 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 |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 46 | @@ -379,11 +392,14 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 47 | endif |
| 48 | ifdef CONFIG_PACKAGE_kmod-mt7915e |
| 49 | PKG_MAKE_FLAGS += CONFIG_MT7915E=m |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 50 | - ifdef CONFIG_TARGET_mediatek_filogic |
| 51 | + ifdef CONFIG_TARGET_mediatek_mt7986 |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 52 | PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 53 | NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 54 | endif |
| 55 | endif |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 56 | +ifdef CONFIG_PACKAGE_kmod-mt7996e |
| 57 | + PKG_MAKE_FLAGS += CONFIG_MT7996E=m |
| 58 | +endif |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 59 | ifdef CONFIG_PACKAGE_kmod-mt7921-common |
| 60 | PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 61 | endif |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 62 | @@ -398,7 +414,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7921e |
developer | 6145e8f | 2022-12-19 12:19:22 +0800 | [diff] [blame] | 63 | 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)" \ |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 72 | @@ -491,6 +508,8 @@ define KernelPackage/mt7915-firmware/install |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 73 | $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \ |
| 74 | $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \ |
| 75 | $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \ |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 76 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \ |
| 77 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \ |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 78 | $(1)/lib/firmware/mediatek |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 79 | endef |
| 80 | |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 81 | @@ -500,6 +519,7 @@ define KernelPackage/mt7916-firmware/install |
developer | 2ff8b78 | 2023-01-10 18:28:20 +0800 | [diff] [blame] | 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 | |
developer | 782de84 | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 89 | @@ -522,9 +542,34 @@ define KernelPackage/mt7986-firmware/install |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 90 | $(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 \ |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 94 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \ |
| 95 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \ |
developer | 2ff8b78 | 2023-01-10 18:28:20 +0800 | [diff] [blame] | 96 | $(1)/lib/firmware/mediatek |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 97 | +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 \ |
developer | 2ff8b78 | 2023-01-10 18:28:20 +0800 | [diff] [blame] | 101 | + $(1)/lib/firmware/mediatek |
developer | e786110 | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 102 | +endif |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 103 | endef |
| 104 | |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 105 | +ifdef CONFIG_PACKAGE_kmod-mt7996e |
| 106 | +define KernelPackage/mt7996e/install |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 107 | + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 108 | + cp \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 109 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \ |
| 110 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \ |
developer | a0210aa | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 111 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 112 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 113 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 114 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ |
developer | 782de84 | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 115 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \ |
developer | a0210aa | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 116 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_tm.bin \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 117 | + $(1)/lib/firmware/mediatek/mt7996 |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 118 | +endef |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 119 | +endif |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 120 | + |
developer | 356ecec | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 121 | define KernelPackage/mt7921-firmware/install |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 122 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 123 | cp \ |
developer | 782de84 | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 124 | @@ -570,5 +615,6 @@ $(eval $(call KernelPackage,mt7921-common)) |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 125 | $(eval $(call KernelPackage,mt7921u)) |
| 126 | $(eval $(call KernelPackage,mt7921s)) |
| 127 | $(eval $(call KernelPackage,mt7921e)) |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 128 | +$(eval $(call KernelPackage,mt7996e)) |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 129 | $(eval $(call KernelPackage,mt76)) |
| 130 | $(eval $(call BuildPackage,mt76-test)) |