linux-firmware: ath10k: add board firmware packages
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Wed, 25 Nov 2020 10:33:55 +0000 (11:33 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 28 Nov 2020 17:19:37 +0000 (18:19 +0100)
Split ath10k firmwares into board and firmware packages.
This way we can add dependencies to ath10k-ct firmware packages.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
package/firmware/linux-firmware/Makefile
package/firmware/linux-firmware/qca_ath10k.mk

index 877a58d3d6d081d50f549f95aee5227d0a6ec550..7fb99dd2ce09137ec2fd365afd0e1f7d78dc5fd9 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
 PKG_VERSION:=20201118
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -26,6 +26,7 @@ define Package/firmware-default
   CATEGORY:=Firmware
   URL:=http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git
   TITLE:=$(1)
+  DEPENDS:=$(2)
 endef
 
 define Build/Compile
index a7c5b13b84e69fd8a9f0f38e9889c4f9539af007..bd5d21916aef1e9baddc49609e407018ce14ba7b 100644 (file)
@@ -9,48 +9,68 @@ define Download/qca99x0-board
 endef
 $(eval $(call Download,qca99x0-board))
 
-Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware)
-define Package/ath10k-firmware-qca4019/install
+Package/ath10k-board-qca4019 = $(call Package/firmware-default,ath10k qca4019 board firmware)
+define Package/ath10k-board-qca4019/install
        $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA4019/hw1.0/board-2.bin \
                $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
+endef
+$(eval $(call BuildPackage,ath10k-board-qca4019))
+Package/ath10k-firmware-qca4019 = $(call Package/firmware-default,ath10k qca4019 firmware,+ath10k-board-qca4019)
+define Package/ath10k-firmware-qca4019/install
+       $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA4019/hw1.0/firmware-5.bin \
                $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
 endef
 $(eval $(call BuildPackage,ath10k-firmware-qca4019))
 
-Package/ath10k-firmware-qca9887 = $(call Package/firmware-default,ath10k qca9887 firmware)
+Package/ath10k-board-qca9887 = $(call Package/firmware-default,ath10k qca9887 board firmware)
+define Package/ath10k-board-qca9887/install
+       $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
+       $(INSTALL_DATA) \
+               $(PKG_BUILD_DIR)/ath10k/QCA9887/hw1.0/board.bin \
+               $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
+endef
+$(eval $(call BuildPackage,ath10k-board-qca9887))
+Package/ath10k-firmware-qca9887 = $(call Package/firmware-default,ath10k qca9887 firmware,+ath10k-board-qca9887)
 define Package/ath10k-firmware-qca9887/install
        $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA9887/hw1.0/firmware-5.bin \
                $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
-       $(INSTALL_DATA) \
-               $(PKG_BUILD_DIR)/ath10k/QCA9887/hw1.0/board.bin \
-               $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
 endef
 $(eval $(call BuildPackage,ath10k-firmware-qca9887))
 
-Package/ath10k-firmware-qca9888 = $(call Package/firmware-default,ath10k qca9888 firmware)
-define Package/ath10k-firmware-qca9888/install
+Package/ath10k-board-qca9888 = $(call Package/firmware-default,ath10k qca9888 board firmware)
+define Package/ath10k-board-qca9888/install
        $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA9888/hw2.0/board-2.bin \
                $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
+endef
+$(eval $(call BuildPackage,ath10k-board-qca9888))
+Package/ath10k-firmware-qca9888 = $(call Package/firmware-default,ath10k qca9888 firmware,+ath10k-board-qca9888)
+define Package/ath10k-firmware-qca9888/install
+       $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA9888/hw2.0/firmware-5.bin \
                $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
 endef
 $(eval $(call BuildPackage,ath10k-firmware-qca9888))
 
-Package/ath10k-firmware-qca988x = $(call Package/firmware-default,ath10k qca988x firmware)
-define Package/ath10k-firmware-qca988x/install
+Package/ath10k-board-qca988x = $(call Package/firmware-default,ath10k qca988x board firmware)
+define Package/ath10k-board-qca988x/install
        $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA988X/hw2.0/board.bin \
                $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
+endef
+$(eval $(call BuildPackage,ath10k-board-qca988x))
+Package/ath10k-firmware-qca988x = $(call Package/firmware-default,ath10k qca988x firmware,+ath10k-board-qca988x)
+define Package/ath10k-firmware-qca988x/install
+       $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA988X/hw2.0/firmware-5.bin \
                $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
@@ -76,8 +96,8 @@ define Package/ath10k-firmware-qca6174/install
 endef
 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
 
-Package/ath10k-firmware-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 firmware)
-define Package/ath10k-firmware-qca99x0/install
+Package/ath10k-board-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 board firmware)
+define Package/ath10k-board-qca99x0/install
        $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
        $(INSTALL_DATA) \
                $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
@@ -85,21 +105,30 @@ define Package/ath10k-firmware-qca99x0/install
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA99X0/hw2.0/board.bin \
                $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
+endef
+$(eval $(call BuildPackage,ath10k-board-qca99x0))
+Package/ath10k-firmware-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 firmware,+ath10k-board-qca99x0)
+define Package/ath10k-firmware-qca99x0/install
+       $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA99X0/hw2.0/firmware-5.bin \
                $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
 endef
 $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
 
-Package/ath10k-firmware-qca9984 = $(call Package/firmware-default,ath10k qca9984 firmware)
-define Package/ath10k-firmware-qca9984/install
+Package/ath10k-board-qca9984 = $(call Package/firmware-default,ath10k qca9984 board firmware)
+define Package/ath10k-board-qca9984/install
        $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA9984/hw1.0/board-2.bin \
                $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
+endef
+$(eval $(call BuildPackage,ath10k-board-qca9984))
+Package/ath10k-firmware-qca9984 = $(call Package/firmware-default,ath10k qca9984 firmware,+ath10k-board-qca9984)
+define Package/ath10k-firmware-qca9984/install
+       $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/ath10k/QCA9984/hw1.0/firmware-5.bin \
                $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
 endef
 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
-