496a88cb209315b95a1b08861225b7bee222385c
[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:=b00eb8d30fbebb6a5047ccacefa8c37e072fca9c
12 PKG_VERSION:=2014-11-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 WMENU:=Wireless Drivers
25
26 define Package/ath10k-firmware-default
27 SECTION:=kernel
28 CATEGORY:=Kernel modules
29 SUBMENU:=$(WMENU)
30 URL:=$(PKG_SOURCE_URL)
31 DEPENDS:=kmod-ath10k
32 endef
33
34 define Package/ath10k-firmware-qca988x
35 $(Package/ath10k-firmware-default)
36 DEFAULT:=PACKAGE_kmod-ath10k
37 TITLE:=ath10k firmware for QCA988x devices
38 endef
39
40 QCA988X_FIRMWARE_FILE:=firmware-5.bin_10.2.4.97-1
41 QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-16.bin-lede
42 QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-7.bin-lede
43
44 define Download/ath10k-firmware-qca988x
45 URL:=https://www.codeaurora.org/cgit/quic/qsdk/oss/firmware/ath10k-firmware/plain/10.2.4/
46 FILE:=$(QCA988X_FIRMWARE_FILE)
47 MD5SUM:=fcb2fbd42d73a63fbf603505c718cbde
48 endef
49 $(eval $(call Download,ath10k-firmware-qca988x))
50
51 define Download/ath10k-firmware-qca988x-ct
52 URL:=https://www.candelatech.com/downloads/
53 FILE:=$(QCA988X_FIRMWARE_FILE_CT)
54 MD5SUM:=5b651c0458bcf5c20701308b5e519976
55 endef
56 $(eval $(call Download,ath10k-firmware-qca988x-ct))
57
58 define Download/ath10k-firmware-qca99x0-ct
59 URL:=https://www.candelatech.com/downloads/ath10k-10-4/
60 FILE:=$(QCA99X0_FIRMWARE_FILE_CT)
61 MD5SUM:=d01e24eaa7a6fb03db6b5bca44c2394a
62 endef
63 $(eval $(call Download,ath10k-firmware-qca99x0-ct))
64
65 define Package/ath10k-firmware-qca99x0
66 $(Package/ath10k-firmware-default)
67 TITLE:=ath10k firmware for QCA99x0 devices
68 endef
69
70 define Package/ath10k-firmware-qca988x-ct
71 $(Package/ath10k-firmware-default)
72 TITLE:=ath10k CT 10.1 firmware for QCA988x devices
73 endef
74
75 define Package/ath10k-firmware-qca988x-ct/description
76 Alternative ath10k firmware for QCA988X from Candela Technologies.
77 Enables IBSS and other features. See:
78 http://www.candelatech.com/ath10k-10.1.php
79 This firmware will NOT be used unless the standard ath10k-firmware-qca988x
80 is un-selected since the driver will try to load firmware-5.bin before
81 firmware-2.bin
82 endef
83
84 define Package/ath10k-firmware-qca99x0-ct/description
85 Alternative ath10k firmware for QCA99x0 from Candela Technologies.
86 Enables IBSS and other features. See:
87 http://www.candelatech.com/ath10k-10.4.php
88 This firmware conflicts with the standard 99x0 firmware, so select only
89 one.
90 endef
91
92 define Package/ath10k-firmware-qca99x0/description
93 Standard ath10k firmware for QCA99x0 from QCA
94 This firmware conflicts with the CT 99x0 firmware, so select only
95 one.
96 endef
97
98 define Package/ath10k-firmware-qca99x0-ct
99 $(Package/ath10k-firmware-default)
100 TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
101 endef
102
103 define Package/ath10k-firmware-qca9984
104 $(Package/ath10k-firmware-default)
105 TITLE:=ath10k firmware for QCA9984 devices
106 endef
107
108 define Package/ath10k-firmware-qca6174
109 $(Package/ath10k-firmware-default)
110 TITLE:=ath10k firmware for QCA6174 devices
111 endef
112
113 QCA99X0_BOARD_REV:=ddcec9efd245da9365c474f513a855a55f3ac7fe
114 QCA99X0_BOARD_FILE:=board-2.bin.$(QCA99X0_BOARD_REV)
115
116 define Download/qca99x0-board
117 URL:=https://source.codeaurora.org/quic/qsdk/oss/firmware/ath10k-firmware/plain/ath10k/QCA99X0/hw2.0
118 URL_FILE:=board-2.bin?id=$(QCA99X0_BOARD_REV)
119 FILE:=$(QCA99X0_BOARD_FILE)
120 MD5SUM:=a2b3c653c2363a5641200051d6333d0a
121 endef
122 $(eval $(call Download,qca99x0-board))
123
124 define Build/Compile
125
126 endef
127
128 define Package/ath10k-firmware-qca988x/install
129 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
130 $(INSTALL_DATA) \
131 $(PKG_BUILD_DIR)/QCA988X/board.bin \
132 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
133 $(INSTALL_DATA) \
134 $(DL_DIR)/$(QCA988X_FIRMWARE_FILE) \
135 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
136 endef
137
138 define Package/ath10k-firmware-qca988x-ct/install
139 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
140 $(INSTALL_DATA) \
141 $(PKG_BUILD_DIR)/QCA988X/board.bin \
142 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
143 $(INSTALL_DATA) \
144 $(DL_DIR)/$(QCA988X_FIRMWARE_FILE_CT) \
145 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
146 endef
147
148 define Package/ath10k-firmware-qca6174/install
149 $(INSTALL_DIR) $(1)/lib/firmware/ath10k
150 $(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
151 endef
152
153 define Package/ath10k-firmware-qca99x0/install
154 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
155 $(INSTALL_DATA) \
156 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
157 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
158 $(INSTALL_DATA) \
159 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
160 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
161 $(INSTALL_DATA) \
162 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/firmware-5.bin_10.4.1.00030-1 \
163 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
164 endef
165
166 define Package/ath10k-firmware-qca99x0-ct/install
167 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
168 $(INSTALL_DATA) \
169 $(DL_DIR)/$(QCA99X0_BOARD_FILE) \
170 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2.bin
171 $(INSTALL_DATA) \
172 $(PKG_BUILD_DIR)/QCA99X0/hw2.0/boardData_AR900B_CUS239_5G_v2_001.bin \
173 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
174 $(INSTALL_DATA) \
175 $(DL_DIR)/$(QCA99X0_FIRMWARE_FILE_CT) \
176 $(1)/lib/firmware/ath10k/QCA99X0/hw2.0/firmware-5.bin
177 endef
178
179 define Package/ath10k-firmware-qca9984/install
180 $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9984/hw1.0
181 $(INSTALL_DATA) \
182 $(PKG_BUILD_DIR)/QCA9984/hw1.0/board-2.bin \
183 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/board-2.bin
184 $(INSTALL_DATA) \
185 $(PKG_BUILD_DIR)/QCA9984/hw1.0/firmware-5.bin_10.4-3.2-00072 \
186 $(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
187 endef
188
189 $(eval $(call BuildPackage,ath10k-firmware-qca988x))
190 $(eval $(call BuildPackage,ath10k-firmware-qca99x0))
191 $(eval $(call BuildPackage,ath10k-firmware-qca6174))
192 $(eval $(call BuildPackage,ath10k-firmware-qca9984))
193
194 $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
195 $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))