| From 681e125eb221606922ad0c77dfb86a80ded6e52a Mon Sep 17 00:00:00 2001 |
| From: Evelyn Tsai <evelyn.tsai@mediatek.com> |
| Date: Mon, 21 Mar 2022 10:27:08 +0800 |
| Subject: [PATCH] mt76: add MT7986/MT7916 support in makefile |
| |
| --- |
| Makefile | 35 ++++++++++++++++++++++++++++++++++- |
| 1 file changed, 34 insertions(+), 1 deletion(-) |
| |
| diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile |
| index d683059..8135922 100644 |
| --- a/package/kernel/mt76/Makefile |
| +++ b/package/kernel/mt76/Makefile |
| @@ -220,7 +220,7 @@ endef |
| |
| define KernelPackage/mt7915e |
| $(KernelPackage/mt76-default) |
| - TITLE:=MediaTek MT7915e wireless driver |
| + TITLE:=MediaTek MT7915e/MT7986/MT7916 wireless driver |
| DEPENDS+=@PCI_SUPPORT +kmod-mt7615-common +kmod-hwmon-core +kmod-thermal +@DRIVER_11AX_SUPPORT +@KERNEL_RELAY |
| FILES:= $(PKG_BUILD_DIR)/mt7915/mt7915e.ko |
| AUTOLOAD:=$(call AutoProbe,mt7915e) |
| @@ -281,6 +281,11 @@ ifdef CONFIG_PACKAGE_MAC80211_MESH |
| NOSTDINC_FLAGS += -DCONFIG_MAC80211_MESH |
| endif |
| |
| +ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS |
| + NOSTDINC_FLAGS += -DCONFIG_MAC80211_DEBUGFS |
| + PKG_MAKE_FLAGS += CONFIG_MAC80211_DEBUGFS=y |
| +endif |
| + |
| ifdef CONFIG_PACKAGE_CFG80211_TESTMODE |
| NOSTDINC_FLAGS += -DCONFIG_NL80211_TESTMODE |
| PKG_MAKE_FLAGS += CONFIG_NL80211_TESTMODE=y |
| @@ -343,6 +348,10 @@ ifdef CONFIG_PACKAGE_kmod-mt7663u |
| endif |
| ifdef CONFIG_PACKAGE_kmod-mt7915e |
| PKG_MAKE_FLAGS += CONFIG_MT7915E=m |
| +ifdef CONFIG_TARGET_mediatek_mt7986 |
| + PKG_MAKE_FLAGS += CONFIG_MT7986_WMAC=y |
| + NOSTDINC_FLAGS += -DCONFIG_MT7986_WMAC |
| +endif |
| endif |
| ifdef CONFIG_PACKAGE_kmod-mt7921-common |
| PKG_MAKE_FLAGS += CONFIG_MT7921_COMMON=m |
| @@ -447,7 +456,31 @@ define KernelPackage/mt7915e/install |
| $(PKG_BUILD_DIR)/firmware/mt7915_wa.bin \ |
| $(PKG_BUILD_DIR)/firmware/mt7915_wm.bin \ |
| $(PKG_BUILD_DIR)/firmware/mt7915_rom_patch.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7916_wa.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7916_wm.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7916_rom_patch.bin \ |
| $(1)/lib/firmware/mediatek |
| +ifdef CONFIG_TARGET_mediatek_mt7986 |
| + cp \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_wa.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_wm.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_wm_mt7975.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_rom_patch_mt7975.bin \ |
| + $(1)/lib/firmware/mediatek |
| +endif |
| + cp \ |
| + $(PKG_BUILD_DIR)/firmware/mt7916_eeprom.bin \ |
| + $(1)/lib/firmware/mediatek |
| +ifdef CONFIG_TARGET_mediatek_mt7986 |
| + cp \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dual.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7976_dbdc.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975_dual.bin \ |
| + $(PKG_BUILD_DIR)/firmware/mt7986_eeprom_mt7975.bin \ |
| + $(1)/lib/firmware/mediatek |
| +endif |
| endef |
| |
| define KernelPackage/mt7921e/install |
| -- |
| 2.29.2 |
| |