ipq-wifi: bump to latest git HEAD
[openwrt/openwrt.git] / package / firmware / ipq-wifi / Makefile
1 include $(TOPDIR)/rules.mk
2 include $(INCLUDE_DIR)/version.mk
3
4 PKG_NAME:=ipq-wifi
5 PKG_RELEASE:=1
6
7 PKG_SOURCE_PROTO:=git
8 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
9 PKG_SOURCE_DATE:=2023-04-12
10 PKG_SOURCE_VERSION:=b22487d729362feaff7d06354353d005a3a9d6b7
11 PKG_MIRROR_HASH:=94eea9db636b2cbf6782ec17d8b8fe36770c61ff283702ec418df1a1b09f54ef
12
13 PKG_FLAGS:=nonshared
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Build/Compile
18 endef
19
20 # Use ath10k-bdencoder from https://github.com/qca/qca-swiss-army-knife.git
21 # to generate the board-* files here.
22 #
23 # This is intended to be used on an interim basis until device-specific
24 # board data for new devices is available through the upstream compilation
25 #
26 # Please send a mail with your device-specific board files upstream.
27 # You can find instructions and examples on the linux-wireless wiki:
28 # <https://wireless.wiki.kernel.org/en/users/drivers/ath10k/boardfiles>
29
30 ALLWIFIBOARDS:= \
31 8dev_habanero \
32 8dev_jalapeno \
33 aruba_ap-365 \
34 buffalo_wxr-5950ax12 \
35 devolo_magic-2-wifi-next \
36 dynalink_dl-wrx36 \
37 edgecore_eap102 \
38 edgecore_ecw5410 \
39 edgecore_oap100 \
40 edimax_cax1800 \
41 extreme-networks_ws-ap3915i \
42 glinet_gl-a1300 \
43 glinet_gl-ap1300 \
44 glinet_gl-s1300 \
45 linksys_ea8300 \
46 linksys_whw03v2 \
47 netgear_wax218 \
48 nokia_ac400i \
49 p2w_r619ac \
50 pakedge_wr-1 \
51 qnap_301w \
52 qxwlan_e2600ac-c1 \
53 qxwlan_e2600ac-c2 \
54 redmi_ax6 \
55 sony_ncp-hg100-cellular \
56 teltonika_rutx \
57 wallys_dr40x9 \
58 xiaomi_ax3600 \
59 xiaomi_ax9000 \
60 zte_mf18a \
61 zte_mf289f \
62 zyxel_nbg7815
63
64 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD))
65
66 define Package/ipq-wifi-default
67 SUBMENU:=ath10k Board-Specific Overrides
68 SECTION:=firmware
69 CATEGORY:=Firmware
70 DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x||TARGET_ipq807x)
71 TITLE:=Custom Board
72 endef
73
74 define ipq-wifi-install-one-to
75 $(INSTALL_DIR) $(2)/lib/firmware/ath10k/$(3)/
76 $(INSTALL_DATA) $(1) $(2)/lib/firmware/ath10k/$(3)/board-2.bin
77 endef
78
79 define ipq-wifi-install-ath11-one-to
80 $(INSTALL_DIR) $(2)/lib/firmware/ath11k/$(3)/
81 $(INSTALL_DATA) $(1) $(2)/lib/firmware/ath11k/$(3)/board-2.bin
82 endef
83
84 define ipq-wifi-install-one
85 $(if $(filter $(suffix $(1)),.QCA4019 .qca4019),\
86 $(call ipq-wifi-install-one-to,$(1),$(2),QCA4019/hw1.0),\
87 $(if $(filter $(suffix $(1)),.QCA9888 .qca9888),\
88 $(call ipq-wifi-install-one-to,$(1),$(2),QCA9888/hw2.0),\
89 $(if $(filter $(suffix $(1)),.QCA9889 .qca9889),\
90 $(call ipq-wifi-install-one-to,$(1),$(2),QCA9887/hw1.0),\
91 $(if $(filter $(suffix $(1)),.QCA9984 .qca9984),\
92 $(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
93 $(if $(filter $(suffix $(1)),.QCA99X0 .qca99x0),\
94 $(call ipq-wifi-install-one-to,$(1),$(2),QCA99X0/hw2.0),\
95 $(if $(filter $(suffix $(1)),.IPQ8074 .ipq8074),\
96 $(call ipq-wifi-install-ath11-one-to,$(1),$(2),IPQ8074/hw2.0),\
97 $(if $(filter $(suffix $(1)),.QCN9074 .qcn9074),\
98 $(call ipq-wifi-install-ath11-one-to,$(1),$(2),QCN9074/hw1.0),\
99 $(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\
100 )))))))
101
102 endef
103 # Blank line required at end of above define due to foreach context
104
105 define generate-ipq-wifi-package
106 define Package/ipq-wifi-$(1)
107 $(call Package/ipq-wifi-default)
108 TITLE:=board-2.bin Overrides for $(2)
109 CONFLICTS:=$(PREV_BOARD)
110 endef
111
112 define Package/ipq-wifi-$(1)/description
113 The $(2) requires board-specific, reference ("cal") data
114 that is not yet present in the upstream wireless firmware distribution.
115
116 This package supplies board-2.bin file(s) that, in the interim,
117 overwrite those supplied by the ath10k-firmware-* packages.
118
119 This is package is only necessary for the $(2).
120
121 Do not install it for any other device!
122 endef
123
124 define Package/ipq-wifi-$(1)/install-overlay
125 $$$$(foreach IPQ_WIFI_BOARD_FILE,$$$$(wildcard $(PKG_BUILD_DIR)/board-$(1).*),\
126 $$$$(call ipq-wifi-install-one,$$$$(IPQ_WIFI_BOARD_FILE),$$(1)))
127 endef
128
129 PREV_BOARD+=ipq-wifi-$(1)
130 endef
131
132 # Add board name to ALLWIFIBOARDS
133 # Place files in this directory as board-<devicename>.<qca4019|qca9888|qca9889|qca9984|qca99x0|ipq8074>
134 # Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
135
136 $(eval $(call generate-ipq-wifi-package,8dev_habanero,8devices Habanero))
137 $(eval $(call generate-ipq-wifi-package,8dev_jalapeno,8devices Jalapeno))
138 $(eval $(call generate-ipq-wifi-package,aruba_ap-365,Aruba AP-365))
139 $(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
140 $(eval $(call generate-ipq-wifi-package,devolo_magic-2-wifi-next,devolo Magic 2 WiFi next))
141 $(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
142 $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
143 $(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410))
144 $(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100))
145 $(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
146 $(eval $(call generate-ipq-wifi-package,extreme-networks_ws-ap3915i,Edgecore OAP100))
147 $(eval $(call generate-ipq-wifi-package,glinet_gl-a1300,GL.iNet GL-A1300))
148 $(eval $(call generate-ipq-wifi-package,glinet_gl-ap1300,GL.iNet GL-AP1300))
149 $(eval $(call generate-ipq-wifi-package,glinet_gl-s1300,GL.iNet GL-S1300))
150 $(eval $(call generate-ipq-wifi-package,linksys_ea8300,Linksys EA8300))
151 $(eval $(call generate-ipq-wifi-package,linksys_whw03v2,Linksys WHW03 V2))
152 $(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218))
153 $(eval $(call generate-ipq-wifi-package,nokia_ac400i,Nokia AC400i))
154 $(eval $(call generate-ipq-wifi-package,p2w_r619ac,P&W R619AC))
155 $(eval $(call generate-ipq-wifi-package,pakedge_wr-1,Pakedge WR-1))
156 $(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w))
157 $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c1,Qxwlan E2600AC C1))
158 $(eval $(call generate-ipq-wifi-package,qxwlan_e2600ac-c2,Qxwlan E2600AC C2))
159 $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
160 $(eval $(call generate-ipq-wifi-package,sony_ncp-hg100-cellular,Sony NCP-HG100/Cellular))
161 $(eval $(call generate-ipq-wifi-package,teltonika_rutx,Teltonika RUTX))
162 $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
163 $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
164 $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
165 $(eval $(call generate-ipq-wifi-package,zte_mf18a,ZTE MF18A))
166 $(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F))
167 $(eval $(call generate-ipq-wifi-package,zyxel_nbg7815,Zyxel NBG7815))
168
169 $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE))))