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 | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame^] | 2 | index 9a3597f..b8639e5 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 | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 14 | @@ -253,7 +253,7 @@ endef |
developer | 1ee54d0 | 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 | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 21 | endef |
| 22 | |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 23 | @@ -312,8 +312,8 @@ endef |
| 24 | |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 25 | define KernelPackage/mt7996e |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 26 | $(KernelPackage/mt76-default) |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 27 | - TITLE:=MediaTek MT7996E wireless driver |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 28 | - DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac |
developer | 2506b45 | 2023-09-19 14:11:49 +0800 | [diff] [blame] | 29 | + TITLE:=MediaTek MT7996/MT7995/MT7919 wireless driver |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 30 | + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT |
| 31 | FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko |
| 32 | AUTOLOAD:=$(call AutoProbe,mt7996e) |
| 33 | endef |
| 34 | @@ -365,6 +365,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
developer | 6b966f5 | 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 | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 46 | @@ -427,7 +432,7 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
developer | 6b966f5 | 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 | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 50 | - ifdef CONFIG_TARGET_mediatek_filogic |
| 51 | + ifdef CONFIG_TARGET_mediatek_mt7986 |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 52 | PKG_MAKE_FLAGS += CONFIG_MT798X_WMAC=y |
| 53 | NOSTDINC_FLAGS += -DCONFIG_MT798X_WMAC |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 54 | endif |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 55 | @@ -464,7 +469,8 @@ ifdef CONFIG_PACKAGE_kmod-mt7925e |
developer | 91981ad | 2022-12-19 12:19:22 +0800 | [diff] [blame] | 56 | endif |
| 57 | |
| 58 | define Build/Compile |
| 59 | - +$(KERNEL_MAKE) $(PKG_JOBS) \ |
| 60 | + +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ |
| 61 | + $(KERNEL_MAKE_FLAGS) \ |
| 62 | $(PKG_MAKE_FLAGS) \ |
| 63 | M="$(PKG_BUILD_DIR)" \ |
| 64 | NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \ |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 65 | @@ -557,6 +563,8 @@ define KernelPackage/mt7915-firmware/install |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 66 | $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \ |
| 67 | $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \ |
| 68 | $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \ |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 69 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \ |
| 70 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \ |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 71 | $(1)/lib/firmware/mediatek |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 72 | endef |
| 73 | |
developer | bdff3cf | 2023-09-19 13:55:47 +0800 | [diff] [blame] | 74 | @@ -566,6 +574,7 @@ define KernelPackage/mt7916-firmware/install |
developer | de7be6c | 2023-01-10 18:28:20 +0800 | [diff] [blame] | 75 | $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \ |
| 76 | $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \ |
| 77 | $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \ |
| 78 | + $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \ |
| 79 | $(1)/lib/firmware/mediatek |
| 80 | endef |
| 81 | |
developer | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame^] | 82 | @@ -575,7 +584,13 @@ define KernelPackage/mt7981-firmware/install |
| 83 | $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \ |
| 84 | $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \ |
| 85 | $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \ |
| 86 | + $(PKG_BUILD_DIR)/firmware/mt7981_eeprom.bin \ |
| 87 | $(1)/lib/firmware/mediatek |
| 88 | +ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| 89 | + cp \ |
| 90 | + $(PKG_BUILD_DIR)/firmware/mt7981_wo.bin \ |
| 91 | + $(1)/lib/firmware/mediatek |
| 92 | +endif |
| 93 | endef |
| 94 | |
| 95 | define KernelPackage/mt7986-firmware/install |
| 96 | @@ -588,9 +603,34 @@ define KernelPackage/mt7986-firmware/install |
developer | 1ee54d0 | 2022-08-30 13:15:07 +0800 | [diff] [blame] | 97 | $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \ |
| 98 | $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \ |
| 99 | $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \ |
| 100 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \ |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 101 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \ |
| 102 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \ |
developer | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame^] | 103 | + $(1)/lib/firmware/mediatek |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 104 | +ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| 105 | + cp \ |
| 106 | + $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \ |
| 107 | + $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \ |
developer | 8018aba | 2023-09-22 12:54:39 +0800 | [diff] [blame^] | 108 | $(1)/lib/firmware/mediatek |
developer | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 109 | +endif |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 110 | endef |
| 111 | |
developer | d693fb5 | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 112 | +ifdef CONFIG_PACKAGE_kmod-mt7996e |
| 113 | +define KernelPackage/mt7996e/install |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 114 | + $(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996 |
developer | d693fb5 | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 115 | + cp \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 116 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \ |
| 117 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \ |
developer | 62a499e | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 118 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm_tm.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 119 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \ |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 120 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 121 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \ |
developer | 38ae70f | 2023-07-20 22:03:56 +0800 | [diff] [blame] | 122 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_dual_404.bin \ |
developer | 62a499e | 2023-05-22 11:26:35 +0800 | [diff] [blame] | 123 | + $(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom_tm.bin \ |
developer | 98a8ac8 | 2022-11-08 22:17:56 +0800 | [diff] [blame] | 124 | + $(1)/lib/firmware/mediatek/mt7996 |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 125 | +endef |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 126 | +endif |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 127 | + |
developer | 293afb5 | 2022-11-14 10:25:04 +0800 | [diff] [blame] | 128 | define KernelPackage/mt7921-firmware/install |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 129 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |
developer | 9c0688c | 2023-05-18 21:12:08 +0800 | [diff] [blame] | 130 | cp \ |