ath10k-ct: Update DEPENDS and PROVIDES
[oweals/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   PROVIDES:=ath10k-firmware-qca988x
129 endef
130
131 define Package/ath10k-firmware-qca9887-ct
132 $(Package/ath10k-firmware-default)
133   TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
134   SECTION:=firmware
135   CATEGORY:=Firmware
136   PROVIDES:=ath10k-firmware-qca9887
137 endef
138
139 define Package/ath10k-firmware-qca988x-ct/description
140 Alternative ath10k firmware for QCA988X from Candela Technologies.
141 Enables IBSS and other features.  See:
142 http://www.candelatech.com/ath10k-10.1.php
143 This firmware will NOT be used unless the standard ath10k-firmware-qca988x
144 is un-selected since the driver will try to load firmware-5.bin before
145 firmware-2.bin
146 endef
147
148 define Package/ath10k-firmware-qca9887-ct/description
149 Alternative ath10k firmware for QCA9887 from Candela Technologies.
150 Enables IBSS and other features.  See:
151 http://www.candelatech.com/ath10k-10.1.php
152 This firmware conflicts with the standard 9887 firmware, so select only
153 one.
154 endef
155
156 define Package/ath10k-firmware-qca99x0-ct/description
157 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
158 Enables IBSS and other features.  See:
159 http://www.candelatech.com/ath10k-10.4.php
160 This firmware conflicts with the standard 99x0 firmware, so select only
161 one.
162 endef
163
164 define Package/ath10k-firmware-qca9984-ct/description
165 Alternative ath10k firmware for QCA9984 from Candela Technologies.
166 Enables IBSS and other features.  See:
167 http://www.candelatech.com/ath10k-10.4.php
168 This firmware conflicts with the standard 9984 firmware, so select only
169 one.
170 endef
171
172 define Package/ath10k-firmware-qca4019-ct-htt/description
173 Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
174 Enables IBSS and other features.  Requires ath10k-ct driver to function.
175 See:  http://www.candelatech.com/ath10k-10.4.php
176 endef
177
178 define Package/ath10k-firmware-qca4019-ct/description
179 Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
180 Enables IBSS and other features.  Works with standard or ath10k-ct driver.
181 See:  http://www.candelatech.com/ath10k-10.4.php
182 endef
183
184 define Package/ath10k-firmware-qca9888-ct/description
185 Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
186 Enables IBSS and other features.  See:
187 http://www.candelatech.com/ath10k-10.4.php
188 This firmware conflicts with the standard 9886 and 9888 firmware, so select only
189 one.
190 endef
191
192 define Package/ath10k-firmware-qca99x0/description
193 Standard ath10k firmware for QCA99x0 from QCA
194 This firmware conflicts with the CT 99x0 firmware, so select only
195 one.
196 endef
197
198 define Package/ath10k-firmware-qca99x0-ct
199 $(Package/ath10k-firmware-default)
200   TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices
201   SECTION:=firmware
202   CATEGORY:=Firmware
203   PROVIDES:=ath10k-firmware-qca99x0
204 endef
205
206 define Package/ath10k-firmware-qca9984-ct
207 $(Package/ath10k-firmware-default)
208   TITLE:=ath10k CT 10.4 firmware for QCA9984 devices
209   SECTION:=firmware
210   CATEGORY:=Firmware
211   PROVIDES:=ath10k-firmware-qca9984
212 endef
213
214 define Package/ath10k-firmware-qca4019-ct-htt
215 $(Package/ath10k-firmware-default)
216   TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9
217   SECTION:=firmware
218   CATEGORY:=Firmware
219   PROVIDES:=ath10k-firmware-qca4019
220   DEPENDS:=+kmod-ath10k-ct
221 endef
222 define Package/ath10k-firmware-qca4019-ct
223 $(Package/ath10k-firmware-default)
224   TITLE:=ath10k CT 10.4 firmware for QCA4018/9
225   SECTION:=firmware
226   CATEGORY:=Firmware
227   PROVIDES:=ath10k-firmware-qca4019
228 endef
229
230 define Package/ath10k-firmware-qca9888-ct
231 $(Package/ath10k-firmware-default)
232   TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices
233   SECTION:=firmware
234   CATEGORY:=Firmware
235   PROVIDES:=ath10k-firmware-qca9888
236 endef
237
238 define Package/ath10k-firmware-qca9984
239 $(Package/ath10k-firmware-default)
240   TITLE:=ath10k firmware for QCA9984 devices
241   SECTION:=firmware
242   CATEGORY:=Firmware
243 endef
244
245 define Package/ath10k-firmware-qca4019
246 $(Package/ath10k-firmware-default)
247   TITLE:=ath10k firmware for IPQ/QCA4019 devices
248   SECTION:=firmware
249   CATEGORY:=Firmware
250 endef
251
252 define Package/ath10k-firmware-qca6174
253 $(Package/ath10k-firmware-default)
254   TITLE:=ath10k firmware for QCA6174 devices
255   SECTION:=firmware
256   CATEGORY:=Firmware
257 endef
258
259 QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
260 QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
261
262 define Download/qca99x0-board
263   URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
264   URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
265   FILE:=$(QCA99X0_BOARD_FILE)
266   HASH:=03711ac21e60ef59d3815e235eb721c0c22851b5410299411085aa6f2af45401
267 endef
268 $(eval $(call Download,qca99x0-board))
269
270 define Build/Compile
271
272 endef
273
274 define Package/ath10k-firmware-qca4019/install
275         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
276         $(INSTALL_DATA) \
277                 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
278                 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
279         $(INSTALL_DATA) \
280                 $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.4/firmware-5.bin_10.4-3.4-00104 \
281                 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
282 endef
283
284 define Package/ath10k-firmware-qca9887/install
285         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
286         $(INSTALL_DATA) \
287                 $(PKG_BUILD_DIR)/QCA9887/hw1.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
288                 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
289         $(INSTALL_DATA) \
290                 $(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \
291                 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
292 endef
293
294 define Package/ath10k-firmware-qca9888/install
295         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
296         $(INSTALL_DATA) \
297                 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
298                 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
299         $(INSTALL_DATA) \
300                 $(PKG_BUILD_DIR)/QCA9888/hw2.0/3.5.3/firmware-5.bin_10.4-3.5.3-00053 \
301                 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
302 endef
303
304 define Package/ath10k-firmware-qca988x/install
305         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
306         $(INSTALL_DATA) \
307                 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
308                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
309         $(INSTALL_DATA) \
310                 $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
311                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
312 endef
313
314 define Package/ath10k-firmware-qca9887-ct/install
315         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
316         $(INSTALL_DATA) \
317                 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
318                 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
319         $(INSTALL_DATA) \
320                 $(PKG_BUILD_DIR)/QCA9887/hw1.0/board.bin \
321                 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
322 endef
323
324 define Package/ath10k-firmware-qca988x-ct/install
325         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
326         $(INSTALL_DATA) \
327                 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
328                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
329         $(INSTALL_DATA) \
330                 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \
331                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
332 endef
333
334 define Package/ath10k-firmware-qca6174/install
335         $(INSTALL_DIR) $(1)/lib/firmware/ath10k
336         $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
337 endef
338
339 define Package/ath10k-firmware-qca99x0/install
340         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
341         $(INSTALL_DATA) \
342                 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
343                 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
344         $(INSTALL_DATA) \
345                 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
346                 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
347         $(INSTALL_DATA) \
348                 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
349                 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
350 endef
351
352 define Package/ath10k-firmware-qca99x0-ct/install
353         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
354         $(INSTALL_DATA) \
355                 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
356                 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
357         $(INSTALL_DATA) \
358                 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
359                 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
360         $(INSTALL_DATA) \
361                 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \
362                 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
363 endef
364
365 define Package/ath10k-firmware-qca9984/install
366         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
367         $(INSTALL_DATA) \
368                 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
369                 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
370         $(INSTALL_DATA) \
371                 $(PKG_BUILD_DIR)/QCA9984/hw1.0/3.5.3/firmware-5.bin_10.4-3.5.3-00053 \
372                 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
373 endef
374
375 define Package/ath10k-firmware-qca9984-ct/install
376         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
377         $(INSTALL_DATA) \
378                 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
379                 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
380         $(INSTALL_DATA) \
381                 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \
382                 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
383 endef
384
385 define Package/ath10k-firmware-qca4019-ct-htt/install
386         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
387         $(INSTALL_DATA) \
388                 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
389                 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
390         $(INSTALL_DATA) \
391                 $(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \
392                 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin
393 endef
394
395 define Package/ath10k-firmware-qca4019-ct/install
396         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
397         $(INSTALL_DATA) \
398                 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
399                 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
400         $(INSTALL_DATA) \
401                 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \
402                 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
403 endef
404
405 define Package/ath10k-firmware-qca9888-ct/install
406         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
407         ln -s \
408                 ../../cal-pci-0000:01:00.0.bin \
409                 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
410         $(INSTALL_DATA) \
411                 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
412                 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
413         $(INSTALL_DATA) \
414                 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \
415                 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
416 endef
417
418 $(eval $(call BuildPackage,ath10k-firmware-qca9887))
419 $(eval $(call BuildPackage,ath10k-firmware-qca9888))
420 $(eval $(call BuildPackage,ath10k-firmware-qca988x))
421 $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
422 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
423 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
424 $(eval $(call BuildPackage,ath10k-firmware-qca4019))
425
426 $(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
427 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
428 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
429 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
430 $(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
431 $(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
432 $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))