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_PACKAGES := kmod-usb-core kmod-usb2
42 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
43 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
48 DEVICE_PACKAGES += kmod-usb-ohci rssileds
52 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
77 UBNT_REVISION := 42.$(UBNT_REVISION)
81 define Device/ubnt_airrouter
83 DEVICE_TITLE := Ubiquiti AirRouter
84 SUPPORTED_DEVICES += airrouter
86 TARGET_DEVICES += ubnt_airrouter
88 define Device/ubnt_bullet-m
90 DEVICE_TITLE := Ubiquiti Bullet-M
91 SUPPORTED_DEVICES += bullet-m
93 TARGET_DEVICES += ubnt_bullet-m
95 define Device/ubnt_bullet-m-xw
97 DEVICE_TITLE := Ubiquiti Bullet-M (XW)
98 SUPPORTED_DEVICES += bullet-m-xw
100 TARGET_DEVICES += ubnt_bullet-m-xw
102 define Device/ubnt_rocket-m
104 DEVICE_TITLE := Ubiquiti Rocket-M
105 SUPPORTED_DEVICES += rocket-m
107 TARGET_DEVICES += ubnt_rocket-m
109 define Device/ubnt_nano-m
111 DEVICE_TITLE := Ubiquiti Nano-M
112 SUPPORTED_DEVICES += nano-m
114 TARGET_DEVICES += ubnt_nano-m
116 define Device/ubnt_lap-120
118 DEVICE_TITLE := Ubiquiti LiteAP ac (LAP-120)
119 DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
121 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
123 TARGET_DEVICES += ubnt_lap-120
125 define Device/ubnt_nanostation-ac
127 DEVICE_TITLE := Ubiquiti Nanostation AC
128 DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
130 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
132 TARGET_DEVICES += ubnt_nanostation-ac
134 define Device/ubnt_nanostation-ac-loco
136 DEVICE_TITLE := Ubiquiti Nanostation AC loco
137 DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
139 IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
141 TARGET_DEVICES += ubnt_nanostation-ac-loco
143 define Device/ubnt_unifi
145 DEVICE_TITLE := Ubiquiti UniFi
146 SUPPORTED_DEVICES += unifi
148 TARGET_DEVICES += ubnt_unifi
150 define Device/ubnt_unifiac
153 IMAGES := sysupgrade.bin
154 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
155 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
159 define Device/ubnt_unifiac-lite
160 $(Device/ubnt_unifiac)
161 DEVICE_TITLE := Ubiquiti UniFi AC-Lite
162 SUPPORTED_DEVICES += ubnt-unifiac-lite
164 TARGET_DEVICES += ubnt_unifiac-lite
166 define Device/ubnt_unifiac-mesh
167 $(Device/ubnt_unifiac)
168 DEVICE_TITLE := Ubiquiti UniFi AC-Mesh
169 SUPPORTED_DEVICES += ubnt-unifiac-mesh
171 TARGET_DEVICES += ubnt_unifiac-mesh
173 define Device/ubnt_unifiac-mesh-pro
174 $(Device/ubnt_unifiac)
175 DEVICE_TITLE := Ubiquiti UniFi AC-Mesh Pro
176 SUPPORTED_DEVICES += ubnt-unifiac-mesh-pro
178 TARGET_DEVICES += ubnt_unifiac-mesh-pro
180 define Device/ubnt_unifiac-pro
181 $(Device/ubnt_unifiac)
182 DEVICE_TITLE := Ubiquiti UniFi AC-Pro
183 DEVICE_PACKAGES += kmod-usb-core kmod-usb2
184 SUPPORTED_DEVICES += ubnt-unifiac-pro
186 TARGET_DEVICES += ubnt_unifiac-pro
188 define Device/ubnt_routerstation_common
189 DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci kmod-usb2 fconfig
192 IMAGES := sysupgrade.bin factory.bin
193 IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | check-size $$$$(IMAGE_SIZE)
194 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE) | append-metadata
195 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
196 KERNEL_INITRAMFS := kernel-bin | append-dtb
199 define Device/ubnt_routerstation
200 $(Device/ubnt_routerstation_common)
201 DEVICE_TITLE := Ubiquiti RouterStation
205 DEVICE_PACKAGES += -swconfig
207 TARGET_DEVICES += ubnt_routerstation
209 define Device/ubnt_routerstation-pro
210 $(Device/ubnt_routerstation_common)
211 DEVICE_TITLE := Ubiquiti RouterStation Pro
214 UBNT_CHIP := ar7100pro
216 TARGET_DEVICES += ubnt_routerstation-pro