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 | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 2 | index 548492e9..24fdd517 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 | 117b1c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 14 | @@ -247,13 +247,13 @@ endef |
developer | 3ecd15b | 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 | 1ee54d0 | 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 | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 28 | endef |
| 29 | |
developer | 0f5d7c0 | 2023-12-05 17:08:28 +0800 | [diff] [blame] | 30 | @@ -317,8 +317,8 @@ endef |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 31 | |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 32 | define KernelPackage/mt7996e |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 33 | $(KernelPackage/mt76-default) |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 34 | - TITLE:=MediaTek MT7996E wireless driver |
developer | f2510f6 | 2023-12-11 09:47:19 +0800 | [diff] [blame] | 35 | - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 36 | + TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver |
developer | bdff3cf | 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 | aa71cb0 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 41 | @@ -376,6 +376,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
developer | 6b966f5 | 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 | aa71cb0 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 53 | @@ -438,7 +443,11 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
developer | 6b966f5 | 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 | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 57 | - ifdef CONFIG_TARGET_mediatek_filogic |
| 58 | + ifdef CONFIG_TARGET_mediatek_mt7986 |
developer | 3ecd15b | 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 | 117b1c2 | 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 | aa71cb0 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 66 | @@ -475,7 +484,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e |
developer | 91981ad | 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 | aa71cb0 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 76 | @@ -568,6 +578,8 @@ define KernelPackage/mt7915-firmware/install |
developer | 6b966f5 | 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 | 6b966f5 | 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 | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 82 | $(1)/lib/firmware/mediatek |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 83 | endef |
| 84 | |
developer | aa71cb0 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 85 | @@ -577,6 +589,7 @@ define KernelPackage/mt7916-firmware/install |
developer | de7be6c | 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 | aa71cb0 | 2024-03-19 15:44:33 +0800 | [diff] [blame] | 93 | @@ -586,7 +599,13 @@ define KernelPackage/mt7981-firmware/install |
developer | 8018aba | 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 | 3ecd15b | 2023-10-16 14:38:12 +0800 | [diff] [blame] | 97 | + $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin \ |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 98 | + $(1)/lib/firmware/mediatek |
developer | 8018aba | 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 | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 102 | $(1)/lib/firmware/mediatek |
developer | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame] | 103 | +endif |
| 104 | endef |
| 105 | |
| 106 | define KernelPackage/mt7986-firmware/install |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 107 | @@ -597,9 +616,62 @@ define KernelPackage/mt7986-firmware/install |
developer | d67efd7 | 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 | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 110 | $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \ |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 111 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \ |
| 112 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \ |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 113 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \ |
developer | 6b966f5 | 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 | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 116 | + $(1)/lib/firmware/mediatek |
developer | 1609265 | 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 | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 121 | $(1)/lib/firmware/mediatek |
developer | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 122 | +endif |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 123 | endef |
| 124 | |
developer | d693fb5 | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 125 | +ifdef CONFIG_PACKAGE_kmod-mt7996e |
| 126 | +define KernelPackage/mt7996e/install |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 127 | + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 |
developer | d693fb5 | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 128 | + cp \ |
developer | 98a8ac8 | 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 | 62a499e | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 131 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 132 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 133 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ |
developer | 0f5d7c0 | 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 | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 138 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 139 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_2i5i6i.bin \ |
developer | 0f5d7c0 | 2023-12-05 17:08:28 +0800 | [diff] [blame] | 140 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_233.bin \ |
developer | 38ae70f | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 141 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \ |
developer | a4b5ea3 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 142 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \ |
| 143 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \ |
| 144 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm.bin \ |
| 145 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \ |
| 146 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \ |
developer | 117b1c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 147 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5i.bin \ |
| 148 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5e.bin \ |
| 149 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2e5e.bin \ |
developer | a4b5ea3 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 150 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_23.bin \ |
| 151 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_23.bin \ |
| 152 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_23.bin \ |
| 153 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_23.bin \ |
| 154 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_23.bin \ |
developer | 117b1c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 155 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2i5i.bin \ |
| 156 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_23_2e5e.bin \ |
developer | a4b5ea3 | 2023-09-25 14:02:31 +0800 | [diff] [blame] | 157 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa_24.bin \ |
| 158 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_24.bin \ |
| 159 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm_tm_24.bin \ |
| 160 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch_24.bin \ |
| 161 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp_24.bin \ |
developer | 117b1c2 | 2023-10-18 16:34:53 +0800 | [diff] [blame] | 162 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_24_2i5i.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 163 | + $(1)/lib/firmware/mediatek/mt7996 |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 164 | +endef |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 165 | +endif |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 166 | + |
developer | 293afb5 | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 167 | define KernelPackage/mt7921-firmware/install |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 168 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |
developer | 1c16259 | 2024-04-18 18:32:18 +0800 | [diff] [blame] | 169 | cp \ |