1 DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION UBNT_REVISION
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
6 UBNT_REVISION := $(VERSION_DIST)-$(REVISION)
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 $@
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
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 $@; \
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)
33 DEVICE_VENDOR := Ubiquiti
34 DEVICE_PACKAGES := kmod-usb2
36 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
37 append-rootfs | pad-rootfs | check-size | mkubntimage-split
53 DEVICE_PACKAGES += kmod-usb-ohci
59 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
75 DEVICE_PACKAGES += kmod-usb-ohci
81 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
91 UBNT_REVISION := 42.$(UBNT_REVISION)
96 define Device/ubnt_acb-isp
99 DEVICE_MODEL := airCube ISP
101 UBNT_BOARD := ACB-ISP
104 UBNT_VERSION := 2.5.0
106 TARGET_DEVICES += ubnt_acb-isp
108 define Device/ubnt_airrouter
111 DEVICE_MODEL := AirRouter
112 SUPPORTED_DEVICES += airrouter
114 TARGET_DEVICES += ubnt_airrouter
116 define Device/ubnt_bullet-m-ar7240
119 DEVICE_MODEL := Bullet-M
120 DEVICE_VARIANT := XM (AR7240)
121 DEVICE_PACKAGES += rssileds
122 SUPPORTED_DEVICES += bullet-m
124 TARGET_DEVICES += ubnt_bullet-m-ar7240
126 define Device/ubnt_bullet-m-ar7241
129 DEVICE_MODEL := Bullet-M
130 DEVICE_VARIANT := XM (AR7241)
131 DEVICE_PACKAGES += rssileds
132 SUPPORTED_DEVICES += bullet-m ubnt,bullet-m
134 TARGET_DEVICES += ubnt_bullet-m-ar7241
136 define Device/ubnt_bullet-m-xw
138 DEVICE_MODEL := Bullet-M
139 DEVICE_PACKAGES += rssileds
140 SUPPORTED_DEVICES += bullet-m-xw
142 TARGET_DEVICES += ubnt_bullet-m-xw
144 define Device/ubnt_edgeswitch-5xp
146 DEVICE_MODEL := EdgeSwitch 5XP
148 TARGET_DEVICES += ubnt_edgeswitch-5xp
150 define Device/ubnt_edgeswitch-8xp
152 DEVICE_MODEL := EdgeSwitch 8XP
153 DEVICE_PACKAGES += switch-bcm53xx-mdio
155 TARGET_DEVICES += ubnt_edgeswitch-8xp
157 define Device/ubnt_lap-120
159 DEVICE_MODEL := LiteAP ac
160 DEVICE_VARIANT := LAP-120
161 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
163 TARGET_DEVICES += ubnt_lap-120
165 define Device/ubnt_litebeam-ac-gen2
167 DEVICE_MODEL := LiteBeam AC
168 DEVICE_VARIANT := Gen2
169 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
171 TARGET_DEVICES += ubnt_litebeam-ac-gen2
173 define Device/ubnt_nanobeam-ac
175 DEVICE_MODEL := NanoBeam AC
176 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
178 TARGET_DEVICES += ubnt_nanobeam-ac
180 define Device/ubnt_nanobridge-m
183 DEVICE_MODEL := NanoBridge M
184 DEVICE_PACKAGES += rssileds
185 SUPPORTED_DEVICES += bullet-m
187 TARGET_DEVICES += ubnt_nanobridge-m
189 define Device/ubnt_nanostation-ac
191 DEVICE_MODEL := Nanostation AC
192 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
194 TARGET_DEVICES += ubnt_nanostation-ac
196 define Device/ubnt_nanostation-ac-loco
198 DEVICE_MODEL := Nanostation AC loco
199 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
201 TARGET_DEVICES += ubnt_nanostation-ac-loco
203 define Device/ubnt_nanostation-loco-m
206 DEVICE_MODEL := Nanostation Loco M
207 DEVICE_PACKAGES += rssileds
208 SUPPORTED_DEVICES += bullet-m
210 TARGET_DEVICES += ubnt_nanostation-loco-m
212 define Device/ubnt_nanostation-loco-m-xw
214 DEVICE_MODEL := Nanostation Loco M
215 DEVICE_PACKAGES += rssileds
216 SUPPORTED_DEVICES += loco-m-xw
218 TARGET_DEVICES += ubnt_nanostation-loco-m-xw
220 define Device/ubnt_nanostation-m
223 DEVICE_MODEL := Nanostation M
224 DEVICE_PACKAGES += rssileds
225 SUPPORTED_DEVICES += nanostation-m
227 TARGET_DEVICES += ubnt_nanostation-m
229 define Device/ubnt_nanostation-m-xw
231 DEVICE_MODEL := Nanostation M
232 DEVICE_PACKAGES += rssileds
233 SUPPORTED_DEVICES += nanostation-m-xw
235 TARGET_DEVICES += ubnt_nanostation-m-xw
237 define Device/ubnt_picostation-m
240 DEVICE_MODEL := Picostation M
241 DEVICE_PACKAGES += rssileds
242 SUPPORTED_DEVICES += bullet-m
244 TARGET_DEVICES += ubnt_picostation-m
246 define Device/ubnt_rocket-m
249 DEVICE_MODEL := Rocket-M
250 DEVICE_PACKAGES += rssileds
251 SUPPORTED_DEVICES += rocket-m
253 TARGET_DEVICES += ubnt_rocket-m
255 define Device/ubnt_routerstation_common
256 DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci \
258 DEVICE_VENDOR := Ubiquiti
261 IMAGES := factory.bin
262 IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \
264 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
265 KERNEL_INITRAMFS := kernel-bin | append-dtb
268 define Device/ubnt_routerstation
269 $(Device/ubnt_routerstation_common)
270 DEVICE_MODEL := RouterStation
274 DEVICE_PACKAGES += -swconfig
275 SUPPORTED_DEVICES += routerstation
277 TARGET_DEVICES += ubnt_routerstation
279 define Device/ubnt_routerstation-pro
280 $(Device/ubnt_routerstation_common)
281 DEVICE_MODEL := RouterStation Pro
284 UBNT_CHIP := ar7100pro
285 SUPPORTED_DEVICES += routerstation-pro
287 TARGET_DEVICES += ubnt_routerstation-pro
289 define Device/ubnt_unifi
291 DEVICE_MODEL := UniFi
292 SUPPORTED_DEVICES += unifi
294 TARGET_DEVICES += ubnt_unifi
296 define Device/ubnt_unifiac
297 DEVICE_VENDOR := Ubiquiti
300 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
303 define Device/ubnt_unifiac-lite
304 $(Device/ubnt_unifiac)
305 DEVICE_MODEL := UniFi AC-Lite
306 SUPPORTED_DEVICES += unifiac-lite
308 TARGET_DEVICES += ubnt_unifiac-lite
310 define Device/ubnt_unifiac-lr
311 $(Device/ubnt_unifiac)
312 DEVICE_MODEL := UniFi AC-LR
313 SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
315 TARGET_DEVICES += ubnt_unifiac-lr
317 define Device/ubnt_unifiac-mesh
318 $(Device/ubnt_unifiac)
319 DEVICE_MODEL := UniFi AC-Mesh
320 SUPPORTED_DEVICES += unifiac-lite
322 TARGET_DEVICES += ubnt_unifiac-mesh
324 define Device/ubnt_unifiac-mesh-pro
325 $(Device/ubnt_unifiac)
326 DEVICE_MODEL := UniFi AC-Mesh Pro
327 SUPPORTED_DEVICES += unifiac-pro
329 TARGET_DEVICES += ubnt_unifiac-mesh-pro
331 define Device/ubnt_unifiac-pro
332 $(Device/ubnt_unifiac)
333 DEVICE_MODEL := UniFi AC-Pro
334 DEVICE_PACKAGES += kmod-usb2
335 SUPPORTED_DEVICES += unifiac-pro
337 TARGET_DEVICES += ubnt_unifiac-pro