sunxi: Add A64 support with cortex53 subtarget
[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:=2017-03-29
12 PKG_SOURCE_VERSION:=956e2609b7e42c8c710bba10ef925a5be1be5137
13 PKG_MIRROR_HASH:=25f724ff38c830281b3efba4a4ddffaae0c4bd8fea0f4c1061591229ff05535b
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 QCA9887_REV:=3920dbf0a04c8918b839d5e5d9e2b8fbd5c7e692
46 QCA9887_FIRMWARE_VERSION:=10.2.4-1.0
47 QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00029
48 QCA9887_FIRMWARE_FILE_HASH:=b27b4a2117b578a334b9b744e2095c4f86378fd4badfb7619c7e11712d714ab3
49 QCA9887_FIRMWARE_FILE_DL:=$(QCA9887_FIRMWARE_FILE).$(QCA9887_FIRMWARE_FILE_HASH)
50 QCA9887_BOARD_FILE:=board.bin
51 QCA9887_BOARD_FILE_HASH:=cf4df099f6ee05c181f55ce17297a1d32c61d725eb96246fd315ad5587c42426
52 QCA9887_BOARD_FILE_DL:=$(QCA9887_BOARD_FILE).$(QCA9887_BOARD_FILE_HASH)
53
54 define Download/ath10k-qca9887-firmware
55 URL:=https://github.com/kvalo/ath10k-firmware/raw/$(QCA9887_REV)/QCA9887/hw1.0/$(QCA9887_FIRMWARE_VERSION)/
56 URL_FILE:=$(QCA9887_FIRMWARE_FILE)
57 FILE:=$(QCA9887_FIRMWARE_FILE_DL)
58 HASH:=$(QCA9887_FIRMWARE_FILE_HASH)
59 endef
60 $(eval $(call Download,ath10k-qca9887-firmware))
61
62 define Download/ath10k-qca9887-board
63 URL:=https://github.com/kvalo/ath10k-firmware/raw/$(QCA9887_REV)/QCA9887/hw1.0/
64 URL_FILE:=$(QCA9887_BOARD_FILE)
65 FILE:=$(QCA9887_BOARD_FILE_DL)
66 HASH:=$(QCA9887_BOARD_FILE_HASH)
67 endef
68 $(eval $(call Download,ath10k-qca9887-board))
69
70 define Package/ath10k-firmware-qca988x
71 $(Package/ath10k-firmware-default)
72 TITLE:=ath10k firmware for QCA988x devices
73 SECTION:=firmware
74 CATEGORY:=Firmware
75 endef
76
77 CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT)
78
79 define Download/ct-firmware
80 URL:=https://www.candelatech.com/downloads/$(2)
81 FILE:=$(call CT_FIRMWARE_FILE,$(1))
82 URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
83 endef
84
85 QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc5-lede
86 define Download/ath10k-firmware-qca988x-ct
87 $(call Download/ct-firmware,QCA988X,)
88 HASH:=556d6a4df50cd94a229a240d6d1d108ed5910069902f1e0cbb57b02ede27690f
89 endef
90 $(eval $(call Download,ath10k-firmware-qca988x-ct))
91
92 QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin-19-rc5-lede
93 define Download/ath10k-firmware-qca9887-ct
94 $(call Download/ct-firmware,QCA9887,ath10k-9887)
95 HASH:=725982694156e0b891dcd1b1b18ba5318fbbe173f4ec9603ff7acbd08f7c4050
96 endef
97 $(eval $(call Download,ath10k-firmware-qca9887-ct))
98
99 QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.002
100 define Download/ath10k-firmware-qca99x0-ct
101 $(call Download/ct-firmware,QCA99X0,ath10k-10-4)
102 HASH:=e3c77077b47d55219f90816a51bf046f5b40c32be5e96bf629b083d873a879ad
103 endef
104 $(eval $(call Download,ath10k-firmware-qca99x0-ct))
105
106 QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.002
107 define Download/ath10k-firmware-qca9984-ct
108 $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4)
109 HASH:=610f7747db6b101f4fc21431b776ac640b5977357e5be9aece2349447b9b1d85
110 endef
111 $(eval $(call Download,ath10k-firmware-qca9984-ct))
112
113 QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.002
114 define Download/ath10k-firmware-qca9888-ct
115 $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4)
116 HASH:=f92e7d7968698af7c6f2d76b31b3645589e03839e15838010ce457c635e5aae6
117 endef
118 $(eval $(call Download,ath10k-firmware-qca9888-ct))
119
120 define Package/ath10k-firmware-qca99x0
121 $(Package/ath10k-firmware-default)
122 TITLE:=ath10k firmware for QCA99x0 devices
123 SECTION:=firmware
124 CATEGORY:=Firmware
125 endef
126
127 define Package/ath10k-firmware-qca988x-ct
128 $(Package/ath10k-firmware-default)
129 TITLE:=ath10k CT 10.1 firmware for QCA988x devices
130 SECTION:=firmware
131 CATEGORY:=Firmware
132 endef
133
134 define Package/ath10k-firmware-qca9887-ct
135 $(Package/ath10k-firmware-default)
136 TITLE:=ath10k CT 10.1 firmware for QCA9887 devices
137 SECTION:=firmware
138 CATEGORY:=Firmware
139 endef
140
141 define Package/ath10k-firmware-qca988x-ct/description
142 Alternative ath10k firmware for QCA988X from Candela Technologies.
143 Enables IBSS and other features. See:
144 http://www.candelatech.com/ath10k-10.1.php
145 This firmware will NOT be used unless the standard ath10k-firmware-qca988x
146 is un-selected since the driver will try to load firmware-5.bin before
147 firmware-2.bin
148 endef
149
150 define Package/ath10k-firmware-qca9887-ct/description
151 Alternative ath10k firmware for QCA9887 from Candela Technologies.
152 Enables IBSS and other features. See:
153 http://www.candelatech.com/ath10k-10.1.php
154 This firmware conflicts with the standard 9887 firmware, so select only
155 one.
156 endef
157
158 define Package/ath10k-firmware-qca99x0-ct/description
159 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
160 Enables IBSS and other features. See:
161 http://www.candelatech.com/ath10k-10.4.php
162 This firmware conflicts with the standard 99x0 firmware, so select only
163 one.
164 endef
165
166 define Package/ath10k-firmware-qca9984-ct/description
167 Alternative ath10k firmware for QCA9984 from Candela Technologies.
168 Enables IBSS and other features. See:
169 http://www.candelatech.com/ath10k-10.4.php
170 This firmware conflicts with the standard 9984 firmware, so select only
171 one.
172 endef
173
174 define Package/ath10k-firmware-qca9888-ct/description
175 Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
176 Enables IBSS and other features. See:
177 http://www.candelatech.com/ath10k-10.4.php
178 This firmware conflicts with the standard 9886 and 9888 firmware, so select only
179 one.
180 endef
181
182 define Package/ath10k-firmware-qca99x0/description
183 Standard ath10k firmware for QCA99x0 from QCA
184 This firmware conflicts with the CT 99x0 firmware, so select only
185 one.
186 endef
187
188 define Package/ath10k-firmware-qca99x0-ct
189 $(Package/ath10k-firmware-default)
190 TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
191 SECTION:=firmware
192 CATEGORY:=Firmware
193 endef
194
195 define Package/ath10k-firmware-qca9984-ct
196 $(Package/ath10k-firmware-default)
197 TITLE:=ath10k CT 10.4.3 firmware for QCA9984 devices
198 SECTION:=firmware
199 CATEGORY:=Firmware
200 endef
201
202 define Package/ath10k-firmware-qca9888-ct
203 $(Package/ath10k-firmware-default)
204 TITLE:=ath10k CT 10.4.3 firmware for QCA9886 and QCA9888 devices
205 SECTION:=firmware
206 CATEGORY:=Firmware
207 endef
208
209 define Package/ath10k-firmware-qca9984
210 $(Package/ath10k-firmware-default)
211 TITLE:=ath10k firmware for QCA9984 devices
212 SECTION:=firmware
213 CATEGORY:=Firmware
214 endef
215
216 define Package/ath10k-firmware-qca4019
217 $(Package/ath10k-firmware-default)
218 TITLE:=ath10k firmware for IPQ/QCA4019 devices
219 SECTION:=firmware
220 CATEGORY:=Firmware
221 endef
222
223 define Package/ath10k-firmware-qca6174
224 $(Package/ath10k-firmware-default)
225 TITLE:=ath10k firmware for QCA6174 devices
226 SECTION:=firmware
227 CATEGORY:=Firmware
228 endef
229
230 QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
231 QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
232
233 define Download/qca99x0-board
234 URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
235 URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
236 FILE:=$(QCA99X0_BOARD_FILE)
237 HASH:=03711ac21e60ef59d3815e235eb721c0c22851b5410299411085aa6f2af45401
238 endef
239 $(eval $(call Download,qca99x0-board))
240
241 define Build/Compile
242
243 endef
244
245 define Package/ath10k-firmware-qca4019/install
246 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
247 $(INSTALL_DATA) \
248 $(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
249 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/
250 $(INSTALL_DATA) \
251 $(PKG_BUILD_DIR)/QCA4019/hw1.0/3.2.1/firmware-5.bin_10.4-3.2.1-00053 \
252 $(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
253 endef
254
255 define Package/ath10k-firmware-qca9887/install
256 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
257 $(INSTALL_DATA) \
258 $(DL_DIR)/$(QCA9887_FIRMWARE_FILE_DL) \
259 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
260 $(INSTALL_DATA) \
261 $(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
262 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
263 endef
264
265 define Package/ath10k-firmware-qca9888/install
266 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
267 $(INSTALL_DATA) \
268 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
269 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
270 $(INSTALL_DATA) \
271 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
272 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
273 $(INSTALL_DATA) \
274 $(PKG_BUILD_DIR)/QCA9888/hw2.0/firmware-5.bin_10.4-3.2-00072 \
275 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
276 endef
277
278 define Package/ath10k-firmware-qca988x/install
279 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
280 $(INSTALL_DATA) \
281 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
282 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
283 $(INSTALL_DATA) \
284 $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00029 \
285 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
286 endef
287
288 define Package/ath10k-firmware-qca9887-ct/install
289 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
290 $(INSTALL_DATA) \
291 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9887) \
292 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-2.bin
293 $(INSTALL_DATA) \
294 $(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
295 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
296 endef
297
298 define Package/ath10k-firmware-qca988x-ct/install
299 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
300 $(INSTALL_DATA) \
301 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
302 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
303 $(INSTALL_DATA) \
304 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA988X) \
305 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
306 endef
307
308 define Package/ath10k-firmware-qca6174/install
309 $(INSTALL_DIR) $(1)/lib/firmware/ath10k
310 $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
311 endef
312
313 define Package/ath10k-firmware-qca99x0/install
314 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
315 $(INSTALL_DATA) \
316 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
317 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
318 $(INSTALL_DATA) \
319 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
320 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
321 $(INSTALL_DATA) \
322 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
323 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
324 endef
325
326 define Package/ath10k-firmware-qca99x0-ct/install
327 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
328 $(INSTALL_DATA) \
329 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
330 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
331 $(INSTALL_DATA) \
332 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
333 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
334 $(INSTALL_DATA) \
335 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA99X0) \
336 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
337 endef
338
339 define Package/ath10k-firmware-qca9984/install
340 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
341 $(INSTALL_DATA) \
342 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
343 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
344 $(INSTALL_DATA) \
345 $(PKG_BUILD_DIR)/QCA9984/hw1.0/3.4/firmware-5.bin_10.4-3.4-00082 \
346 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
347 endef
348
349 define Package/ath10k-firmware-qca9984-ct/install
350 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
351 $(INSTALL_DATA) \
352 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
353 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
354 $(INSTALL_DATA) \
355 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9984) \
356 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
357 endef
358
359 define Package/ath10k-firmware-qca9888-ct/install
360 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
361 ln -s \
362 ../../cal-pci-0000:01:00.0.bin \
363 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
364 $(INSTALL_DATA) \
365 $(PKG_BUILD_DIR)/QCA9888/hw2.0/board-2.bin \
366 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/board-2.bin
367 $(INSTALL_DATA) \
368 $(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA9888) \
369 $(1)/lib/firmware/ath10k/QCA9888/hw2.0/firmware-5.bin
370 endef
371
372 $(eval $(call BuildPackage,ath10k-firmware-qca9887))
373 $(eval $(call BuildPackage,ath10k-firmware-qca9888))
374 $(eval $(call BuildPackage,ath10k-firmware-qca988x))
375 $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
376 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
377 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
378 $(eval $(call BuildPackage,ath10k-firmware-qca4019))
379
380 $(eval $(call BuildPackage,ath10k-firmware-qca9887-ct))
381 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
382 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
383 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
384 $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))