1 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
2 # UBNT_TYPE e.g. one of (BZ, XM, XW)
3 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
5 # mkubntimage is using the kernel image direct
6 # routerboard creates partitions out of the ubnt header
7 define Build
/mkubntimage
8 -$(STAGING_DIR_HOST
)/bin
/mkfwimage \
9 -B
$(UBNT_BOARD
) -v
$(UBNT_TYPE
).
$(UBNT_CHIP
).v6.0
.0-OpenWrt-
$(REVISION
) \
15 # all UBNT XM device expect the kernel image to have 1024k while flash, when
16 # booting the image, the size doesn't matter.
17 define Build
/mkubntimage-split
19 dd if
=$@ of
=$@.old1 bs
=1024k count
=1; \
20 dd if
=$@ of
=$@.old2 bs
=1024k skip
=1; \
21 $(STAGING_DIR_HOST
)/bin
/mkfwimage \
22 -B
$(UBNT_BOARD
) -v
$(UBNT_TYPE
).
$(UBNT_CHIP
).v6.0
.0-OpenWrt-
$(REVISION
) \
29 define Build
/mkubntimage2
30 -$(STAGING_DIR_HOST
)/bin
/mkfwimage2
-f
0x9f000000 \
31 -v
$(UBNT_TYPE
).
$(UBNT_CHIP
).v6.0
.0-OpenWrt-
$(REVISION
) \
32 -p jffs2
:0x50000:0xf60000:0:0:$@ \
37 DEVICE_VARS
+= UBNT_BOARD UBNT_CHIP UBNT_TYPE
39 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
40 # UBNT_TYPE e.g. one of (BZ, XM, XW)
41 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
43 DEVICE_PACKAGES
:= kmod-usb-core kmod-usb-ohci kmod-usb2
44 DEVICE_PROFILE
:= UBNT
46 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
50 IMAGES
:= sysupgrade.bin factory.bin
51 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage-split
52 IMAGE
/sysupgrade.bin
= append-kernel | pad-to
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
56 DEVICE_PACKAGES
:= kmod-usb-core kmod-usb-ohci kmod-usb2
57 DEVICE_PROFILE
:= UBNT
59 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
63 IMAGES
:= sysupgrade.bin factory.bin
64 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage-split
65 IMAGE
/sysupgrade.bin
= append-kernel | pad-to
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
69 DEVICE_PACKAGES
:= kmod-usb-core kmod-usb-ohci kmod-usb2
70 DEVICE_PROFILE
:= UBNT
72 MTDPARTS
= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7552k
(firmware
),256k
(cfg
)ro
,64k
(EEPROM
)ro
76 IMAGES
:= sysupgrade.bin factory.bin
77 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage-split
78 IMAGE
/sysupgrade.bin
= append-kernel | pad-to
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
81 define Device
/ubnt-unifiac
82 DEVICE_PACKAGES
:= kmod-usb-core kmod-usb-ohci kmod-usb2
83 DEVICE_PROFILE
:= UBNT
85 MTDPARTS
= spi0.0
:384k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7744k
(firmware
),7744k
(ubnt-airos
)ro
,128k
(bs
)ro
,256k
(cfg
)ro
,64k
(EEPROM
)ro
86 IMAGES
:= sysupgrade.bin
87 IMAGE
/sysupgrade.bin
= append-kernel | pad-to
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
92 DEVICE_TITLE
:= Ubiquiti RW2458N
96 define Device
/ubnt-airrouter
98 DEVICE_TITLE
:= Ubiquiti AirRouter
102 define Device
/ubnt-bullet-m
104 DEVICE_TITLE
:= Ubiquiti Bullet-M
108 define Device
/ubnt-rocket-m
110 DEVICE_TITLE
:= Ubiquiti Rocket-M
114 define Device
/ubnt-nano-m
116 DEVICE_TITLE
:= Ubiquiti Nano-M
119 TARGET_DEVICES
+= rw2458n ubnt-airrouter ubnt-bullet-m ubnt-rocket-m ubnt-nano-m
121 define Device
/ubnt-unifi
123 DEVICE_TITLE
:= Ubiquiti UniFi
125 DEVICE_PROFILE
:= UBNT UBNTUNIFI
128 define Device
/ubnt-unifiac-lite
129 $(Device
/ubnt-unifiac
)
130 DEVICE_TITLE
:= Ubiquiti UniFi AC-Lite
131 DEVICE_PACKAGES
:= kmod-ath10k ath10k-firmware-qca988x
132 DEVICE_PROFILE
:= UBNT UBNTUNIFIACLITE
133 BOARDNAME
:= UBNT-UF-AC-LITE
136 define Device
/ubnt-unifiac-pro
137 $(Device
/ubnt-unifiac
)
138 DEVICE_TITLE
:= Ubiquiti UniFi AC-Pro
139 DEVICE_PACKAGES
:= kmod-ath10k ath10k-firmware-qca988x kmod-usb-core kmod-usb-ohci kmod-usb2
140 DEVICE_PROFILE
:= UBNT UBNTUNIFIACPRO
141 BOARDNAME
:= UBNT-UF-AC-PRO
144 define Device
/ubnt-unifi-outdoor
146 DEVICE_TITLE
:= Ubiquiti UniFi Outdoor
147 BOARDNAME
:= UBNT-U20
148 DEVICE_PROFILE
:= UBNT UBNTUNIFIOUTDOOR
150 TARGET_DEVICES
+= ubnt-unifi ubnt-unifiac-lite ubnt-unifiac-pro ubnt-unifi-outdoor
152 define Device
/ubnt-nano-m-xw
154 DEVICE_TITLE
:= Ubiquiti Nano M XW
155 BOARDNAME
:= UBNT-NM-XW
158 define Device
/ubnt-loco-m-xw
160 DEVICE_TITLE
:= Ubiquiti Loco XW
161 BOARDNAME
:= UBNT-LOCO-XW
164 define Device
/ubnt-rocket-m-xw
166 DEVICE_TITLE
:= Ubiquiti Rocket M XW
167 BOARDNAME
:= UBNT-RM-XW
170 define Device
/ubnt-rocket-m-ti
172 DEVICE_TITLE
:= Ubiquiti Rocket M TI
173 BOARDNAME
:= UBNT-RM-TI
177 TARGET_DEVICES
+= ubnt-nano-m-xw ubnt-loco-m-xw ubnt-rocket-m-xw ubnt-rocket-m-ti
179 define Device
/ubnt-air-gateway
181 DEVICE_TITLE
:= Ubiquiti Air Gateway
182 BOARDNAME
:= UBNT-AGW
186 CONSOLE
= ttyATH0
,115200
188 TARGET_DEVICES
+= ubnt-air-gateway
190 define Device
/ubnt-air-gateway-pro
192 DEVICE_TITLE
:= Ubiquiti Air Gateway Pro
193 BOARDNAME
:= UBNT-AGWP
196 CONSOLE
= ttyS0
,115200
198 TARGET_DEVICES
+= ubnt-air-gateway-pro
200 define Device
/ubdev01
202 DEVICE_TITLE
:= Ubiquiti ubDEV01
203 MTDPARTS
:= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,7488k
(firmware
),64k
(certs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
205 UBNT_BOARD
:= UBDEV01
210 TARGET_DEVICES
+= ubdev01
212 define Device
/ubnt-routerstation
213 DEVICE_TITLE
:= Ubiquiti RouterStation
214 DEVICE_PACKAGES
:= kmod-usb-core kmod-usb-ohci kmod-usb2
216 IMAGES
:= sysupgrade.bin factory.bin
217 IMAGE
/factory.bin
= append-rootfs | pad-rootfs | mkubntimage
218 IMAGE
/sysupgrade.bin
= append-rootfs | pad-rootfs | combined-image | check-size
$$$$(IMAGE_SIZE
)
219 KERNEL
:= kernel-bin | patch-cmdline | lzma | pad-to
$$(BLOCKSIZE
)
222 define Device
/ubnt-rs
223 $(Device
/ubnt-routerstation
)
224 DEVICE_TITLE
:= Ubiquiti RouterStation
226 DEVICE_PROFILE
:= UBNT UBNTRS
232 define Device
/ubnt-rspro
233 $(Device
/ubnt-routerstation
)
234 DEVICE_TITLE
:= Ubiquiti RouterStation Pro
235 BOARDNAME
:= UBNT-RSPRO
236 DEVICE_PROFILE
:= UBNT UBNTRSPRO
239 UBNT_CHIP
:= ar7100pro
242 define Device
/ubnt-ls-sr71
243 $(Device
/ubnt-routerstation
)
244 DEVICE_TITLE
:= Ubiquiti LS-SR71
245 BOARDNAME
:= UBNT-LS-SR71
246 DEVICE_PROFILE
:= UBNT
247 UBNT_BOARD
:= LS-SR71
252 TARGET_DEVICES
+= ubnt-rs ubnt-rspro ubnt-ls-sr71
254 define Device
/ubnt-uap-pro
255 DEVICE_TITLE
:= Ubiquiti UAP Pro
258 MTDPARTS
:= spi0.0
:256k
(u-boot
)ro
,64k
(u-boot-env
)ro
,1536k
(kernel
),14208k
(rootfs
),256k
(cfg
)ro
,64k
(EEPROM
)ro
,15744k@
0x50000(firmware
)
262 DEVICE_PROFILE
:= UBNT UAPPRO
263 KERNEL
:= kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 kernel0
264 IMAGES
:= sysupgrade.bin factory.bin
265 IMAGE
/sysupgrade.bin
= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
)
266 IMAGE
/factory.bin
= $$(IMAGE
/sysupgrade.bin
) | mkubntimage2
269 define Device
/ubnt-unifi-outdoor-plus
270 $(Device
/ubnt-uap-pro
)
271 DEVICE_TITLE
:= Ubiquiti UniFi Outdoor Plus
273 BOARDNAME
:= UBNT-UOP
274 DEVICE_PROFILE
:= UBNT
277 TARGET_DEVICES
+= ubnt-uap-pro ubnt-unifi-outdoor-plus