ath79: fix SUPPORTED_DEVICES not matching ar71xx board names
[openwrt/openwrt.git] / target / linux / ath79 / image / generic-ubnt.mk
1 DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION UBNT_REVISION
2
3 # On M (XW) devices the U-Boot as of version 1.1.4-s1039 doesn't like
4 # VERSION_DIST being on the place of major(?) version number, so we need to
5 # use some number.
6 UBNT_REVISION := $(VERSION_DIST)-$(REVISION)
7
8 # mkubntimage is using the kernel image direct
9 # routerboard creates partitions out of the ubnt header
10 define Build/mkubntimage
11 -$(STAGING_DIR_HOST)/bin/mkfwimage -B $(UBNT_BOARD) \
12 -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
13 -k $(IMAGE_KERNEL) -r $@ -o $@
14 endef
15
16 # all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when
17 # booting the image, the size doesn't matter.
18 define Build/mkubntimage-split
19 -[ -f $@ ] && ( \
20 dd if=$@ of=$@.old1 bs=1024k count=1; \
21 dd if=$@ of=$@.old2 bs=1024k skip=1; \
22 $(STAGING_DIR_HOST)/bin/mkfwimage -B $(UBNT_BOARD) \
23 -v $(UBNT_TYPE).$(UBNT_CHIP).v$(UBNT_VERSION)-$(UBNT_REVISION) \
24 -k $@.old1 -r $@.old2 -o $@; \
25 rm $@.old1 $@.old2 )
26 endef
27
28 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
29 # UBNT_TYPE e.g. one of (BZ, XM, XW)
30 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
31 # UBNT_VERSION e.g. one of (6.0.0, 8.5.0)
32 define Device/ubnt
33 DEVICE_VENDOR := Ubiquiti
34 DEVICE_PACKAGES := kmod-usb2
35 IMAGES += factory.bin
36 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
37 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
38 endef
39
40 define Device/ubnt-bz
41 $(Device/ubnt)
42 SOC := ar7241
43 IMAGE_SIZE := 7448k
44 UBNT_BOARD := XM
45 UBNT_CHIP := ar7240
46 UBNT_TYPE := BZ
47 UBNT_VERSION := 6.0.0
48 endef
49
50 define Device/ubnt-sw
51 $(Device/ubnt)
52 SOC := ar7242
53 DEVICE_PACKAGES += kmod-usb-ohci
54 IMAGE_SIZE := 7552k
55 UBNT_BOARD := SW
56 UBNT_CHIP := ar7240
57 UBNT_TYPE := SW
58 UBNT_VERSION := 1.4.1
59 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
60 endef
61
62 define Device/ubnt-wa
63 $(Device/ubnt)
64 SOC := ar9342
65 IMAGE_SIZE := 15744k
66 UBNT_BOARD := WA
67 UBNT_CHIP := ar934x
68 UBNT_TYPE := WA
69 UBNT_VERSION := 8.5.0
70 endef
71
72 define Device/ubnt-xm
73 $(Device/ubnt)
74 SOC := ar7241
75 DEVICE_VARIANT := XM
76 DEVICE_PACKAGES += kmod-usb-ohci
77 IMAGE_SIZE := 7448k
78 UBNT_BOARD := XM
79 UBNT_CHIP := ar7240
80 UBNT_TYPE := XM
81 UBNT_VERSION := 6.0.0
82 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
83 endef
84
85 define Device/ubnt-xw
86 $(Device/ubnt)
87 SOC := ar9342
88 DEVICE_VARIANT := XW
89 IMAGE_SIZE := 7552k
90 UBNT_BOARD := XM
91 UBNT_CHIP := ar934x
92 UBNT_REVISION := 42.$(UBNT_REVISION)
93 UBNT_TYPE := XW
94 UBNT_VERSION := 6.0.4
95 endef
96
97 define Device/ubnt_acb-isp
98 $(Device/ubnt)
99 SOC := qca9533
100 DEVICE_MODEL := airCube ISP
101 IMAGE_SIZE := 15744k
102 UBNT_BOARD := ACB-ISP
103 UBNT_CHIP := qca9533
104 UBNT_TYPE := ACB
105 UBNT_VERSION := 2.5.0
106 endef
107 TARGET_DEVICES += ubnt_acb-isp
108
109 define Device/ubnt_airrouter
110 $(Device/ubnt-xm)
111 DEVICE_MODEL := AirRouter
112 SUPPORTED_DEVICES += airrouter
113 endef
114 TARGET_DEVICES += ubnt_airrouter
115
116 define Device/ubnt_bullet-m
117 $(Device/ubnt-xm)
118 DEVICE_MODEL := Bullet-M
119 DEVICE_PACKAGES += rssileds
120 SUPPORTED_DEVICES += bullet-m
121 endef
122 TARGET_DEVICES += ubnt_bullet-m
123
124 define Device/ubnt_bullet-m-xw
125 $(Device/ubnt-xw)
126 DEVICE_MODEL := Bullet-M
127 DEVICE_PACKAGES += rssileds
128 SUPPORTED_DEVICES += bullet-m-xw
129 endef
130 TARGET_DEVICES += ubnt_bullet-m-xw
131
132 define Device/ubnt_edgeswitch-5xp
133 $(Device/ubnt-sw)
134 DEVICE_MODEL := EdgeSwitch 5XP
135 endef
136 TARGET_DEVICES += ubnt_edgeswitch-5xp
137
138 define Device/ubnt_edgeswitch-8xp
139 $(Device/ubnt-sw)
140 DEVICE_MODEL := EdgeSwitch 8XP
141 DEVICE_PACKAGES += switch-bcm53xx-mdio
142 endef
143 TARGET_DEVICES += ubnt_edgeswitch-8xp
144
145 define Device/ubnt_lap-120
146 $(Device/ubnt-wa)
147 DEVICE_MODEL := LiteAP ac
148 DEVICE_VARIANT := LAP-120
149 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
150 endef
151 TARGET_DEVICES += ubnt_lap-120
152
153 define Device/ubnt_litebeam-ac-gen2
154 $(Device/ubnt-wa)
155 DEVICE_MODEL := LiteBeam AC
156 DEVICE_VARIANT := Gen2
157 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
158 endef
159 TARGET_DEVICES += ubnt_litebeam-ac-gen2
160
161 define Device/ubnt_nanobeam-ac
162 $(Device/ubnt-wa)
163 DEVICE_MODEL := NanoBeam AC
164 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
165 endef
166 TARGET_DEVICES += ubnt_nanobeam-ac
167
168 define Device/ubnt_nanostation-ac
169 $(Device/ubnt-wa)
170 DEVICE_MODEL := Nanostation AC
171 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
172 endef
173 TARGET_DEVICES += ubnt_nanostation-ac
174
175 define Device/ubnt_nanostation-ac-loco
176 $(Device/ubnt-wa)
177 DEVICE_MODEL := Nanostation AC loco
178 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
179 endef
180 TARGET_DEVICES += ubnt_nanostation-ac-loco
181
182 define Device/ubnt_nanostation-m
183 $(Device/ubnt-xm)
184 DEVICE_MODEL := Nanostation M
185 DEVICE_PACKAGES += rssileds
186 SUPPORTED_DEVICES += nanostation-m
187 endef
188 TARGET_DEVICES += ubnt_nanostation-m
189
190 define Device/ubnt_nanostation-m-xw
191 $(Device/ubnt-xw)
192 DEVICE_MODEL := Nanostation M
193 DEVICE_PACKAGES += rssileds
194 SUPPORTED_DEVICES += nanostation-m-xw
195 endef
196 TARGET_DEVICES += ubnt_nanostation-m-xw
197
198 define Device/ubnt_rocket-m
199 $(Device/ubnt-xm)
200 DEVICE_MODEL := Rocket-M
201 DEVICE_PACKAGES += rssileds
202 SUPPORTED_DEVICES += rocket-m
203 endef
204 TARGET_DEVICES += ubnt_rocket-m
205
206 define Device/ubnt_routerstation_common
207 DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci \
208 kmod-usb2 fconfig
209 DEVICE_VENDOR := Ubiquiti
210 SOC := ar7161
211 IMAGE_SIZE := 16128k
212 IMAGES := factory.bin
213 IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \
214 check-size $$$$(IMAGE_SIZE)
215 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
216 KERNEL_INITRAMFS := kernel-bin | append-dtb
217 endef
218
219 define Device/ubnt_routerstation
220 $(Device/ubnt_routerstation_common)
221 DEVICE_MODEL := RouterStation
222 UBNT_BOARD := RS
223 UBNT_TYPE := RSx
224 UBNT_CHIP := ar7100
225 DEVICE_PACKAGES += -swconfig
226 SUPPORTED_DEVICES += routerstation
227 endef
228 TARGET_DEVICES += ubnt_routerstation
229
230 define Device/ubnt_routerstation-pro
231 $(Device/ubnt_routerstation_common)
232 DEVICE_MODEL := RouterStation Pro
233 UBNT_BOARD := RSPRO
234 UBNT_TYPE := RSPRO
235 UBNT_CHIP := ar7100pro
236 SUPPORTED_DEVICES += routerstation-pro
237 endef
238 TARGET_DEVICES += ubnt_routerstation-pro
239
240 define Device/ubnt_unifi
241 $(Device/ubnt-bz)
242 DEVICE_MODEL := UniFi
243 SUPPORTED_DEVICES += unifi
244 endef
245 TARGET_DEVICES += ubnt_unifi
246
247 define Device/ubnt_unifiac
248 DEVICE_VENDOR := Ubiquiti
249 SOC := qca9563
250 IMAGE_SIZE := 7744k
251 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
252 endef
253
254 define Device/ubnt_unifiac-lite
255 $(Device/ubnt_unifiac)
256 DEVICE_MODEL := UniFi AC-Lite
257 SUPPORTED_DEVICES += unifiac-lite
258 endef
259 TARGET_DEVICES += ubnt_unifiac-lite
260
261 define Device/ubnt_unifiac-lr
262 $(Device/ubnt_unifiac)
263 DEVICE_MODEL := UniFi AC-LR
264 SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
265 endef
266 TARGET_DEVICES += ubnt_unifiac-lr
267
268 define Device/ubnt_unifiac-mesh
269 $(Device/ubnt_unifiac)
270 DEVICE_MODEL := UniFi AC-Mesh
271 SUPPORTED_DEVICES += unifiac-lite
272 endef
273 TARGET_DEVICES += ubnt_unifiac-mesh
274
275 define Device/ubnt_unifiac-mesh-pro
276 $(Device/ubnt_unifiac)
277 DEVICE_MODEL := UniFi AC-Mesh Pro
278 SUPPORTED_DEVICES += unifiac-pro
279 endef
280 TARGET_DEVICES += ubnt_unifiac-mesh-pro
281
282 define Device/ubnt_unifiac-pro
283 $(Device/ubnt_unifiac)
284 DEVICE_MODEL := UniFi AC-Pro
285 DEVICE_PACKAGES += kmod-usb2
286 SUPPORTED_DEVICES += unifiac-pro
287 endef
288 TARGET_DEVICES += ubnt_unifiac-pro