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