ath79: use ath10k-ct-smallbuffers for 64 MiB devices
[openwrt/staging/wigyori.git] / target / linux / ath79 / image / generic-ubnt.mk
1 DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION UBNT_REVISION
2
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
5 # use some number.
6 UBNT_REVISION := $(VERSION_DIST)-$(REVISION)
7
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 -B $(UBNT_BOARD) \
12 -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
13 -k $(IMAGE_KERNEL) -r $@ -o $@
14 endef
15
16 # all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when
17 # booting the image, the size doesn't matter.
18 define Build/mkubntimage-split
19 -[ -f $@ ] && ( \
20 dd if=$@ of=$@.old1 bs=1024k count=1; \
21 dd if=$@ of=$@.old2 bs=1024k skip=1; \
22 $(STAGING_DIR_HOST)/bin/mkfwimage -B $(UBNT_BOARD) \
23 -v $(UBNT_TYPE).$(UBNT_CHIP).v$(UBNT_VERSION)-$(UBNT_REVISION) \
24 -k $@.old1 -r $@.old2 -o $@; \
25 rm $@.old1 $@.old2 )
26 endef
27
28 # UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
29 # UBNT_TYPE e.g. one of (BZ, XM, XW)
30 # UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
31 # UBNT_VERSION e.g. one of (6.0.0, 8.5.0)
32 define Device/ubnt
33 DEVICE_VENDOR := Ubiquiti
34 DEVICE_PACKAGES := kmod-usb2
35 IMAGES += factory.bin
36 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
37 append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
38 endef
39
40 define Device/ubnt-bz
41 $(Device/ubnt)
42 SOC := ar7241
43 IMAGE_SIZE := 7448k
44 UBNT_BOARD := XM
45 UBNT_CHIP := ar7240
46 UBNT_TYPE := BZ
47 UBNT_VERSION := 6.0.0
48 endef
49
50 define Device/ubnt-wa
51 $(Device/ubnt)
52 SOC := ar9342
53 IMAGE_SIZE := 15744k
54 UBNT_BOARD := WA
55 UBNT_CHIP := ar934x
56 UBNT_TYPE := WA
57 UBNT_VERSION := 8.5.0
58 endef
59
60 define Device/ubnt-xm
61 $(Device/ubnt)
62 SOC := ar7241
63 DEVICE_VARIANT := XM
64 DEVICE_PACKAGES += kmod-usb-ohci
65 IMAGE_SIZE := 7448k
66 UBNT_BOARD := XM
67 UBNT_CHIP := ar7240
68 UBNT_TYPE := XM
69 UBNT_VERSION := 6.0.0
70 KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
71 endef
72
73 define Device/ubnt-xw
74 $(Device/ubnt)
75 SOC := ar9342
76 DEVICE_VARIANT := XW
77 IMAGE_SIZE := 7552k
78 UBNT_BOARD := XM
79 UBNT_CHIP := ar934x
80 UBNT_REVISION := 42.$(UBNT_REVISION)
81 UBNT_TYPE := XW
82 UBNT_VERSION := 6.0.4
83 endef
84
85 define Device/ubnt_acb-isp
86 $(Device/ubnt)
87 SOC := qca9533
88 DEVICE_MODEL := airCube ISP
89 IMAGE_SIZE := 15744k
90 UBNT_BOARD := ACB-ISP
91 UBNT_CHIP := qca9533
92 UBNT_TYPE := ACB
93 UBNT_VERSION := 6.0.0
94 IMAGES := sysupgrade.bin
95 endef
96 TARGET_DEVICES += ubnt_acb-isp
97
98 define Device/ubnt_airrouter
99 $(Device/ubnt-xm)
100 DEVICE_MODEL := AirRouter
101 SUPPORTED_DEVICES += airrouter
102 endef
103 TARGET_DEVICES += ubnt_airrouter
104
105 define Device/ubnt_bullet-m
106 $(Device/ubnt-xm)
107 DEVICE_MODEL := Bullet-M
108 DEVICE_PACKAGES += rssileds
109 SUPPORTED_DEVICES += bullet-m
110 endef
111 TARGET_DEVICES += ubnt_bullet-m
112
113 define Device/ubnt_bullet-m-xw
114 $(Device/ubnt-xw)
115 DEVICE_MODEL := Bullet-M
116 DEVICE_PACKAGES += rssileds
117 SUPPORTED_DEVICES += bullet-m-xw
118 endef
119 TARGET_DEVICES += ubnt_bullet-m-xw
120
121 define Device/ubnt_lap-120
122 $(Device/ubnt-wa)
123 DEVICE_MODEL := LiteAP ac
124 DEVICE_VARIANT := LAP-120
125 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
126 endef
127 TARGET_DEVICES += ubnt_lap-120
128
129 define Device/ubnt_litebeam-ac-gen2
130 $(Device/ubnt-wa)
131 DEVICE_MODEL := LiteBeam AC
132 DEVICE_VARIANT := Gen2
133 DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
134 endef
135 TARGET_DEVICES += ubnt_litebeam-ac-gen2
136
137 define Device/ubnt_nanobeam-ac
138 $(Device/ubnt-wa)
139 DEVICE_MODEL := NanoBeam AC
140 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
141 endef
142 TARGET_DEVICES += ubnt_nanobeam-ac
143
144 define Device/ubnt_nanostation-ac
145 $(Device/ubnt-wa)
146 DEVICE_MODEL := Nanostation AC
147 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct rssileds
148 endef
149 TARGET_DEVICES += ubnt_nanostation-ac
150
151 define Device/ubnt_nanostation-ac-loco
152 $(Device/ubnt-wa)
153 DEVICE_MODEL := Nanostation AC loco
154 DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
155 endef
156 TARGET_DEVICES += ubnt_nanostation-ac-loco
157
158 define Device/ubnt_nanostation-m
159 $(Device/ubnt-xm)
160 DEVICE_MODEL := Nanostation M
161 DEVICE_PACKAGES += rssileds
162 SUPPORTED_DEVICES += nanostation-m
163 endef
164 TARGET_DEVICES += ubnt_nanostation-m
165
166 define Device/ubnt_nanostation-m-xw
167 $(Device/ubnt-xw)
168 DEVICE_MODEL := Nanostation M
169 DEVICE_PACKAGES += rssileds
170 SUPPORTED_DEVICES += nanostation-m-xw
171 endef
172 TARGET_DEVICES += ubnt_nanostation-m-xw
173
174 define Device/ubnt_rocket-m
175 $(Device/ubnt-xm)
176 DEVICE_MODEL := Rocket-M
177 DEVICE_PACKAGES += rssileds
178 SUPPORTED_DEVICES += rocket-m
179 endef
180 TARGET_DEVICES += ubnt_rocket-m
181
182 define Device/ubnt_routerstation_common
183 DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci \
184 kmod-usb2 fconfig
185 DEVICE_VENDOR := Ubiquiti
186 SOC := ar7161
187 IMAGE_SIZE := 16128k
188 IMAGES := factory.bin
189 IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \
190 check-size $$$$(IMAGE_SIZE)
191 KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
192 KERNEL_INITRAMFS := kernel-bin | append-dtb
193 endef
194
195 define Device/ubnt_routerstation
196 $(Device/ubnt_routerstation_common)
197 DEVICE_MODEL := RouterStation
198 UBNT_BOARD := RS
199 UBNT_TYPE := RSx
200 UBNT_CHIP := ar7100
201 DEVICE_PACKAGES += -swconfig
202 SUPPORTED_DEVICES += routerstation
203 endef
204 TARGET_DEVICES += ubnt_routerstation
205
206 define Device/ubnt_routerstation-pro
207 $(Device/ubnt_routerstation_common)
208 DEVICE_MODEL := RouterStation Pro
209 UBNT_BOARD := RSPRO
210 UBNT_TYPE := RSPRO
211 UBNT_CHIP := ar7100pro
212 SUPPORTED_DEVICES += routerstation-pro
213 endef
214 TARGET_DEVICES += ubnt_routerstation-pro
215
216 define Device/ubnt_unifi
217 $(Device/ubnt-bz)
218 DEVICE_MODEL := UniFi
219 SUPPORTED_DEVICES += unifi
220 endef
221 TARGET_DEVICES += ubnt_unifi
222
223 define Device/ubnt_unifiac
224 DEVICE_VENDOR := Ubiquiti
225 SOC := qca9563
226 IMAGE_SIZE := 7744k
227 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
228 endef
229
230 define Device/ubnt_unifiac-lite
231 $(Device/ubnt_unifiac)
232 DEVICE_MODEL := UniFi AC-Lite
233 SUPPORTED_DEVICES += unifiac-lite
234 endef
235 TARGET_DEVICES += ubnt_unifiac-lite
236
237 define Device/ubnt_unifiac-lr
238 $(Device/ubnt_unifiac)
239 DEVICE_MODEL := UniFi AC-LR
240 SUPPORTED_DEVICES += unifiac-lite ubnt,unifiac-lite
241 endef
242 TARGET_DEVICES += ubnt_unifiac-lr
243
244 define Device/ubnt_unifiac-mesh
245 $(Device/ubnt_unifiac)
246 DEVICE_MODEL := UniFi AC-Mesh
247 SUPPORTED_DEVICES += ubnt-unifiac-mesh
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 += ubnt-unifiac-mesh-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 += ubnt-unifiac-pro
263 endef
264 TARGET_DEVICES += ubnt_unifiac-pro