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-usb2
42 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
43 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
67 DEVICE_PACKAGES += kmod-usb-ohci rssileds
72 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
83 UBNT_REVISION := 42.$(UBNT_REVISION)
87 define Device/ubnt_acb-isp
91 DEVICE_MODEL := airCube ISP
95 IMAGES := sysupgrade.bin
97 TARGET_DEVICES += ubnt_acb-isp
99 define Device/ubnt_airrouter
101 DEVICE_MODEL := AirRouter
102 SUPPORTED_DEVICES += airrouter
104 TARGET_DEVICES += ubnt_airrouter
106 define Device/ubnt_bullet-m
108 DEVICE_MODEL := Bullet-M
109 SUPPORTED_DEVICES += bullet-m
111 TARGET_DEVICES += ubnt_bullet-m
113 define Device/ubnt_bullet-m-xw
115 DEVICE_MODEL := Bullet-M
116 SUPPORTED_DEVICES += bullet-m-xw
118 TARGET_DEVICES += ubnt_bullet-m-xw
120 define Device/ubnt_lap-120
122 DEVICE_MODEL := LiteAP ac
123 DEVICE_VARIANT := LAP-120
124 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
125 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
127 TARGET_DEVICES += ubnt_lap-120
129 define Device/ubnt_nanobeam-ac
131 DEVICE_MODEL := NanoBeam AC
132 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
133 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
135 TARGET_DEVICES += ubnt_nanobeam-ac
137 define Device/ubnt_nanostation-ac
139 DEVICE_MODEL := Nanostation AC
140 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
141 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
143 TARGET_DEVICES += ubnt_nanostation-ac
145 define Device/ubnt_nanostation-ac-loco
147 DEVICE_MODEL := Nanostation AC loco
148 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct
149 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
151 TARGET_DEVICES += ubnt_nanostation-ac-loco
153 define Device/ubnt_nanostation-m
155 DEVICE_MODEL := Nanostation M
156 SUPPORTED_DEVICES += nanostation-m
158 TARGET_DEVICES += ubnt_nanostation-m
160 define Device/ubnt_nanostation-m-xw
162 DEVICE_MODEL := Nanostation M
163 SUPPORTED_DEVICES += nanostation-m-xw
165 TARGET_DEVICES += ubnt_nanostation-m-xw
167 define Device/ubnt_rocket-m
169 DEVICE_MODEL := Rocket-M
170 SUPPORTED_DEVICES += rocket-m
172 TARGET_DEVICES += ubnt_rocket-m
174 define Device/ubnt_routerstation_common
175 DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci kmod-usb2 fconfig
176 DEVICE_VENDOR := Ubiquiti
179 IMAGES := factory.bin
180 IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | check-size $$$$(IMAGE_SIZE)
181 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
182 KERNEL_INITRAMFS := kernel-bin | append-dtb
185 define Device/ubnt_routerstation
186 $(Device/ubnt_routerstation_common)
187 DEVICE_MODEL := RouterStation
191 DEVICE_PACKAGES += -swconfig
192 SUPPORTED_DEVICES += routerstation
194 TARGET_DEVICES += ubnt_routerstation
196 define Device/ubnt_routerstation-pro
197 $(Device/ubnt_routerstation_common)
198 DEVICE_MODEL := RouterStation Pro
201 UBNT_CHIP := ar7100pro
202 SUPPORTED_DEVICES += routerstation-pro
204 TARGET_DEVICES += ubnt_routerstation-pro
206 define Device/ubnt_unifi
208 DEVICE_MODEL := UniFi
209 SUPPORTED_DEVICES += unifi
211 TARGET_DEVICES += ubnt_unifi
213 define Device/ubnt_unifiac
214 DEVICE_VENDOR := Ubiquiti
217 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
220 define Device/ubnt_unifiac-lite
221 $(Device/ubnt_unifiac)
222 DEVICE_MODEL := UniFi AC-Lite
223 SUPPORTED_DEVICES += unifiac-lite
225 TARGET_DEVICES += ubnt_unifiac-lite
227 define Device/ubnt_unifiac-lr
228 $(Device/ubnt_unifiac)
229 DEVICE_MODEL := UniFi AC-LR
230 SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
232 TARGET_DEVICES += ubnt_unifiac-lr
234 define Device/ubnt_unifiac-mesh
235 $(Device/ubnt_unifiac)
236 DEVICE_MODEL := UniFi AC-Mesh
237 SUPPORTED_DEVICES += ubnt-unifiac-mesh
239 TARGET_DEVICES += ubnt_unifiac-mesh
241 define Device/ubnt_unifiac-mesh-pro
242 $(Device/ubnt_unifiac)
243 DEVICE_MODEL := UniFi AC-Mesh Pro
244 SUPPORTED_DEVICES += ubnt-unifiac-mesh-pro
246 TARGET_DEVICES += ubnt_unifiac-mesh-pro
248 define Device/ubnt_unifiac-pro
249 $(Device/ubnt_unifiac)
250 DEVICE_MODEL := UniFi AC-Pro
251 DEVICE_PACKAGES += kmod-usb2
252 SUPPORTED_DEVICES += ubnt-unifiac-pro
254 TARGET_DEVICES += ubnt_unifiac-pro