developer | 38ae70f | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 1 | diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 2 | index cc8221d7..aba9eaed 100644 |
developer | ef832a5 | 2022-07-13 16:05:35 +0800 | [diff] [blame] | 3 | --- a/package/kernel/mt76/Makefile |
| 4 | +++ b/package/kernel/mt76/Makefile |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 5 | @@ -233,7 +233,7 @@ endef |
developer | 6b966f5 | 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 | 8681f49 | 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 | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 12 | FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko |
| 13 | AUTOLOAD:=$(call AutoProbe,mt7915e) |
developer | 3ecd15b | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 14 | @@ -247,7 +247,7 @@ endef |
| 15 | |
| 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 | |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 23 | @@ -253,7 +253,7 @@ endef |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 24 | |
| 25 | define KernelPackage/mt7986-firmware |
| 26 | $(KernelPackage/mt76-default) |
| 27 | - DEPENDS:=@TARGET_mediatek_filogic |
| 28 | + DEPENDS:=+@TARGET_mediatek_mt7986 |
| 29 | TITLE:=MediaTek MT7986 firmware |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 30 | endef |
| 31 | |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 32 | @@ -312,8 +312,8 @@ endef |
| 33 | |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 34 | define KernelPackage/mt7996e |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 35 | $(KernelPackage/mt76-default) |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 36 | - TITLE:=MediaTek MT7996E wireless driver |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 37 | - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 38 | + TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 39 | + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT |
| 40 | FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko |
| 41 | AUTOLOAD:=$(call AutoProbe,mt7996e) |
| 42 | endef |
| 43 | @@ -365,6 +365,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 44 | NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH |
| 45 | endif |
| 46 | |
| 47 | +ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS |
| 48 | + NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS |
| 49 | + PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y |
| 50 | +endif |
| 51 | + |
| 52 | ifdef CONFIG_PACKAGE_CFG80211_TESTMODE |
| 53 | NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE |
| 54 | PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 55 | @@ -427,7 +432,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 56 | endif |
| 57 | ifdef CONFIG_PACKAGE_kmod-mt7915e |
| 58 | PKG_MAKE_FLAGS += CONFIG_MT7915E=m |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 59 | - ifdef CONFIG_TARGET_mediatek_filogic |
| 60 | + ifdef CONFIG_TARGET_mediatek_mt7986 |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 61 | PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 62 | NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 63 | endif |
developer | 3ecd15b | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 64 | @@ -436,6 +436,10 @@ ifdef CONFIG_PACKAGE_kmod-mt7915e |
| 65 | PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 66 | NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
| 67 | endif |
| 68 | + ifdef CONFIG_TARGET_mediatek_mt7981 |
| 69 | + PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 70 | + NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
| 71 | + endif |
| 72 | endif |
| 73 | ifdef CONFIG_PACKAGE_kmod-mt792x-common |
| 74 | PKG_MAKE_FLAGS += CONFIG_MT792x_LIB=m |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 75 | @@ -464,7 +469,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e |
developer | 91981ad | 2022-12-19 12:19:22 +0800 | [diff] [blame] | 76 | endif |
| 77 | |
| 78 | define Build/Compile |
| 79 | - +$(KERNEL_MAKE) $(PKG_JOBS) \ |
| 80 | + +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ |
| 81 | + $(KERNEL_MAKE_FLAGS) \ |
| 82 | $(PKG_MAKE_FLAGS) \ |
| 83 | M="$(PKG_BUILD_DIR)" \ |
| 84 | NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 85 | @@ -557,6 +563,8 @@ define KernelPackage/mt7915-firmware/install |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 86 | $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \ |
| 87 | $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \ |
| 88 | $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \ |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 89 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \ |
| 90 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \ |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 91 | $(1)/lib/firmware/mediatek |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 92 | endef |
| 93 | |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 94 | @@ -566,6 +574,7 @@ define KernelPackage/mt7916-firmware/install |
developer | de7be6c | 2023-01-10 18:28:20 +0800 | [diff] [blame] | 95 | $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \ |
| 96 | $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \ |
| 97 | $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \ |
| 98 | + $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \ |
| 99 | $(1)/lib/firmware/mediatek |
| 100 | endef |
| 101 | |
developer | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame] | 102 | @@ -575,7 +584,13 @@ define KernelPackage/mt7981-firmware/install |
| 103 | $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \ |
| 104 | $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \ |
| 105 | $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \ |
developer | 3ecd15b | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 106 | + $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin \ |
developer | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame] | 107 | $(1)/lib/firmware/mediatek |
| 108 | +ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| 109 | + cp \ |
| 110 | + $(PKG_BUILD_DIR)/firmware/mt7981_wo.bin \ |
| 111 | + $(1)/lib/firmware/mediatek |
| 112 | +endif |
| 113 | endef |
| 114 | |
| 115 | define KernelPackage/mt7986-firmware/install |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 116 | @@ -586,8 +601,53 @@ define KernelPackage/mt7986-firmware/install |
| 117 | $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \ |
| 118 | $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \ |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 119 | $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \ |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 120 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \ |
| 121 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \ |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 122 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \ |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 123 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \ |
| 124 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \ |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 125 | $(1)/lib/firmware/mediatek |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 126 | +ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| 127 | + cp \ |
| 128 | + $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \ |
| 129 | + $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \ |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 130 | + $(1)/lib/firmware/mediatek |
developer | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 131 | +endif |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 132 | +endef |
| 133 | + |
developer | d693fb5 | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 134 | +ifdef CONFIG_PACKAGE_kmod-mt7996e |
| 135 | +define KernelPackage/mt7996e/install |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 136 | + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 |
developer | d693fb5 | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 137 | + cp \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 138 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \ |
| 139 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \ |
developer | 62a499e | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 140 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 141 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 142 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 143 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ |
developer | 38ae70f | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 144 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \ |
developer | 62a499e | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 145 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_tm.bin \ |
developer | a4b5ea3 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 146 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \ |
| 147 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \ |
| 148 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm.bin \ |
| 149 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \ |
| 150 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \ |
| 151 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom.bin \ |
| 152 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \ |
| 153 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \ |
| 154 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_23.bin \ |
| 155 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \ |
| 156 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \ |
| 157 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23.bin \ |
| 158 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_24.bin \ |
| 159 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_24.bin \ |
| 160 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_24.bin \ |
| 161 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_24.bin \ |
| 162 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_24.bin \ |
| 163 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_24.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 164 | + $(1)/lib/firmware/mediatek/mt7996 |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 165 | endef |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 166 | +endif |
developer | d67efd7 | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 167 | |
developer | 293afb5 | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 168 | define KernelPackage/mt7921-firmware/install |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 169 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |