developer | 782de84 | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 1 | diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 2 | index 4f0fb5f6..54635763 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 | 45006c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 14 | @@ -247,13 +247,13 @@ endef |
developer | 4170321 | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 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 | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 23 | define KernelPackage/mt7986-firmware |
| 24 | $(KernelPackage/mt76-default) |
| 25 | - DEPENDS:=@TARGET_mediatek_filogic |
| 26 | + DEPENDS:=+@TARGET_mediatek_mt7986 |
| 27 | TITLE:=MediaTek MT7986 firmware |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 28 | endef |
| 29 | |
developer | 79625c4 | 2023-12-05 17:08:28 +0800 | [diff] [blame] | 30 | @@ -317,8 +317,8 @@ endef |
developer | 0443cd3 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 31 | |
developer | 1f7be6f | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 32 | define KernelPackage/mt7996e |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 33 | $(KernelPackage/mt76-default) |
developer | 0443cd3 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 34 | - TITLE:=MediaTek MT7996E wireless driver |
developer | 1b6cf7e | 2023-12-11 09:47:19 +0800 | [diff] [blame] | 35 | - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core |
developer | 0443cd3 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 36 | + TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver |
developer | 1f7be6f | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 37 | + 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 |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 41 | @@ -376,6 +376,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 42 | 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 |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 53 | @@ -438,7 +443,11 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 54 | endif |
| 55 | ifdef CONFIG_PACKAGE_kmod-mt7915e |
| 56 | PKG_MAKE_FLAGS += CONFIG_MT7915E=m |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 57 | - ifdef CONFIG_TARGET_mediatek_filogic |
| 58 | + ifdef CONFIG_TARGET_mediatek_mt7986 |
developer | 4170321 | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 59 | + PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 60 | + NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
| 61 | + endif |
developer | 45006c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 62 | + ifdef CONFIG_TARGET_mediatek_mt7981 |
| 63 | PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 64 | NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
| 65 | endif |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 66 | @@ -475,7 +484,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e |
developer | 6145e8f | 2022-12-19 12:19:22 +0800 | [diff] [blame] | 67 | 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)" \ |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 76 | @@ -568,6 +578,8 @@ define KernelPackage/mt7915-firmware/install |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 77 | $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \ |
| 78 | $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \ |
| 79 | $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \ |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 80 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \ |
| 81 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \ |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 82 | $(1)/lib/firmware/mediatek |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 83 | endef |
| 84 | |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 85 | @@ -577,6 +589,7 @@ define KernelPackage/mt7916-firmware/install |
developer | 2ff8b78 | 2023-01-10 18:28:20 +0800 | [diff] [blame] | 86 | $(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 | |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 93 | @@ -586,7 +599,13 @@ define KernelPackage/mt7981-firmware/install |
developer | a0f6f5d | 2023-09-22 12:54:39 +0800 | [diff] [blame] | 94 | $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \ |
| 95 | $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \ |
| 96 | $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \ |
developer | 4170321 | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 97 | + $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin \ |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 98 | $(1)/lib/firmware/mediatek |
developer | a0f6f5d | 2023-09-22 12:54:39 +0800 | [diff] [blame] | 99 | +ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| 100 | + cp \ |
| 101 | + $(PKG_BUILD_DIR)/firmware/mt7981_wo.bin \ |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 102 | + $(1)/lib/firmware/mediatek |
developer | a0f6f5d | 2023-09-22 12:54:39 +0800 | [diff] [blame] | 103 | +endif |
| 104 | endef |
| 105 | |
| 106 | define KernelPackage/mt7986-firmware/install |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 107 | @@ -597,8 +616,60 @@ define KernelPackage/mt7986-firmware/install |
developer | 4d417ec | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 108 | $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \ |
| 109 | $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \ |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 110 | $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \ |
developer | 4d417ec | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 111 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \ |
| 112 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \ |
developer | ad3184f | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 113 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \ |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 114 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \ |
| 115 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \ |
developer | 4d417ec | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 116 | $(1)/lib/firmware/mediatek |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 117 | +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 \ |
developer | 4d417ec | 2023-09-30 09:20:29 +0800 | [diff] [blame] | 121 | + $(1)/lib/firmware/mediatek |
developer | e786110 | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 122 | +endif |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 123 | +endef |
| 124 | + |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 125 | +ifdef CONFIG_PACKAGE_kmod-mt7996e |
| 126 | +define KernelPackage/mt7996e/install |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 127 | + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 128 | + cp \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 129 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \ |
| 130 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \ |
developer | a0210aa | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 131 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 132 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ |
developer | 36a9a09 | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 133 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ |
developer | 79625c4 | 2023-12-05 17:08:28 +0800 | [diff] [blame] | 134 | + $(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 \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 138 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ |
developer | 79625c4 | 2023-12-05 17:08:28 +0800 | [diff] [blame] | 139 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_233.bin \ |
developer | 782de84 | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 140 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \ |
developer | 9fba7b9 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 141 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \ |
| 142 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \ |
| 143 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm.bin \ |
| 144 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \ |
| 145 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \ |
developer | 45006c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 146 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5i.bin \ |
| 147 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5e.bin \ |
| 148 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2e5e.bin \ |
developer | 9fba7b9 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 149 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \ |
| 150 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \ |
| 151 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_23.bin \ |
| 152 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \ |
| 153 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \ |
developer | 45006c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 154 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2i5i.bin \ |
| 155 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2e5e.bin \ |
developer | 9fba7b9 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 156 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_24.bin \ |
| 157 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_24.bin \ |
| 158 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_24.bin \ |
| 159 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_24.bin \ |
| 160 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_24.bin \ |
developer | 45006c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 161 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_24_2i5i.bin \ |
developer | 13601d9 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 162 | + $(1)/lib/firmware/mediatek/mt7996 |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 163 | endef |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 164 | +endif |
developer | 501b5a1 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 165 | |
developer | 356ecec | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 166 | define KernelPackage/mt7921-firmware/install |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 167 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |