developer | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 1 | From bd0dae19286bf13e74698d753a98e46b155a5882 Mon Sep 17 00:00:00 2001 |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 2 | From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 3 | Date: Wed, 30 Mar 2022 10:38:24 +0800 |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 4 | Subject: [PATCH] mt76: add MT7986/MT7916/Bersa support in makefile |
| 5 | |
| 6 | --- |
developer | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 7 | kernel/mt76/Makefile | 69 +++++++++++++++++++++++++++++++++++++++++++- |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 8 | 1 file changed, 68 insertions(+), 1 deletion(-) |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 9 | |
| 10 | diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |
developer | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 11 | index 0ccf067..75e65f7 100644 |
developer | 6b966f5 | 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 | |
| 25 | +define KernelPackage/bersa |
| 26 | + $(KernelPackage/mt76-default) |
| 27 | + TITLE:=MediaTek MT7902/MT7990 wireless driver |
| 28 | + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT |
| 29 | + FILES:= $(PKG_BUILD_DIR)/bersa/bersa.ko |
| 30 | + AUTOLOAD:=$(call AutoProbe,bersa) |
| 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 |
| 57 | +ifdef CONFIG_PACKAGE_kmod-bersa |
| 58 | + PKG_MAKE_FLAGS += CONFIG_BERSA=m |
| 59 | endif |
| 60 | ifdef CONFIG_PACKAGE_kmod-mt7921-common |
| 61 | PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 62 | @@ -447,9 +467,55 @@ define KernelPackage/mt7915e/install |
developer | 6b966f5 | 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 | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 77 | + $(1)/lib/firmware/mediatek |
developer | 6b966f5 | 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 | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 83 | $(1)/lib/firmware/mediatek |
developer | 6b966f5 | 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 | 1609265 | 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 | 049f58d | 2022-04-04 18:16:16 +0800 | [diff] [blame] | 98 | +endif |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 99 | endef |
| 100 | |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 101 | +ifdef CONFIG_PACKAGE_kmod-bersa |
| 102 | +define KernelPackage/bersa/install |
developer | 1609265 | 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 | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 113 | +endif |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 114 | + |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 115 | define KernelPackage/mt7921e/install |
| 116 | $(INSTALL_DIR) $(1)/lib/firmware/mediatek |
developer | 1609265 | 2022-03-31 00:34:47 +0800 | [diff] [blame] | 117 | cp \ |
| 118 | @@ -489,5 +555,6 @@ $(eval $(call KernelPackage,mt7921-common)) |
| 119 | $(eval $(call KernelPackage,mt7921u)) |
| 120 | $(eval $(call KernelPackage,mt7921s)) |
| 121 | $(eval $(call KernelPackage,mt7921e)) |
| 122 | +$(eval $(call KernelPackage,bersa)) |
| 123 | $(eval $(call KernelPackage,mt76)) |
| 124 | $(eval $(call BuildPackage,mt76-test)) |
developer | 6b966f5 | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 125 | -- |
| 126 | 2.29.2 |
| 127 | |