73309ad268b0702e4cbc1819af2173b8e7f5b388
[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_VERSION:=307cb46b06661ebd3186723b5002de769c7add83
12 PKG_VERSION:=2016-09-13-$(PKG_SOURCE_VERSION)
13 PKG_RELEASE:=1
14
15 PKG_SOURCE_PROTO:=git
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
19
20 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/ath10k-firmware-default
25 SECTION:=firmware
26 CATEGORY:=Firmware
27 SUBMENU:=$(WMENU)
28 URL:=$(PKG_SOURCE_URL)
29 DEPENDS:=
30 endef
31
32 define Package/ath10k-firmware-qca9887
33 $(Package/ath10k-firmware-default)
34 TITLE:=ath10k firmware for QCA9887 devices
35 endef
36
37 QCA9887_REV:=3cce88e245f2d685e49411c4f80998f94baf67b8
38 QCA9887_FIRMWARE_FILE:=firmware-5.bin_10.2.4-1.0-00013
39 QCA9887_FIRMWARE_FILE_MD5:=bd9cdcbf49561c7176432a81c29e7e87
40 QCA9887_FIRMWARE_FILE_DL:=$(QCA9887_FIRMWARE_FILE).$(QCA9887_FIRMWARE_FILE_MD5)
41 QCA9887_BOARD_FILE:=board.bin
42 QCA9887_BOARD_FILE_MD5:=ebf3af10160c45373f19e0b8226b02ae
43 QCA9887_BOARD_FILE_DL:=$(QCA9887_BOARD_FILE).$(QCA9887_BOARD_FILE_MD5)
44
45 define Download/ath10k-qca9887-firmware
46 URL:=https://github.com/kvalo/ath10k-firmware/raw/$(QCA9887_REV)/QCA9887/hw1.0/
47 URL_FILE:=$(QCA9887_FIRMWARE_FILE)
48 FILE:=$(QCA9887_FIRMWARE_FILE_DL)
49 MD5SUM:=$(QCA9887_FIRMWARE_FILE_MD5)
50 endef
51 $(eval $(call Download,ath10k-qca9887-firmware))
52
53 define Download/ath10k-qca9887-board
54 URL:=https://github.com/kvalo/ath10k-firmware/raw/$(QCA9887_REV)/QCA9887/hw1.0/
55 URL_FILE:=$(QCA9887_BOARD_FILE)
56 FILE:=$(QCA9887_BOARD_FILE_DL)
57 MD5SUM:=$(QCA9887_BOARD_FILE_MD5)
58 endef
59 $(eval $(call Download,ath10k-qca9887-board))
60
61 define Package/ath10k-firmware-qca988x
62 $(Package/ath10k-firmware-default)
63 DEFAULT:=PACKAGE_kmod-ath10k
64 TITLE:=ath10k firmware for QCA988x devices
65 SECTION:=firmware
66 CATEGORY:=Firmware
67 endef
68
69 QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-16.1.bin-lede
70 QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede.004
71 QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede.004
72
73 define Download/ath10k-firmware-qca988x-ct
74 URL:=https://www.candelatech.com/downloads/
75 FILE:=$(QCA988X_FIRMWARE_FILE_CT)
76 MD5SUM:=d7e081e9782936ed544b78994c9133fb
77 endef
78 $(eval $(call Download,ath10k-firmware-qca988x-ct))
79
80 define Download/ath10k-firmware-qca99x0-ct
81 URL:=https://www.candelatech.com/downloads/ath10k-10-4/
82 FILE:=$(QCA99X0_FIRMWARE_FILE_CT)
83 MD5SUM:=809bb9bf8a18ea218a8e1b9ffc0f8447
84 endef
85 $(eval $(call Download,ath10k-firmware-qca99x0-ct))
86
87 define Download/ath10k-firmware-qca9984-ct
88 URL:=https://www.candelatech.com/downloads/ath10k-9984-10-4/
89 FILE:=$(QCA9984_FIRMWARE_FILE_CT)
90 MD5SUM:=924eb8ea30de11299b13e207469a3350
91 endef
92 $(eval $(call Download,ath10k-firmware-qca9984-ct))
93
94 define Package/ath10k-firmware-qca99x0
95 $(Package/ath10k-firmware-default)
96 TITLE:=ath10k firmware for QCA99x0 devices
97 SECTION:=firmware
98 CATEGORY:=Firmware
99 endef
100
101 define Package/ath10k-firmware-qca988x-ct
102 $(Package/ath10k-firmware-default)
103 TITLE:=ath10k CT 10.1 firmware for QCA988x devices
104 SECTION:=firmware
105 CATEGORY:=Firmware
106 endef
107
108 define Package/ath10k-firmware-qca988x-ct/description
109 Alternative ath10k firmware for QCA988X from Candela Technologies.
110 Enables IBSS and other features. See:
111 http://www.candelatech.com/ath10k-10.1.php
112 This firmware will NOT be used unless the standard ath10k-firmware-qca988x
113 is un-selected since the driver will try to load firmware-5.bin before
114 firmware-2.bin
115 endef
116
117 define Package/ath10k-firmware-qca99x0-ct/description
118 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
119 Enables IBSS and other features. See:
120 http://www.candelatech.com/ath10k-10.4.php
121 This firmware conflicts with the standard 99x0 firmware, so select only
122 one.
123 endef
124
125 define Package/ath10k-firmware-qca9984-ct/description
126 Alternative ath10k firmware for QCA9984 from Candela Technologies.
127 Enables IBSS and other features. See:
128 http://www.candelatech.com/ath10k-10.4-9984.php
129 This firmware conflicts with the standard 9984 firmware, so select only
130 one.
131 endef
132
133 define Package/ath10k-firmware-qca99x0/description
134 Standard ath10k firmware for QCA99x0 from QCA
135 This firmware conflicts with the CT 99x0 firmware, so select only
136 one.
137 endef
138
139 define Package/ath10k-firmware-qca99x0-ct
140 $(Package/ath10k-firmware-default)
141 TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
142 SECTION:=firmware
143 CATEGORY:=Firmware
144 endef
145
146 define Package/ath10k-firmware-qca9984-ct
147 $(Package/ath10k-firmware-default)
148 TITLE:=ath10k CT 10.4.3 firmware for QCA9984 devices
149 SECTION:=firmware
150 CATEGORY:=Firmware
151 endef
152
153 define Package/ath10k-firmware-qca9984
154 $(Package/ath10k-firmware-default)
155 TITLE:=ath10k firmware for QCA9984 devices
156 SECTION:=firmware
157 CATEGORY:=Firmware
158 endef
159
160 define Package/ath10k-firmware-qca6174
161 $(Package/ath10k-firmware-default)
162 TITLE:=ath10k firmware for QCA6174 devices
163 SECTION:=firmware
164 CATEGORY:=Firmware
165 endef
166
167 QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
168 QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
169
170 define Download/qca99x0-board
171 URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
172 URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
173 FILE:=$(QCA99X0_BOARD_FILE)
174 MD5SUM:=a2b3c653c2363a5641200051d6333d0a
175 endef
176 $(eval $(call Download,qca99x0-board))
177
178 define Build/Compile
179
180 endef
181
182 define Package/ath10k-firmware-qca9887/install
183 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9887/hw1.0
184 $(INSTALL_DATA) \
185 $(DL_DIR)/$(QCA9887_FIRMWARE_FILE_DL) \
186 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/firmware-5.bin
187 $(INSTALL_DATA) \
188 $(DL_DIR)/$(QCA9887_BOARD_FILE_DL) \
189 $(1)/lib/firmware/ath10k/QCA9887/hw1.0/board.bin
190 endef
191
192 define Package/ath10k-firmware-qca988x/install
193 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
194 $(INSTALL_DATA) \
195 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
196 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
197 $(INSTALL_DATA) \
198 $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4.70/firmware-5.bin_10.2.4.70.54 \
199 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
200 endef
201
202 define Package/ath10k-firmware-qca988x-ct/install
203 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
204 $(INSTALL_DATA) \
205 $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
206 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
207 $(INSTALL_DATA) \
208 $(DL_DIR)/$(QCA988X_FIRMWARE_FILE_CT) \
209 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
210 endef
211
212 define Package/ath10k-firmware-qca6174/install
213 $(INSTALL_DIR) $(1)/lib/firmware/ath10k
214 $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
215 endef
216
217 define Package/ath10k-firmware-qca99x0/install
218 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
219 $(INSTALL_DATA) \
220 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
221 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
222 $(INSTALL_DATA) \
223 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
224 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
225 $(INSTALL_DATA) \
226 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
227 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
228 endef
229
230 define Package/ath10k-firmware-qca99x0-ct/install
231 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
232 $(INSTALL_DATA) \
233 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
234 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
235 $(INSTALL_DATA) \
236 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
237 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
238 $(INSTALL_DATA) \
239 $(DL_DIR)/$(QCA99X0_FIRMWARE_FILE_CT) \
240 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
241 endef
242
243 define Package/ath10k-firmware-qca9984/install
244 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
245 ln -s \
246 ../../cal-pci-0000:01:00.0.bin \
247 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
248 $(INSTALL_DATA) \
249 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
250 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
251 $(INSTALL_DATA) \
252 $(PKG_BUILD_DIR)/QCA9984/hw1.0/firmware-5.bin_10.4-3.2-00072 \
253 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
254 endef
255
256 define Package/ath10k-firmware-qca9984-ct/install
257 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
258 ln -s \
259 ../../cal-pci-0000:01:00.0.bin \
260 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
261 $(INSTALL_DATA) \
262 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
263 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
264 $(INSTALL_DATA) \
265 $(DL_DIR)/$(QCA9984_FIRMWARE_FILE_CT) \
266 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
267 endef
268
269 $(eval $(call BuildPackage,ath10k-firmware-qca9887))
270 $(eval $(call BuildPackage,ath10k-firmware-qca988x))
271 $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
272 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
273 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
274
275 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
276 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
277 $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))