ath79: switch some RedBoot based devices to OKLI loader
[openwrt/staging/ldir.git] / target / linux / ath79 / image / generic-ubnt.mk
1 include ./common-ubnt.mk
2
3 define Device/ubnt_aircube-ac
4 $(Device/ubnt-acb)
5 SOC := ar9342
6 DEVICE_MODEL := airCube AC
7 UBNT_CHIP := ar9342
8 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
9 endef
10 TARGET_DEVICES += ubnt_aircube-ac
11
12 define Device/ubnt_aircube-isp
13 $(Device/ubnt-acb)
14 SOC := qca9533
15 DEVICE_MODEL := airCube ISP
16 UBNT_CHIP := qca9533
17 SUPPORTED_DEVICES += ubnt,acb-isp
18 endef
19 TARGET_DEVICES += ubnt_aircube-isp
20
21 define Device/ubnt_bullet-ac
22 $(Device/ubnt-2wa)
23 DEVICE_MODEL := Bullet AC
24 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
25 endef
26 TARGET_DEVICES += ubnt_bullet-ac
27
28 define Device/ubnt_bullet-m-xw
29 $(Device/ubnt-xw)
30 DEVICE_MODEL := Bullet M
31 DEVICE_PACKAGES += rssileds
32 SUPPORTED_DEVICES += bullet-m-xw
33 endef
34 TARGET_DEVICES += ubnt_bullet-m-xw
35
36 define Device/ubnt_edgeswitch-5xp
37 $(Device/ubnt-sw)
38 DEVICE_MODEL := EdgeSwitch 5XP
39 endef
40 TARGET_DEVICES += ubnt_edgeswitch-5xp
41
42 define Device/ubnt_edgeswitch-8xp
43 $(Device/ubnt-sw)
44 DEVICE_MODEL := EdgeSwitch 8XP
45 DEVICE_PACKAGES += kmod-switch-bcm53xx-mdio
46 endef
47 TARGET_DEVICES += ubnt_edgeswitch-8xp
48
49 define Device/ubnt_lap-120
50 $(Device/ubnt-wa)
51 DEVICE_MODEL := LiteAP ac (LAP-120)
52 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
53 endef
54 TARGET_DEVICES += ubnt_lap-120
55
56 define Device/ubnt_litebeam-ac-gen2
57 $(Device/ubnt-wa)
58 DEVICE_MODEL := LiteBeam AC
59 DEVICE_VARIANT := Gen2
60 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
61 endef
62 TARGET_DEVICES += ubnt_litebeam-ac-gen2
63
64 define Device/ubnt_nanobeam-ac
65 $(Device/ubnt-wa)
66 DEVICE_MODEL := NanoBeam AC
67 DEVICE_VARIANT := Gen1
68 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
69 endef
70 TARGET_DEVICES += ubnt_nanobeam-ac
71
72 define Device/ubnt_nanobeam-ac-gen2
73 $(Device/ubnt-wa)
74 DEVICE_MODEL := NanoBeam AC
75 DEVICE_VARIANT := Gen2
76 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
77 endef
78 TARGET_DEVICES += ubnt_nanobeam-ac-gen2
79
80 define Device/ubnt_nanobeam-ac-xc
81 $(Device/ubnt-xc)
82 SOC := qca9558
83 DEVICE_MODEL := NanoBeam AC
84 DEVICE_VARIANT := Gen1 (XC)
85 DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct rssileds
86 endef
87 TARGET_DEVICES += ubnt_nanobeam-ac-xc
88
89 define Device/ubnt_nanobeam-m5-xw
90 $(Device/ubnt-xw)
91 DEVICE_MODEL := NanoBeam M5
92 DEVICE_PACKAGES += rssileds
93 SUPPORTED_DEVICES += loco-m-xw
94 endef
95 TARGET_DEVICES += ubnt_nanobeam-m5-xw
96
97 define Device/ubnt_nanostation-ac
98 $(Device/ubnt-wa)
99 DEVICE_MODEL := Nanostation AC
100 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
101 endef
102 TARGET_DEVICES += ubnt_nanostation-ac
103
104 define Device/ubnt_nanostation-ac-loco
105 $(Device/ubnt-wa)
106 DEVICE_MODEL := Nanostation AC loco
107 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
108 endef
109 TARGET_DEVICES += ubnt_nanostation-ac-loco
110
111 define Device/ubnt_nanostation-loco-m-xw
112 $(Device/ubnt-xw)
113 DEVICE_MODEL := Nanostation Loco M
114 DEVICE_PACKAGES += rssileds
115 SUPPORTED_DEVICES += loco-m-xw
116 endef
117 TARGET_DEVICES += ubnt_nanostation-loco-m-xw
118
119 define Device/ubnt_nanostation-m-xw
120 $(Device/ubnt-xw)
121 DEVICE_MODEL := Nanostation M
122 DEVICE_PACKAGES += rssileds
123 SUPPORTED_DEVICES += nanostation-m-xw
124 endef
125 TARGET_DEVICES += ubnt_nanostation-m-xw
126
127 define Device/ubnt_powerbeam-5ac-500
128 $(Device/ubnt-xc)
129 SOC := qca9558
130 DEVICE_MODEL := PowerBeam 5AC
131 DEVICE_VARIANT := 500
132 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
133 endef
134 TARGET_DEVICES += ubnt_powerbeam-5ac-500
135
136 define Device/ubnt_powerbeam-5ac-gen2
137 $(Device/ubnt-wa)
138 DEVICE_MODEL := PowerBeam 5AC
139 DEVICE_VARIANT := Gen2
140 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
141 endef
142 TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
143
144 define Device/ubnt_powerbeam-m2-xw
145 $(Device/ubnt-xw)
146 DEVICE_MODEL := PowerBeam M2
147 DEVICE_PACKAGES += rssileds
148 SUPPORTED_DEVICES += loco-m-xw
149 endef
150 TARGET_DEVICES += ubnt_powerbeam-m2-xw
151
152 define Device/ubnt_powerbeam-m5-xw
153 $(Device/ubnt-xw)
154 DEVICE_MODEL := PowerBeam M5
155 DEVICE_PACKAGES += rssileds
156 SUPPORTED_DEVICES += loco-m-xw
157 endef
158 TARGET_DEVICES += ubnt_powerbeam-m5-xw
159
160 define Device/ubnt_rocket-5ac-lite
161 $(Device/ubnt-xc)
162 SOC := qca9558
163 DEVICE_MODEL := Rocket 5AC
164 DEVICE_VARIANT := Lite
165 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
166 endef
167 TARGET_DEVICES += ubnt_rocket-5ac-lite
168
169 define Device/ubnt_routerstation_common
170 DEVICE_PACKAGES := -kmod-ath9k -wpad-basic-wolfssl -uboot-envtools kmod-usb-ohci \
171 kmod-usb2 fconfig
172 DEVICE_VENDOR := Ubiquiti
173 SOC := ar7161
174 LOADER_TYPE := bin
175 LOADER_FLASH_OFFS := 0x50000
176 COMPILE := loader-$(1).bin
177 COMPILE/loader-$(1).bin := loader-okli-compile | lzma | pad-to 128k
178 IMAGE_SIZE := 16000k
179 IMAGES += factory.bin
180 IMAGE/factory.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
181 append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | \
182 mkubntimage $$$$(KDIR)/loader-$(1).bin | check-size
183 IMAGE/sysupgrade.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \
184 append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | check-size | \
185 sysupgrade-tar kernel=$$$$(KDIR)/loader-$(1).bin rootfs=$$$$@ | append-metadata
186 KERNEL := kernel-bin | append-dtb | lzma
187 KERNEL_INITRAMFS := kernel-bin | append-dtb
188 DEVICE_COMPAT_VERSION := 2.0
189 DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (19.07 and 21.02) \
190 due to kernel drivers restrictions. Upgrade via sysupgrade mechanism is one way operation. \
191 Downgrading OpenWrt version will involve usage of TFTP recovery or bootloader command line interface.
192 endef
193
194 define Device/ubnt_routerstation
195 $(Device/ubnt_routerstation_common)
196 DEVICE_MODEL := RouterStation
197 UBNT_BOARD := RS
198 UBNT_TYPE := RSx
199 UBNT_CHIP := ar7100
200 DEVICE_PACKAGES += -swconfig
201 endef
202 TARGET_DEVICES += ubnt_routerstation
203
204 define Device/ubnt_routerstation-pro
205 $(Device/ubnt_routerstation_common)
206 DEVICE_MODEL := RouterStation Pro
207 UBNT_BOARD := RSPRO
208 UBNT_TYPE := RSPRO
209 UBNT_CHIP := ar7100pro
210 endef
211 TARGET_DEVICES += ubnt_routerstation-pro
212
213 define Device/ubnt_unifi
214 $(Device/ubnt-bz)
215 DEVICE_MODEL := UniFi AP
216 SUPPORTED_DEVICES += unifi
217 endef
218 TARGET_DEVICES += ubnt_unifi
219
220 define Device/ubnt_unifiac
221 DEVICE_VENDOR := Ubiquiti
222 SOC := qca9563
223 IMAGE_SIZE := 7744k
224 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
225 endef
226
227 define Device/ubnt_unifiac-lite
228 $(Device/ubnt_unifiac)
229 DEVICE_MODEL := UniFi AC Lite
230 DEVICE_PACKAGES += -swconfig
231 SUPPORTED_DEVICES += unifiac-lite
232 endef
233 TARGET_DEVICES += ubnt_unifiac-lite
234
235 define Device/ubnt_unifiac-lr
236 $(Device/ubnt_unifiac)
237 DEVICE_MODEL := UniFi AC LR
238 DEVICE_PACKAGES += -swconfig
239 SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
240 endef
241 TARGET_DEVICES += ubnt_unifiac-lr
242
243 define Device/ubnt_unifiac-mesh
244 $(Device/ubnt_unifiac)
245 DEVICE_MODEL := UniFi AC Mesh
246 DEVICE_PACKAGES += -swconfig
247 SUPPORTED_DEVICES += unifiac-lite
248 endef
249 TARGET_DEVICES += ubnt_unifiac-mesh
250
251 define Device/ubnt_unifiac-mesh-pro
252 $(Device/ubnt_unifiac)
253 DEVICE_MODEL := UniFi AC Mesh Pro
254 SUPPORTED_DEVICES += unifiac-pro
255 endef
256 TARGET_DEVICES += ubnt_unifiac-mesh-pro
257
258 define Device/ubnt_unifiac-pro
259 $(Device/ubnt_unifiac)
260 DEVICE_MODEL := UniFi AC Pro
261 DEVICE_PACKAGES += kmod-usb2
262 SUPPORTED_DEVICES += unifiac-pro
263 endef
264 TARGET_DEVICES += ubnt_unifiac-pro
265
266 define Device/ubnt_unifi-ap-outdoor-plus
267 $(Device/ubnt-bz)
268 $(Device/ubnt-unifi-jffs2)
269 DEVICE_MODEL := UniFi AP Outdoor+
270 SUPPORTED_DEVICES += unifi-outdoor-plus
271 endef
272 TARGET_DEVICES += ubnt_unifi-ap-outdoor-plus
273
274 define Device/ubnt_unifi-ap-pro
275 $(Device/ubnt-unifi-jffs2)
276 SOC := ar9344
277 DEVICE_MODEL := UniFi AP Pro
278 UBNT_CHIP := ar934x
279 SUPPORTED_DEVICES += uap-pro
280 endef
281 TARGET_DEVICES += ubnt_unifi-ap-pro