developer | e786110 | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 1 | From bd0dae19286bf13e74698d753a98e46b155a5882 Mon Sep 17 00:00:00 2001 |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 2 | From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 3 | Date: Wed, 30 Mar 2022 10:38:24 +0800 |
developer | 7800b8d | 2022-06-23 22:15:56 +0800 | [diff] [blame] | 4 | Subject: [PATCH] mt76: add MT7986/MT7916/Besra support in makefile |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
developer | e786110 | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 7 | kernel/mt76/Makefile | 69 +++++++++++++++++++++++++++++++++++++++++++- |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 8 | 1 file changed, 68 insertions(+), 1 deletion(-) |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 9 | |
| 10 | diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |
developer | e786110 | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 11 | index 0ccf067..75e65f7 100644 |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 12 | --- a/package/kernel/mt76/Makefile |
| 13 | +++ b/package/kernel/mt76/Makefile |
| 14 | @@ -220,12 +220,20 @@ endef |
| 15 | |
| 16 | define KernelPackage/mt7915e |
| 17 | $(KernelPackage/mt76-default) |
| 18 | - TITLE:=MediaTek MT7915e wireless driver |
| 19 | + TITLE:=MediaTek MT7915e/MT7986/MT7916 wireless driver |
| 20 | DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY |
| 21 | FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko |
| 22 | AUTOLOAD:=$(call AutoProbe,mt7915e) |
| 23 | endef |
| 24 | |
developer | 7800b8d | 2022-06-23 22:15:56 +0800 | [diff] [blame] | 25 | +define KernelPackage/besra |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 26 | + $(KernelPackage/mt76-default) |
| 27 | + TITLE:=MediaTek MT7902/MT7990 wireless driver |
developer | 3ef2333 | 2022-06-10 11:48:11 +0800 | [diff] [blame] | 28 | + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@DRIVER_11BE_SUPPORT |
developer | 7800b8d | 2022-06-23 22:15:56 +0800 | [diff] [blame] | 29 | + FILES:= $(PKG_BUILD_DIR)/besra/besra.ko |
| 30 | + AUTOLOAD:=$(call AutoProbe,besra) |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 31 | +endef |
| 32 | + |
| 33 | define KernelPackage/mt7921-common |
| 34 | $(KernelPackage/mt76-default) |
| 35 | TITLE:=MediaTek MT7615 wireless driver common code |
| 36 | @@ -281,6 +289,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
| 37 | NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH |
| 38 | endif |
| 39 | |
| 40 | +ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS |
| 41 | + NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS |
| 42 | + PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y |
| 43 | +endif |
| 44 | + |
| 45 | ifdef CONFIG_PACKAGE_CFG80211_TESTMODE |
| 46 | NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE |
| 47 | PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y |
| 48 | @@ -343,6 +356,13 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
| 49 | endif |
| 50 | ifdef CONFIG_PACKAGE_kmod-mt7915e |
| 51 | PKG_MAKE_FLAGS += CONFIG_MT7915E=m |
| 52 | +ifdef CONFIG_TARGET_mediatek_mt7986 |
| 53 | + PKG_MAKE_FLAGS += CONFIG_MT7986_WMAC=y |
| 54 | + NOSTDINC_FLAGS += -DCONFIG_MT7986_WMAC |
| 55 | +endif |
| 56 | +endif |
developer | 7800b8d | 2022-06-23 22:15:56 +0800 | [diff] [blame] | 57 | +ifdef CONFIG_PACKAGE_kmod-besra |
| 58 | + PKG_MAKE_FLAGS += CONFIG_BESRA=m |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 59 | endif |
| 60 | ifdef CONFIG_PACKAGE_kmod-mt7921-common |
| 61 | PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 62 | @@ -447,9 +467,55 @@ define KernelPackage/mt7915e/install |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 63 | $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \ |
| 64 | $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \ |
| 65 | $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \ |
| 66 | + $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \ |
| 67 | + $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \ |
| 68 | + $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \ |
| 69 | + $(1)/lib/firmware/mediatek |
| 70 | +ifdef CONFIG_TARGET_mediatek_mt7986 |
| 71 | + cp \ |
| 72 | + $(PKG_BUILD_DIR)/firmware/mt7986_wa.bin \ |
| 73 | + $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \ |
| 74 | + $(PKG_BUILD_DIR)/firmware/mt7986_wm_mt7975.bin \ |
| 75 | + $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \ |
| 76 | + $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \ |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 77 | + $(1)/lib/firmware/mediatek |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 78 | +endif |
| 79 | + cp \ |
| 80 | + $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \ |
| 81 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom.bin \ |
| 82 | + $(PKG_BUILD_DIR)/firmware/mt7915_eeprom_dbdc.bin \ |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 83 | $(1)/lib/firmware/mediatek |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 84 | +ifdef CONFIG_TARGET_mediatek_mt7986 |
| 85 | + cp \ |
| 86 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \ |
| 87 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \ |
| 88 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \ |
| 89 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \ |
| 90 | + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \ |
| 91 | + $(1)/lib/firmware/mediatek |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 92 | +ifdef CONFIG_NET_MEDIATEK_SOC_WED |
| 93 | + cp \ |
| 94 | + $(PKG_BUILD_DIR)/firmware/mt7986_wo_0.bin \ |
| 95 | + $(PKG_BUILD_DIR)/firmware/mt7986_wo_1.bin \ |
| 96 | + $(1)/lib/firmware/mediatek |
| 97 | +endif |
developer | e786110 | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 98 | +endif |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 99 | endef |
| 100 | |
developer | 7800b8d | 2022-06-23 22:15:56 +0800 | [diff] [blame] | 101 | +ifdef CONFIG_PACKAGE_kmod-besra |
| 102 | +define KernelPackage/besra/install |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 103 | + $(INSTALL_DIR) $(1)/lib/firmware/mediatek |
| 104 | + cp \ |
| 105 | + $(PKG_BUILD_DIR)/firmware/mt7902_wa.bin \ |
| 106 | + $(PKG_BUILD_DIR)/firmware/mt7902_wm.bin \ |
| 107 | + $(PKG_BUILD_DIR)/firmware/mt7902_rom_patch.bin \ |
| 108 | + $(PKG_BUILD_DIR)/firmware/mt7902_wf_rom.bin \ |
| 109 | + $(PKG_BUILD_DIR)/firmware/mt7902_wf_rom_sram.bin \ |
| 110 | + $(PKG_BUILD_DIR)/firmware/mt7902_eeprom.bin \ |
| 111 | + $(1)/lib/firmware/mediatek |
| 112 | +endef |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 113 | +endif |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 114 | + |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 115 | define KernelPackage/mt7921e/install |
| 116 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 117 | cp \ |
developer | 4721e25 | 2022-06-21 16:41:28 +0800 | [diff] [blame] | 118 | @@ -489,5 +555,6 @@ $(eval $(call KernelPackage,mt7921-common)) |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 119 | $(eval $(call KernelPackage,mt7921u)) |
| 120 | $(eval $(call KernelPackage,mt7921s)) |
| 121 | $(eval $(call KernelPackage,mt7921e)) |
developer | 7800b8d | 2022-06-23 22:15:56 +0800 | [diff] [blame] | 122 | +$(eval $(call KernelPackage,besra)) |
developer | b11a539 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 123 | $(eval $(call KernelPackage,mt76)) |
| 124 | $(eval $(call BuildPackage,mt76-test)) |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 125 | -- |
| 126 | 2.29.2 |
| 127 | |