aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mt76
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2022-12-17 12:50:55 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2023-01-07 17:11:00 +0100
commit9a07895729a9701a673951a31ceb71f16f0a6fad (patch)
tree71fc9fc17fdd536bedeb53e78b05039a567bbe23 /package/kernel/mt76
parentfc9dd3f0834317ceb20700fd7033987695661097 (diff)
downloadupstream-9a07895729a9701a673951a31ceb71f16f0a6fad.tar.gz
upstream-9a07895729a9701a673951a31ceb71f16f0a6fad.tar.bz2
upstream-9a07895729a9701a673951a31ceb71f16f0a6fad.zip
mt76: add stand-alone MT7622 firmware package
Add a separate firmware package to avoid installing the MT7615 firmware on all MT7622 target devices by default. Now we only add MT7615 firmware packages for devices that use MT7615E. This commit also removes the explicit dependency on kmod-mt7615e to refine the package dependency. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Diffstat (limited to 'package/kernel/mt76')
-rw-r--r--package/kernel/mt76/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 874c40766f..6e852bc03f 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -171,7 +171,7 @@ endef
define KernelPackage/mt7615-firmware
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7615e firmware
- DEFAULT:=PACKAGE_kmod-mt7615e
+ DEPENDS+=+kmod-mt7615e
endef
define KernelPackage/mt7615e
@@ -182,6 +182,12 @@ define KernelPackage/mt7615e
AUTOLOAD:=$(call AutoProbe,mt7615e)
endef
+define KernelPackage/mt7622-firmware
+ $(KernelPackage/mt76-default)
+ TITLE:=MediaTek MT7622 firmware
+ DEPENDS+=+kmod-mt7615e
+endef
+
define KernelPackage/mt7663-firmware-ap
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7663e firmware (optimized for AP)
@@ -445,9 +451,14 @@ define KernelPackage/mt7615-firmware/install
$(PKG_BUILD_DIR)/firmware/mt7615_cr4.bin \
$(PKG_BUILD_DIR)/firmware/mt7615_n9.bin \
$(PKG_BUILD_DIR)/firmware/mt7615_rom_patch.bin \
- $(if $(CONFIG_TARGET_mediatek_mt7622), \
- $(PKG_BUILD_DIR)/firmware/mt7622_n9.bin \
- $(PKG_BUILD_DIR)/firmware/mt7622_rom_patch.bin) \
+ $(1)/lib/firmware/mediatek
+endef
+
+define KernelPackage/mt7622-firmware/install
+ $(INSTALL_DIR) $(1)/lib/firmware/mediatek
+ cp \
+ $(PKG_BUILD_DIR)/firmware/mt7622_n9.bin \
+ $(PKG_BUILD_DIR)/firmware/mt7622_rom_patch.bin \
$(1)/lib/firmware/mediatek
endef
@@ -526,6 +537,7 @@ $(eval $(call KernelPackage,mt76-connac))
$(eval $(call KernelPackage,mt76-sdio))
$(eval $(call KernelPackage,mt7615-common))
$(eval $(call KernelPackage,mt7615-firmware))
+$(eval $(call KernelPackage,mt7622-firmware))
$(eval $(call KernelPackage,mt7615e))
$(eval $(call KernelPackage,mt7663-firmware-ap))
$(eval $(call KernelPackage,mt7663-firmware-sta))