mt76: add MT7981 firmware packages
authorDavid Bauer <mail@david-bauer.net>
Wed, 17 May 2023 18:42:56 +0000 (20:42 +0200)
committerDavid Bauer <mail@david-bauer.net>
Wed, 17 May 2023 23:44:31 +0000 (01:44 +0200)
Package the firmware required for MT7981 to bring up the radio.

Signed-off-by: David Bauer <mail@david-bauer.net>
package/kernel/mt76/Makefile

index 1a7c2ec8c7188a51f1fc611140445b5f7e3d3b40..04db7fe32c2422816eaafad715a6a1cb70b47ac7 100644 (file)
@@ -245,6 +245,12 @@ define KernelPackage/mt7916-firmware
   TITLE:=MediaTek MT7916 firmware
 endef
 
+define KernelPackage/mt7981-firmware
+  $(KernelPackage/mt76-default)
+  DEPENDS:=@TARGET_mediatek_filogic
+  TITLE:=MediaTek MT7981 firmware
+endef
+
 define KernelPackage/mt7986-firmware
   $(KernelPackage/mt76-default)
   DEPENDS:=@TARGET_mediatek_filogic
@@ -497,6 +503,15 @@ define KernelPackage/mt7916-firmware/install
                $(1)/lib/firmware/mediatek
 endef
 
+define KernelPackage/mt7981-firmware/install
+       $(INSTALL_DIR) $(1)/lib/firmware/mediatek
+       cp \
+               $(PKG_BUILD_DIR)/firmware/mt7981_wa.bin \
+               $(PKG_BUILD_DIR)/firmware/mt7981_wm.bin \
+               $(PKG_BUILD_DIR)/firmware/mt7981_rom_patch.bin \
+               $(1)/lib/firmware/mediatek
+endef
+
 define KernelPackage/mt7986-firmware/install
        $(INSTALL_DIR) $(1)/lib/firmware/mediatek
        cp \
@@ -548,6 +563,7 @@ $(eval $(call KernelPackage,mt7663s))
 $(eval $(call KernelPackage,mt7915-firmware))
 $(eval $(call KernelPackage,mt7915e))
 $(eval $(call KernelPackage,mt7916-firmware))
+$(eval $(call KernelPackage,mt7981-firmware))
 $(eval $(call KernelPackage,mt7986-firmware))
 $(eval $(call KernelPackage,mt7921-firmware))
 $(eval $(call KernelPackage,mt7921-common))