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 \
12 -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
18 # all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when
19 # booting the image, the size doesn't matter.
20 define Build/mkubntimage-split
22 dd if=$@ of=$@.old1 bs=1024k count=1; \
23 dd if=$@ of=$@.old2 bs=1024k skip=1; \
24 $(STAGING_DIR_HOST)/bin/mkfwimage \
25 -B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v$(UBNT_VERSION)-$(UBNT_REVISION) \
32 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
33 # UBNT_TYPE e.g. one of (BZ, XM, XW)
34 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
35 # UBNT_VERSION e.g. one of (6.0.0, 8.5.0)
37 DEVICE_VENDOR := Ubiquiti
38 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
43 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
44 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
50 DEVICE_PACKAGES += kmod-usb-ohci rssileds
54 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
80 UBNT_REVISION := 42.$(UBNT_REVISION)
84 define Device/ubnt_airrouter
86 DEVICE_MODEL := AirRouter
87 SUPPORTED_DEVICES += airrouter
89 TARGET_DEVICES += ubnt_airrouter
91 define Device/ubnt_bullet-m
93 DEVICE_MODEL := Bullet-M
94 SUPPORTED_DEVICES += bullet-m
96 TARGET_DEVICES += ubnt_bullet-m
98 define Device/ubnt_bullet-m-xw
100 DEVICE_MODEL := Bullet-M
101 SUPPORTED_DEVICES += bullet-m-xw
103 TARGET_DEVICES += ubnt_bullet-m-xw
105 define Device/ubnt_rocket-m
107 DEVICE_MODEL := Rocket-M
108 SUPPORTED_DEVICES += rocket-m
110 TARGET_DEVICES += ubnt_rocket-m
112 define Device/ubnt_nanostation-m
114 DEVICE_MODEL := Nanostation M
115 SUPPORTED_DEVICES += nano-m
117 TARGET_DEVICES += ubnt_nanostation-m
119 define Device/ubnt_nanostation-m-xw
121 DEVICE_MODEL := Nanostation M
122 SUPPORTED_DEVICES += nanostation-m-xw
124 TARGET_DEVICES += ubnt_nanostation-m-xw
126 define Device/ubnt_lap-120
128 DEVICE_MODEL := LiteAP ac
129 DEVICE_VARIANT := LAP-120
130 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
132 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
134 TARGET_DEVICES += ubnt_lap-120
136 define Device/ubnt_nanobeam-ac
138 DEVICE_MODEL := NanoBeam AC
139 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
141 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
143 TARGET_DEVICES += ubnt_nanobeam-ac
145 define Device/ubnt_nanostation-ac
147 DEVICE_MODEL := Nanostation AC
148 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
150 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
152 TARGET_DEVICES += ubnt_nanostation-ac
154 define Device/ubnt_nanostation-ac-loco
156 DEVICE_MODEL := Nanostation AC loco
157 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
159 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
161 TARGET_DEVICES += ubnt_nanostation-ac-loco
163 define Device/ubnt_unifi
165 DEVICE_MODEL := UniFi
166 SUPPORTED_DEVICES += unifi
168 TARGET_DEVICES += ubnt_unifi
170 define Device/ubnt_unifiac
171 DEVICE_VENDOR := Ubiquiti
174 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
177 define Device/ubnt_unifiac-lite
178 $(Device/ubnt_unifiac)
179 DEVICE_MODEL := UniFi AC-Lite
180 SUPPORTED_DEVICES += ubnt-unifiac-lite
182 TARGET_DEVICES += ubnt_unifiac-lite
184 define Device/ubnt_unifiac-mesh
185 $(Device/ubnt_unifiac)
186 DEVICE_MODEL := UniFi AC-Mesh
187 SUPPORTED_DEVICES += ubnt-unifiac-mesh
189 TARGET_DEVICES += ubnt_unifiac-mesh
191 define Device/ubnt_unifiac-mesh-pro
192 $(Device/ubnt_unifiac)
193 DEVICE_MODEL := UniFi AC-Mesh Pro
194 SUPPORTED_DEVICES += ubnt-unifiac-mesh-pro
196 TARGET_DEVICES += ubnt_unifiac-mesh-pro
198 define Device/ubnt_unifiac-pro
199 $(Device/ubnt_unifiac)
200 DEVICE_MODEL := UniFi AC-Pro
201 DEVICE_PACKAGES += kmod-usb-core kmod-usb2
202 SUPPORTED_DEVICES += ubnt-unifiac-pro
204 TARGET_DEVICES += ubnt_unifiac-pro
206 define Device/ubnt_routerstation_common
207 DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci kmod-usb2 fconfig
208 DEVICE_VENDOR := Ubiquiti
211 IMAGES := factory.bin
212 IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | check-size $$$$(IMAGE_SIZE)
213 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
214 KERNEL_INITRAMFS := kernel-bin | append-dtb
217 define Device/ubnt_routerstation
218 $(Device/ubnt_routerstation_common)
219 DEVICE_MODEL := RouterStation
223 DEVICE_PACKAGES += -swconfig
224 SUPPORTED_DEVICES += routerstation
226 TARGET_DEVICES += ubnt_routerstation
228 define Device/ubnt_routerstation-pro
229 $(Device/ubnt_routerstation_common)
230 DEVICE_MODEL := RouterStation Pro
233 UBNT_CHIP := ar7100pro
234 SUPPORTED_DEVICES += routerstation-pro
236 TARGET_DEVICES += ubnt_routerstation-pro
238 define Device/ubnt_acb-isp
242 DEVICE_MODEL := airCube ISP
243 UBNT_BOARD := ACB-ISP
246 IMAGES := sysupgrade.bin
248 TARGET_DEVICES += ubnt_acb-isp