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