Makefile 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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_DATE:=2017-01-11
  10. PKG_SOURCE_VERSION:=ab432c60437931a165f0aff1a6e3371f358b75dd
  11. PKG_MIRROR_HASH:=e3188ecd4d7470d3cdde89fefa6258f9ec4f404b23558d1474e5014679b28101
  12. PKG_RELEASE:=1
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
  15. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/ath10k-firmware-default
  18. SECTION:=firmware
  19. CATEGORY:=Firmware
  20. URL:=$(PKG_SOURCE_URL)
  21. DEPENDS:=
  22. endef
  23. define Package/ath10k-firmware-qca9887
  24. $(Package/ath10k-firmware-default)
  25. TITLE:=ath10k firmware for QCA9887 devices
  26. endef
  27. define Package/ath10k-firmware-qca9887-ct
  28. $(Package/ath10k-firmware-default)
  29. TITLE:=ath10k-CT firmware for QCA9887 devices
  30. endef
  31. QCA9887_REV:=3cce88e245f2d685e49411c4f80998f94baf67b8
  32. QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00013
  33. QCA9887_FIRMWARE_FILE_HASH:=5966408bd41f309edb595344b8dd088c0fed212debfd91e5f3e8a55ea119c16d
  34. QCA9887_FIRMWARE_FILE_DL:=$(QCA9887_FIRMWARE_FILE).$(QCA9887_FIRMWARE_FILE_HASH)
  35. QCA9887_BOARD_FILE:=board.bin
  36. QCA9887_BOARD_FILE_HASH:=cf4df099f6ee05c181f55ce17297a1d32c61d725eb96246fd315ad5587c42426
  37. QCA9887_BOARD_FILE_DL:=$(QCA9887_BOARD_FILE).$(QCA9887_BOARD_FILE_HASH)
  38. define Download/ath10k-qca9887-firmware
  39. URL:=https://github.com/kvalo/ath10k-firmware/raw/$(QCA9887_REV)/QCA9887/hw1.0/
  40. URL_FILE:=$(QCA9887_FIRMWARE_FILE)
  41. FILE:=$(QCA9887_FIRMWARE_FILE_DL)
  42. HASH:=$(QCA9887_FIRMWARE_FILE_HASH)
  43. endef
  44. $(eval $(call Download,ath10k-qca9887-firmware))
  45. define Download/ath10k-qca9887-board
  46. URL:=https://github.com/kvalo/ath10k-firmware/raw/$(QCA9887_REV)/QCA9887/hw1.0/
  47. URL_FILE:=$(QCA9887_BOARD_FILE)
  48. FILE:=$(QCA9887_BOARD_FILE_DL)
  49. HASH:=$(QCA9887_BOARD_FILE_HASH)
  50. endef
  51. $(eval $(call Download,ath10k-qca9887-board))
  52. define Package/ath10k-firmware-qca988x
  53. $(Package/ath10k-firmware-default)
  54. TITLE:=ath10k firmware for QCA988x devices
  55. SECTION:=firmware
  56. CATEGORY:=Firmware
  57. endef
  58. CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT)
  59. define Download/ct-firmware
  60. URL:=https://www.candelatech.com/downloads/$(2)
  61. FILE:=$(call CT_FIRMWARE_FILE,$(1))
  62. URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
  63. endef
  64. QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc3-lede
  65. define Download/ath10k-firmware-qca988x-ct
  66. $(call Download/ct-firmware,QCA988X,)
  67. HASH:=4112d78161a2c20e7a9490ea8d04e9f919508bafb097d88761dcce026c26f93f
  68. endef
  69. $(eval $(call Download,ath10k-firmware-qca988x-ct))
  70. QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc3-lede
  71. define Download/ath10k-firmware-qca9887-ct
  72. $(call Download/ct-firmware,QCA9887,ath10k-9887)
  73. HASH:=18b61875726d4384de46f75dec1d42fea31aa6d66dba4940cb9d375bc98732e4
  74. endef
  75. $(eval $(call Download,ath10k-firmware-qca9887-ct))
  76. QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.001
  77. define Download/ath10k-firmware-qca99x0-ct
  78. $(call Download/ct-firmware,QCA99X0,ath10k-10-4)
  79. HASH:=61ff2b52617ae805579f423d6539284f056aba2b9f7e3629d600f6a5077ab703
  80. endef
  81. $(eval $(call Download,ath10k-firmware-qca99x0-ct))
  82. QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.001
  83. define Download/ath10k-firmware-qca9984-ct
  84. $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4)
  85. HASH:=e079db5059cf28979ff50c7f6706df87e96a375e8048deeb4f6ede5357577f74
  86. endef
  87. $(eval $(call Download,ath10k-firmware-qca9984-ct))
  88. define Package/ath10k-firmware-qca99x0
  89. $(Package/ath10k-firmware-default)
  90. TITLE:=ath10k firmware for QCA99x0 devices
  91. SECTION:=firmware
  92. CATEGORY:=Firmware
  93. endef
  94. define Package/ath10k-firmware-qca988x-ct
  95. $(Package/ath10k-firmware-default)
  96. TITLE:=ath10k CT 10.1 firmware for QCA988x devices
  97. SECTION:=firmware
  98. CATEGORY:=Firmware
  99. endef
  100. define Package/ath10k-firmware-qca9887-ct
  101. $(Package/ath10k-firmware-default)
  102. TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
  103. SECTION:=firmware
  104. CATEGORY:=Firmware
  105. endef
  106. define Package/ath10k-firmware-qca988x-ct/description
  107. Alternative ath10k firmware for QCA988X from Candela Technologies.
  108. Enables IBSS and other features. See:
  109. http://www.candelatech.com/ath10k-10.1.php
  110. This firmware will NOT be used unless the standard ath10k-firmware-qca988x
  111. is un-selected since the driver will try to load firmware-5.bin before
  112. firmware-2.bin
  113. endef
  114. define Package/ath10k-firmware-qca9887-ct/description
  115. Alternative ath10k firmware for QCA9887 from Candela Technologies.
  116. Enables IBSS and other features. See:
  117. http://www.candelatech.com/ath10k-10.1.php
  118. This firmware conflicts with the standard 9887 firmware, so select only
  119. one.
  120. endef
  121. define Package/ath10k-firmware-qca99x0-ct/description
  122. Alternative ath10k firmware for QCA99x0 from Candela Technologies.
  123. Enables IBSS and other features. See:
  124. http://www.candelatech.com/ath10k-10.4.php
  125. This firmware conflicts with the standard 99x0 firmware, so select only
  126. one.
  127. endef
  128. define Package/ath10k-firmware-qca9984-ct/description
  129. Alternative ath10k firmware for QCA9984 from Candela Technologies.
  130. Enables IBSS and other features. See:
  131. http://www.candelatech.com/ath10k-10.4.php
  132. This firmware conflicts with the standard 9984 firmware, so select only
  133. one.
  134. endef
  135. define Package/ath10k-firmware-qca99x0/description
  136. Standard ath10k firmware for QCA99x0 from QCA
  137. This firmware conflicts with the CT 99x0 firmware, so select only
  138. one.
  139. endef
  140. define Package/ath10k-firmware-qca99x0-ct
  141. $(Package/ath10k-firmware-default)
  142. TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
  143. SECTION:=firmware
  144. CATEGORY:=Firmware
  145. endef
  146. define Package/ath10k-firmware-qca9984-ct
  147. $(Package/ath10k-firmware-default)
  148. TITLE:=ath10k CT 10.4.3 firmware for QCA9984 devices
  149. SECTION:=firmware
  150. CATEGORY:=Firmware
  151. endef
  152. define Package/ath10k-firmware-qca9984
  153. $(Package/ath10k-firmware-default)
  154. TITLE:=ath10k firmware for QCA9984 devices
  155. SECTION:=firmware
  156. CATEGORY:=Firmware
  157. endef
  158. define Package/ath10k-firmware-qca6174
  159. $(Package/ath10k-firmware-default)
  160. TITLE:=ath10k firmware for QCA6174 devices
  161. SECTION:=firmware
  162. CATEGORY:=Firmware
  163. endef
  164. QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
  165. QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
  166. define Download/qca99x0-board
  167. URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
  168. URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
  169. FILE:=$(QCA99X0_BOARD_FILE)
  170. HASH:=03711ac21e60ef59d3815e235eb721c0c22851b5410299411085aa6f2af45401
  171. endef
  172. $(eval $(call Download,qca99x0-board))
  173. QCA9984_BOARD_REV:=719c0127e52bd70559e71b85ab0331790e1bf66c
  174. QCA9984_BOARD_FILE:=board-2.bin
  175. QCA9984_BOARD_FILE_DL:=$(QCA9984_BOARD_FILE).$(QCA9984_BOARD_REV)
  176. QCA9984_FIRMWARE_REV:=d43cb1188154037506e94abf3aa456cc934c6861
  177. QCA9984_FIRMWARE_FILE:=firmware-5.bin_10.4-3.4-00072
  178. QCA9984_FIRMWARE_FILE_DL:=$(QCA9984_FIRMWARE_FILE).$(QCA9984_FIRMWARE_REV)
  179. define Download/ath10k-qca9984-board
  180. URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA9984/hw1.0/
  181. URL_FILE:=$(QCA9984_BOARD_FILE)?id=$(QCA9984_BOARD_REV)
  182. FILE:=$(QCA9984_BOARD_FILE_DL)
  183. HASH:=e968b214fd76d5b7859f71841ce40fbd5f47336c3ccbaf95e23f902f5e569aef
  184. endef
  185. $(eval $(call Download,ath10k-qca9984-board))
  186. define Download/ath10k-qca9984-firmware
  187. URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA9984/hw1.0/
  188. URL_FILE:=$(QCA9984_FIRMWARE_FILE)?id=$(QCA9984_FIRMWARE_REV)
  189. FILE:=$(QCA9984_FIRMWARE_FILE_DL)
  190. HASH:=28d5834e8c4ca8fcef9ea033cd8b9b0f9ee84ecf30dbde84c9c64bf8dd9912bc
  191. endef
  192. $(eval $(call Download,ath10k-qca9984-firmware))
  193. define Build/Compile
  194. endef
  195. define Package/ath10k-firmware-qca9887/install
  196. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
  197. $(INSTALL_DATA) \
  198. $(DL_DIR)/$(QCA9887_FIRMWARE_FILE_DL) \
  199. $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
  200. $(INSTALL_DATA) \
  201. $(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
  202. $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
  203. endef
  204. define Package/ath10k-firmware-qca988x/install
  205. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
  206. $(INSTALL_DATA) \
  207. $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
  208. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
  209. $(INSTALL_DATA) \
  210. $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00016 \
  211. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
  212. endef
  213. define Package/ath10k-firmware-qca9887-ct/install
  214. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
  215. $(INSTALL_DATA) \
  216. $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
  217. $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
  218. $(INSTALL_DATA) \
  219. $(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
  220. $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
  221. endef
  222. define Package/ath10k-firmware-qca988x-ct/install
  223. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
  224. $(INSTALL_DATA) \
  225. $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
  226. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
  227. $(INSTALL_DATA) \
  228. $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \
  229. $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
  230. endef
  231. define Package/ath10k-firmware-qca6174/install
  232. $(INSTALL_DIR) $(1)/lib/firmware/ath10k
  233. $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
  234. endef
  235. define Package/ath10k-firmware-qca99x0/install
  236. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
  237. $(INSTALL_DATA) \
  238. $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
  239. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
  240. $(INSTALL_DATA) \
  241. $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
  242. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
  243. $(INSTALL_DATA) \
  244. $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
  245. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
  246. endef
  247. define Package/ath10k-firmware-qca99x0-ct/install
  248. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
  249. $(INSTALL_DATA) \
  250. $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
  251. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
  252. $(INSTALL_DATA) \
  253. $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
  254. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
  255. $(INSTALL_DATA) \
  256. $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \
  257. $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
  258. endef
  259. define Package/ath10k-firmware-qca9984/install
  260. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
  261. ln -s \
  262. ../../cal-pci-0000:01:00.0.bin \
  263. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
  264. $(INSTALL_DATA) \
  265. $(DL_DIR)/$(QCA9984_BOARD_FILE_DL) \
  266. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
  267. $(INSTALL_DATA) \
  268. $(DL_DIR)/$(QCA9984_FIRMWARE_FILE_DL) \
  269. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
  270. endef
  271. define Package/ath10k-firmware-qca9984-ct/install
  272. $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
  273. ln -s \
  274. ../../cal-pci-0000:01:00.0.bin \
  275. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
  276. $(INSTALL_DATA) \
  277. $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
  278. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
  279. $(INSTALL_DATA) \
  280. $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \
  281. $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
  282. endef
  283. $(eval $(call BuildPackage,ath10k-firmware-qca9887))
  284. $(eval $(call BuildPackage,ath10k-firmware-qca988x))
  285. $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
  286. $(eval $(call BuildPackage,ath10k-firmware-qca6174))
  287. $(eval $(call BuildPackage,ath10k-firmware-qca9984))
  288. $(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
  289. $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
  290. $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
  291. $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))