Makefile 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=ath10k-firmware
  9. PKG_SOURCE_VERSION:=b00eb8d30fbebb6a5047ccacefa8c37e072fca9c
  10. PKG_VERSION:=2014-11-13-$(PKG_SOURCE_VERSION)
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
  16. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  17. include $(INCLUDE_DIR)/package.mk
  18. WMENU:=Wireless Drivers
  19. define Package/ath10k-firmware-default
  20. SECTION:=kernel
  21. CATEGORY:=Kernel modules
  22. SUBMENU:=$(WMENU)
  23. URL:=$(PKG_SOURCE_URL)
  24. DEPENDS:=kmod-ath10k
  25. endef
  26. define Package/ath10k-firmware-qca988x
  27. $(Package/ath10k-firmware-default)
  28. DEFAULT:=PACKAGE_kmod-ath10k
  29. TITLE:=ath10k firmware for QCA988x devices
  30. endef
  31. QCA988X_FIRMWARE_FILE:=firmware-5.bin_10.2.4.97-1
  32. QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-16.bin-lede
  33. QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede.001
  34. define Download/ath10k-firmware-qca988x
  35. URL:=https://www.codeaurora.org/cgit/quic/qsdk/oss/firmware/ath10k-firmware/plain/10.2.4/
  36. FILE:=$(QCA988X_FIRMWARE_FILE)
  37. MD5SUM:=fcb2fbd42d73a63fbf603505c718cbde
  38. endef
  39. $(eval $(call Download,ath10k-firmware-qca988x))
  40. define Download/ath10k-firmware-qca988x-ct
  41. URL:=https://www.candelatech.com/downloads/
  42. FILE:=$(QCA988X_FIRMWARE_FILE_CT)
  43. MD5SUM:=5b651c0458bcf5c20701308b5e519976
  44. endef
  45. $(eval $(call Download,ath10k-firmware-qca988x-ct))
  46. define Download/ath10k-firmware-qca99x0-ct
  47. URL:=https://www.candelatech.com/downloads/ath10k-10-4/
  48. FILE:=$(QCA99X0_FIRMWARE_FILE_CT)
  49. MD5SUM:=eb710949ff79142954aadae24616169c
  50. endef
  51. $(eval $(call Download,ath10k-firmware-qca99x0-ct))
  52. define Package/ath10k-firmware-qca99x0
  53. $(Package/ath10k-firmware-default)
  54. TITLE:=ath10k firmware for QCA99x0 devices
  55. endef
  56. define Package/ath10k-firmware-qca988x-ct
  57. $(Package/ath10k-firmware-default)
  58. TITLE:=ath10k CT 10.1 firmware for QCA988x devices
  59. endef
  60. define Package/ath10k-firmware-qca988x-ct/description
  61. Alternative ath10k firmware for QCA988X from Candela Technologies.
  62. Enables IBSS and other features. See:
  63. http://www.candelatech.com/ath10k-10.1.php
  64. This firmware will NOT be used unless the standard ath10k-firmware-qca988x
  65. is un-selected since the driver will try to load firmware-5.bin before
  66. firmware-2.bin
  67. endef
  68. define Package/ath10k-firmware-qca99x0-ct/description
  69. Alternative ath10k firmware for QCA99x0 from Candela Technologies.
  70. Enables IBSS and other features. See:
  71. http://www.candelatech.com/ath10k-10.4.php
  72. This firmware conflicts with the standard 99x0 firmware, so select only
  73. one.
  74. endef
  75. define Package/ath10k-firmware-qca99x0/description
  76. Standard ath10k firmware for QCA99x0 from QCA
  77. This firmware conflicts with the CT 99x0 firmware, so select only
  78. one.
  79. endef
  80. define Package/ath10k-firmware-qca99x0-ct
  81. $(Package/ath10k-firmware-default)
  82. TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
  83. endef
  84. define Package/ath10k-firmware-qca9984
  85. $(Package/ath10k-firmware-default)
  86. TITLE:=ath10k firmware for QCA9984 devices
  87. endef
  88. define Package/ath10k-firmware-qca6174
  89. $(Package/ath10k-firmware-default)
  90. TITLE:=ath10k firmware for QCA6174 devices
  91. endef
  92. QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
  93. QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
  94. define Download/qca99x0-board
  95. URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
  96. URL_FILE:=board-2.bin?id=ddcec9efd245da9365c474f513a855a55f3ac7fe
  97. FILE:=$(QCA99X0_BOARD_FILE)
  98. MD5SUM:=a2b3c653c2363a5641200051d6333d0a
  99. endef
  100. $(eval $(call Download,qca99x0-board))
  101. define Build/Compile
  102. endef
  103. define Package/ath10k-firmware-qca988x/install
  104. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
  105. $(INSTALL_DATA) \
  106. $(PKG_BUILD_DIR)/QCA988X/board.bin \
  107. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
  108. $(INSTALL_DATA) \
  109. $(DL_DIR)/$(QCA988X_FIRMWARE_FILE) \
  110. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
  111. endef
  112. define Package/ath10k-firmware-qca988x-ct/install
  113. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
  114. $(INSTALL_DATA) \
  115. $(PKG_BUILD_DIR)/QCA988X/board.bin \
  116. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
  117. $(INSTALL_DATA) \
  118. $(DL_DIR)/$(QCA988X_FIRMWARE_FILE_CT) \
  119. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
  120. endef
  121. define Package/ath10k-firmware-qca6174/install
  122. $(INSTALL_DIR) $(1)/lib/firmware/ath10k
  123. $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
  124. endef
  125. define Package/ath10k-firmware-qca99x0/install
  126. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
  127. $(INSTALL_DATA) \
  128. $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
  129. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
  130. $(INSTALL_DATA) \
  131. $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
  132. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
  133. $(INSTALL_DATA) \
  134. $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
  135. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
  136. endef
  137. define Package/ath10k-firmware-qca99x0-ct/install
  138. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
  139. $(INSTALL_DATA) \
  140. $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
  141. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
  142. $(INSTALL_DATA) \
  143. $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
  144. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
  145. $(INSTALL_DATA) \
  146. $(DL_DIR)/$(QCA99X0_FIRMWARE_FILE_CT) \
  147. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
  148. endef
  149. define Package/ath10k-firmware-qca9984/install
  150. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
  151. $(INSTALL_DATA) \
  152. $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
  153. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
  154. $(LN) -s board-2.bin $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
  155. $(INSTALL_DATA) \
  156. $(PKG_BUILD_DIR)/QCA9984/hw1.0/firmware-5.bin_10.4-3.2-00072 \
  157. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
  158. endef
  159. $(eval $(call BuildPackage,ath10k-firmware-qca988x))
  160. $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
  161. $(eval $(call BuildPackage,ath10k-firmware-qca6174))
  162. $(eval $(call BuildPackage,ath10k-firmware-qca9984))
  163. $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
  164. $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))