78d01d9035d6f6e861ea85ec091690e5ed487342
[openwrt/openwrt.git] / package / firmware / ath10k-firmware / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=ath10k-firmware
11 PKG_SOURCE_DATE:=2018-02-09
12 PKG_SOURCE_VERSION:=8f4bafdd400d21a65966004d0ce6e0686ef4d9bc
13 PKG_MIRROR_HASH:=4f4f0678b9d07c0282f18c69bd63a5e2a2ae015b9ce7298cedb88a60be87ed3a
14 PKG_RELEASE:=1
15
16 PKG_SOURCE_PROTO:=git
17 PKG_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/ath10k-firmware-default
24 SECTION:=firmware
25 CATEGORY:=Firmware
26 URL:=$(PKG_SOURCE_URL)
27 DEPENDS:=
28 endef
29
30 define Package/ath10k-firmware-qca9887
31 $(Package/ath10k-firmware-default)
32 TITLE:=ath10k firmware for QCA9887 devices
33 endef
34
35 define Package/ath10k-firmware-qca9888
36 $(Package/ath10k-firmware-default)
37 TITLE:=ath10k firmware for QCA9888 devices
38 endef
39
40 define Package/ath10k-firmware-qca9887-ct
41 $(Package/ath10k-firmware-default)
42 TITLE:=ath10k-CT firmware for QCA9887 devices
43 endef
44
45 define Package/ath10k-firmware-qca988x
46 $(Package/ath10k-firmware-default)
47 TITLE:=ath10k firmware for QCA988x devices
48 SECTION:=firmware
49 CATEGORY:=Firmware
50 endef
51
52 CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT)
53 CT_FIRMWARE_FILE_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_HTT)
54
55 define Download/ct-firmware
56 URL:=https://www.candelatech.com/downloads/$(2)
57 FILE:=$(call CT_FIRMWARE_FILE,$(1))
58 URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
59 endef
60
61 define Download/ct-firmware-htt
62 URL:=https://www.candelatech.com/downloads/$(2)
63 FILE:=$(call CT_FIRMWARE_FILE_HTT,$(1))
64 URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
65 endef
66
67 QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-19.bin.lede
68 define Download/ath10k-firmware-qca988x-ct
69 $(call Download/ct-firmware,QCA988X,)
70 HASH:=bff98f028062dae9fc638c7596aec3c79bf9eddaff65cfacba067f6d72f217cd
71 endef
72 $(eval $(call Download,ath10k-firmware-qca988x-ct))
73
74 QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-19.bin.lede
75 define Download/ath10k-firmware-qca9887-ct
76 $(call Download/ct-firmware,QCA9887,ath10k-9887)
77 HASH:=95dc106f98672bd9c7d3fe6881ed79ab079cb49b0a995650991b1beaff2b0101
78 endef
79 $(eval $(call Download,ath10k-firmware-qca9887-ct))
80
81 QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.004
82 define Download/ath10k-firmware-qca99x0-ct
83 $(call Download/ct-firmware,QCA99X0,ath10k-10-4)
84 HASH:=993c29fd64bb2a59b86d34f58601a1a48b83b541750bc511f78cc17152829b4d
85 endef
86 $(eval $(call Download,ath10k-firmware-qca99x0-ct))
87
88 QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.004
89 define Download/ath10k-firmware-qca9984-ct
90 $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4)
91 HASH:=d997eed9a8bc6809c01d367759ba8545c10e3be93ea1f33d6d753127ef0f7c5e
92 endef
93 $(eval $(call Download,ath10k-firmware-qca9984-ct))
94
95 QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.002
96 define Download/ath10k-firmware-qca4019-ct-htt
97 $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4)
98 HASH:=e67bbc8eba56bc72c1aa99a6304ea98345bddc34f4844d5d79a51db1d6d8c425
99 endef
100 $(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
101
102 QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.002
103 define Download/ath10k-firmware-qca4019-ct
104 $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4)
105 HASH:=f1ebb73903e4e6a6209b8acdc623bc43d355d32cce838ce0448befe9196c7866
106 endef
107 $(eval $(call Download,ath10k-firmware-qca4019-ct))
108
109 QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.004
110 define Download/ath10k-firmware-qca9888-ct
111 $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4)
112 HASH:=bbaa71bc7dcaa264c5875e86639f174908fed09fbace975e325959d42f3754ff
113 endef
114 $(eval $(call Download,ath10k-firmware-qca9888-ct))
115
116 define Package/ath10k-firmware-qca99x0
117 $(Package/ath10k-firmware-default)
118 TITLE:=ath10k firmware for QCA99x0 devices
119 SECTION:=firmware
120 CATEGORY:=Firmware
121 endef
122
123 define Package/ath10k-firmware-qca988x-ct
124 $(Package/ath10k-firmware-default)
125 TITLE:=ath10k CT 10.1 firmware for QCA988x devices
126 SECTION:=firmware
127 CATEGORY:=Firmware
128 endef
129
130 define Package/ath10k-firmware-qca9887-ct
131 $(Package/ath10k-firmware-default)
132 TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
133 SECTION:=firmware
134 CATEGORY:=Firmware
135 endef
136
137 define Package/ath10k-firmware-qca988x-ct/description
138 Alternative ath10k firmware for QCA988X from Candela Technologies.
139 Enables IBSS and other features. See:
140 http://www.candelatech.com/ath10k-10.1.php
141 This firmware will NOT be used unless the standard ath10k-firmware-qca988x
142 is un-selected since the driver will try to load firmware-5.bin before
143 firmware-2.bin
144 endef
145
146 define Package/ath10k-firmware-qca9887-ct/description
147 Alternative ath10k firmware for QCA9887 from Candela Technologies.
148 Enables IBSS and other features. See:
149 http://www.candelatech.com/ath10k-10.1.php
150 This firmware conflicts with the standard 9887 firmware, so select only
151 one.
152 endef
153
154 define Package/ath10k-firmware-qca99x0-ct/description
155 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
156 Enables IBSS and other features. See:
157 http://www.candelatech.com/ath10k-10.4.php
158 This firmware conflicts with the standard 99x0 firmware, so select only
159 one.
160 endef
161
162 define Package/ath10k-firmware-qca9984-ct/description
163 Alternative ath10k firmware for QCA9984 from Candela Technologies.
164 Enables IBSS and other features. See:
165 http://www.candelatech.com/ath10k-10.4.php
166 This firmware conflicts with the standard 9984 firmware, so select only
167 one.
168 endef
169
170 define Package/ath10k-firmware-qca4019-ct-htt/description
171 Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
172 Enables IBSS and other features. Requires ath10k-ct driver to function.
173 See: http://www.candelatech.com/ath10k-10.4.php
174 endef
175
176 define Package/ath10k-firmware-qca4019-ct/description
177 Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
178 Enables IBSS and other features. Works with standard or ath10k-ct driver.
179 See: http://www.candelatech.com/ath10k-10.4.php
180 endef
181
182 define Package/ath10k-firmware-qca9888-ct/description
183 Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
184 Enables IBSS and other features. See:
185 http://www.candelatech.com/ath10k-10.4.php
186 This firmware conflicts with the standard 9886 and 9888 firmware, so select only
187 one.
188 endef
189
190 define Package/ath10k-firmware-qca99x0/description
191 Standard ath10k firmware for QCA99x0 from QCA
192 This firmware conflicts with the CT 99x0 firmware, so select only
193 one.
194 endef
195
196 define Package/ath10k-firmware-qca99x0-ct
197 $(Package/ath10k-firmware-default)
198 TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices
199 SECTION:=firmware
200 CATEGORY:=Firmware
201 endef
202
203 define Package/ath10k-firmware-qca9984-ct
204 $(Package/ath10k-firmware-default)
205 TITLE:=ath10k CT 10.4 firmware for QCA9984 devices
206 SECTION:=firmware
207 CATEGORY:=Firmware
208 endef
209
210 define Package/ath10k-firmware-qca4019-ct-htt
211 $(Package/ath10k-firmware-default)
212 TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9
213 SECTION:=firmware
214 CATEGORY:=Firmware
215 endef
216 define Package/ath10k-firmware-qca4019-ct
217 $(Package/ath10k-firmware-default)
218 TITLE:=ath10k CT 10.4 firmware for QCA4018/9
219 SECTION:=firmware
220 CATEGORY:=Firmware
221 endef
222
223 define Package/ath10k-firmware-qca9888-ct
224 $(Package/ath10k-firmware-default)
225 TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices
226 SECTION:=firmware
227 CATEGORY:=Firmware
228 endef
229
230 define Package/ath10k-firmware-qca9984
231 $(Package/ath10k-firmware-default)
232 TITLE:=ath10k firmware for QCA9984 devices
233 SECTION:=firmware
234 CATEGORY:=Firmware
235 endef
236
237 define Package/ath10k-firmware-qca4019
238 $(Package/ath10k-firmware-default)
239 TITLE:=ath10k firmware for IPQ/QCA4019 devices
240 SECTION:=firmware
241 CATEGORY:=Firmware
242 endef
243
244 define Package/ath10k-firmware-qca6174
245 $(Package/ath10k-firmware-default)
246 TITLE:=ath10k firmware for QCA6174 devices
247 SECTION:=firmware
248 CATEGORY:=Firmware
249 endef
250
251 QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
252 QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
253
254 define Download/qca99x0-board
255 URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
256 URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
257 FILE:=$(QCA99X0_BOARD_FILE)
258 HASH:=03711ac21e60ef59d3815e235eb721c0c22851b5410299411085aa6f2af45401
259 endef
260 $(eval $(call Download,qca99x0-board))
261
262 define Build/Compile
263
264 endef
265
266 define Package/ath10k-firmware-qca4019/install
267 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
268 $(INSTALL_DATA) \
269 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
270 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
271 $(INSTALL_DATA) \
272 $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.4/firmware-5.bin_10.4-3.4-00104 \
273 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
274 endef
275
276 define Package/ath10k-firmware-qca9887/install
277 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
278 $(INSTALL_DATA) \
279 $(PKG_BUILD_DIR)/QCA9887/hw1.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
280 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
281 $(INSTALL_DATA) \
282 $(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \
283 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
284 endef
285
286 define Package/ath10k-firmware-qca9888/install
287 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
288 $(INSTALL_DATA) \
289 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
290 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
291 $(INSTALL_DATA) \
292 $(PKG_BUILD_DIR)/QCA9888/hw2.0/3.5.3/firmware-5.bin_10.4-3.5.3-00053 \
293 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
294 endef
295
296 define Package/ath10k-firmware-qca988x/install
297 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
298 $(INSTALL_DATA) \
299 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
300 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
301 $(INSTALL_DATA) \
302 $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
303 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
304 endef
305
306 define Package/ath10k-firmware-qca9887-ct/install
307 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
308 $(INSTALL_DATA) \
309 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
310 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
311 $(INSTALL_DATA) \
312 $(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \
313 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
314 endef
315
316 define Package/ath10k-firmware-qca988x-ct/install
317 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
318 $(INSTALL_DATA) \
319 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
320 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
321 $(INSTALL_DATA) \
322 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \
323 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
324 endef
325
326 define Package/ath10k-firmware-qca6174/install
327 $(INSTALL_DIR) $(1)/lib/firmware/ath10k
328 $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
329 endef
330
331 define Package/ath10k-firmware-qca99x0/install
332 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
333 $(INSTALL_DATA) \
334 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
335 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
336 $(INSTALL_DATA) \
337 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
338 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
339 $(INSTALL_DATA) \
340 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
341 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
342 endef
343
344 define Package/ath10k-firmware-qca99x0-ct/install
345 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
346 $(INSTALL_DATA) \
347 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
348 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
349 $(INSTALL_DATA) \
350 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
351 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
352 $(INSTALL_DATA) \
353 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \
354 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
355 endef
356
357 define Package/ath10k-firmware-qca9984/install
358 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
359 $(INSTALL_DATA) \
360 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
361 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
362 $(INSTALL_DATA) \
363 $(PKG_BUILD_DIR)/QCA9984/hw1.0/3.5.3/firmware-5.bin_10.4-3.5.3-00053 \
364 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
365 endef
366
367 define Package/ath10k-firmware-qca9984-ct/install
368 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
369 $(INSTALL_DATA) \
370 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
371 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
372 $(INSTALL_DATA) \
373 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \
374 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
375 endef
376
377 define Package/ath10k-firmware-qca4019-ct-htt/install
378 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
379 $(INSTALL_DATA) \
380 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
381 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
382 $(INSTALL_DATA) \
383 $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \
384 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin
385 endef
386
387 define Package/ath10k-firmware-qca4019-ct/install
388 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
389 $(INSTALL_DATA) \
390 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
391 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
392 $(INSTALL_DATA) \
393 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \
394 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
395 endef
396
397 define Package/ath10k-firmware-qca9888-ct/install
398 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
399 ln -s \
400 ../../cal-pci-0000:01:00.0.bin \
401 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
402 $(INSTALL_DATA) \
403 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
404 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
405 $(INSTALL_DATA) \
406 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \
407 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
408 endef
409
410 $(eval $(call BuildPackage,ath10k-firmware-qca9887))
411 $(eval $(call BuildPackage,ath10k-firmware-qca9888))
412 $(eval $(call BuildPackage,ath10k-firmware-qca988x))
413 $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
414 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
415 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
416 $(eval $(call BuildPackage,ath10k-firmware-qca4019))
417
418 $(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
419 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
420 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
421 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
422 $(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
423 $(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
424 $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))