ipq806x: use new package name for NEC WG2600HP3
[openwrt/openwrt.git] / target / linux / ipq806x / image / generic.mk
1 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
2 DEVICE_VARS += TPLINK_BOARD_ID
3
4 define Device/kernel-size-migration
5 DEVICE_COMPAT_VERSION := 2.0
6 DEVICE_COMPAT_MESSAGE := *** Kernel partition size has changed from earlier \
7 versions. You need to sysupgrade with the OpenWrt factory image and \
8 use the force flag when image check fails. Settings will be lost. ***
9 endef
10
11 define Build/buffalo-rootfs-cksum
12 ( \
13 echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \
14 $(STAGING_DIR_HOST)/bin/awk '{s+=$$0}END{printf "%x", 255-s%256}')"; \
15 ) >> $@
16 endef
17
18 define Build/edimax-header
19 $(eval edimax_model=$(word 1,$(1)))
20
21 $(STAGING_DIR_HOST)/bin/mkedimaximg \
22 -b -s CSYS -m $(edimax_model) \
23 -f 0x70000 -S 0x1200000 \
24 -i $@ -o $@.new
25 @mv $@.new $@
26 endef
27
28 define Device/DniImage
29 KERNEL_SUFFIX := -uImage
30 KERNEL = kernel-bin | append-dtb | uImage none
31 KERNEL_NAME := zImage
32 NETGEAR_BOARD_ID :=
33 NETGEAR_HW_ID :=
34 UBINIZE_OPTS := -E 5
35 IMAGES += factory.img
36 IMAGE/factory.img := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
37 append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
38 append-ubi | netgear-dni
39 IMAGE/sysupgrade.bin := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
40 append-uImage-fakehdr filesystem | sysupgrade-tar kernel=$$$$@ | \
41 append-metadata
42 endef
43
44 define Device/TpSafeImage
45 KERNEL_SUFFIX := -uImage
46 KERNEL = kernel-bin | append-dtb | uImage none
47 KERNEL_NAME := zImage
48 TPLINK_BOARD_ID :=
49 IMAGES += factory.bin
50 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
51 IMAGE/sysupgrade.bin := append-rootfs | \
52 tplink-safeloader sysupgrade | append-metadata
53 endef
54
55 define Device/ZyXELImage
56 KERNEL_SUFFIX := -uImage
57 KERNEL = kernel-bin | append-dtb | uImage none | \
58 pad-to $$(KERNEL_SIZE)
59 KERNEL_NAME := zImage
60 IMAGES += factory.bin
61 IMAGE/factory.bin := append-rootfs | pad-rootfs | \
62 pad-to $$$$(BLOCKSIZE) | zyxel-ras-image separate-kernel
63 IMAGE/sysupgrade.bin/squashfs := append-rootfs | \
64 pad-to $$$$(BLOCKSIZE) | sysupgrade-tar rootfs=$$$$@ | \
65 append-metadata
66 endef
67
68 define Device/arris_tr4400-v2
69 $(call Device/LegacyImage)
70 DEVICE_VENDOR := Arris
71 DEVICE_MODEL := TR4400
72 DEVICE_VARIANT := v2
73 SOC := qcom-ipq8065
74 BLOCKSIZE := 128k
75 PAGESIZE := 2048
76 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ath10k-firmware-qca99x0-ct
77 KERNEL_IN_UBI := 1
78 endef
79 TARGET_DEVICES += arris_tr4400-v2
80
81 define Device/askey_rt4230w-rev6
82 $(call Device/LegacyImage)
83 DEVICE_VENDOR := Askey
84 DEVICE_MODEL := RT4230W
85 DEVICE_VARIANT := REV6
86 SOC := qcom-ipq8065
87 BLOCKSIZE := 128k
88 PAGESIZE := 2048
89 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
90 KERNEL_IN_UBI := 1
91 endef
92 TARGET_DEVICES += askey_rt4230w-rev6
93
94 define Device/asrock_g10
95 $(call Device/FitImage)
96 $(call Device/UbiFit)
97 SOC := qcom-ipq8064
98 DEVICE_VENDOR := ASRock
99 DEVICE_MODEL := G10
100 BLOCKSIZE := 128k
101 PAGESIZE := 2048
102 KERNEL_SIZE := 5332k
103 DEVICE_PACKAGES := kmod-i2c-gpio ath10k-firmware-qca99x0-ct
104 IMAGE/nand-factory.bin := append-ubi | edimax-header RN67
105 endef
106 TARGET_DEVICES += asrock_g10
107
108 define Device/buffalo_wxr-2533dhp
109 $(call Device/LegacyImage)
110 SOC := qcom-ipq8064
111 DEVICE_VENDOR := Buffalo
112 DEVICE_MODEL := WXR-2533DHP
113 BLOCKSIZE := 128k
114 PAGESIZE := 2048
115 IMAGE_SIZE := 65536k
116 KERNEL_IN_UBI := 1
117 IMAGE/sysupgrade.bin := append-rootfs | buffalo-rootfs-cksum | \
118 sysupgrade-tar rootfs=$$$$@ | append-metadata
119 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
120 endef
121 TARGET_DEVICES += buffalo_wxr-2533dhp
122
123 define Device/compex_wpq864
124 $(call Device/FitImage)
125 $(call Device/UbiFit)
126 DEVICE_VENDOR := Compex
127 DEVICE_MODEL := WPQ864
128 BLOCKSIZE := 128k
129 PAGESIZE := 2048
130 SOC := qcom-ipq8064
131 DEVICE_PACKAGES := kmod-gpio-beeper
132 endef
133 TARGET_DEVICES += compex_wpq864
134
135 define Device/edgecore_ecw5410
136 $(call Device/FitImage)
137 $(call Device/UbiFit)
138 DEVICE_VENDOR := Edgecore
139 DEVICE_MODEL := ECW5410
140 SOC := qcom-ipq8068
141 BLOCKSIZE := 128k
142 PAGESIZE := 2048
143 DEVICE_DTS_CONFIG := config@v2.0-ap160
144 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
145 endef
146 TARGET_DEVICES += edgecore_ecw5410
147
148 define Device/linksys_ea7500-v1
149 $(call Device/LegacyImage)
150 $(Device/kernel-size-migration)
151 DEVICE_VENDOR := Linksys
152 DEVICE_MODEL := EA7500
153 DEVICE_VARIANT := v1
154 SOC := qcom-ipq8064
155 PAGESIZE := 2048
156 BLOCKSIZE := 128k
157 KERNEL_SIZE := 4096k
158 KERNEL = kernel-bin | append-dtb | uImage none | \
159 append-uImage-fakehdr filesystem
160 UBINIZE_OPTS := -E 5
161 IMAGES := factory.bin sysupgrade.bin
162 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
163 append-ubi | pad-to $$$$(PAGESIZE)
164 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
165 endef
166 TARGET_DEVICES += linksys_ea7500-v1
167
168 define Device/linksys_ea8500
169 $(call Device/LegacyImage)
170 $(Device/kernel-size-migration)
171 DEVICE_VENDOR := Linksys
172 DEVICE_MODEL := EA8500
173 SOC := qcom-ipq8064
174 PAGESIZE := 2048
175 BLOCKSIZE := 128k
176 KERNEL_SIZE := 4096k
177 KERNEL = kernel-bin | append-dtb | uImage none | \
178 append-uImage-fakehdr filesystem
179 BOARD_NAME := ea8500
180 SUPPORTED_DEVICES += ea8500
181 UBINIZE_OPTS := -E 5
182 IMAGES += factory.bin
183 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
184 append-ubi
185 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
186 endef
187 TARGET_DEVICES += linksys_ea8500
188
189 define Device/meraki_mr42
190 $(call Device/FitImage)
191 DEVICE_VENDOR := Cisco Meraki
192 DEVICE_MODEL := MR42
193 SOC := qcom-ipq8068
194 BLOCKSIZE := 128k
195 PAGESIZE := 2048
196 KERNEL_LOADADDR = 0x44208000
197 DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
198 -kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
199 -kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
200 -uboot-envtools ath10k-firmware-qca9887-ct \
201 ath10k-firmware-qca99x0-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
202 kmod-leds-tlc591xx
203 endef
204 TARGET_DEVICES += meraki_mr42
205
206 define Device/meraki_mr52
207 $(call Device/FitImage)
208 DEVICE_VENDOR := Cisco Meraki
209 DEVICE_MODEL := MR52
210 SOC := qcom-ipq8068
211 BLOCKSIZE := 128k
212 PAGESIZE := 2048
213 KERNEL_LOADADDR = 0x44208000
214 DEVICE_DTS_CONFIG := config@2
215 DEVICE_PACKAGES := -swconfig -kmod-ata-ahci -kmod-ata-ahci-platform \
216 -kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
217 -kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
218 -uboot-envtools ath10k-firmware-qca9887-ct \
219 ath10k-firmware-qca9984-ct kmod-eeprom-at24 kmod-hwmon-ina2xx \
220 kmod-leds-tlc591xx
221 endef
222 TARGET_DEVICES += meraki_mr52
223
224 define Device/nec_wg2600hp
225 $(call Device/LegacyImage)
226 DEVICE_VENDOR := NEC
227 DEVICE_MODEL := Aterm WG2600HP
228 SOC := qcom-ipq8064
229 BLOCKSIZE := 64k
230 BOARD_NAME := wg2600hp
231 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
232 pad-rootfs | append-metadata
233 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
234 endef
235 TARGET_DEVICES += nec_wg2600hp
236
237 define Device/nec_wg2600hp3
238 $(call Device/LegacyImage)
239 DEVICE_VENDOR := NEC Platforms
240 DEVICE_MODEL := Aterm WG2600HP3
241 SOC := qcom-ipq8062
242 BLOCKSIZE := 64k
243 IMAGES := sysupgrade.bin
244 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
245 pad-rootfs | append-metadata
246 DEVICE_PACKAGES := -kmod-ata-ahci -kmod-ata-ahci-platform \
247 -kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
248 -kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
249 ath10k-firmware-qca9984-ct
250 endef
251 TARGET_DEVICES += nec_wg2600hp3
252
253 define Device/netgear_d7800
254 $(call Device/DniImage)
255 DEVICE_VENDOR := NETGEAR
256 DEVICE_MODEL := Nighthawk X4 D7800
257 SOC := qcom-ipq8064
258 KERNEL_SIZE := 4096k
259 NETGEAR_BOARD_ID := D7800
260 NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4
261 BLOCKSIZE := 128k
262 PAGESIZE := 2048
263 BOARD_NAME := d7800
264 SUPPORTED_DEVICES += d7800
265 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
266 DEVICE_COMPAT_VERSION := 2.0
267 DEVICE_COMPAT_MESSAGE := Sysupgrade does not work due to rootfs ubi partition size change. \
268 Use factory image with the TFTP recovery flash routine.
269 endef
270 TARGET_DEVICES += netgear_d7800
271
272 define Device/netgear_r7500
273 $(call Device/DniImage)
274 DEVICE_VENDOR := NETGEAR
275 DEVICE_MODEL := Nighthawk X4 R7500
276 DEVICE_VARIANT := v1
277 SOC := qcom-ipq8064
278 KERNEL_SIZE := 4096k
279 NETGEAR_BOARD_ID := R7500
280 NETGEAR_HW_ID := 29764841+0+128+256+3x3+4x4
281 BLOCKSIZE := 128k
282 PAGESIZE := 2048
283 BOARD_NAME := r7500
284 SUPPORTED_DEVICES += r7500
285 DEVICE_PACKAGES := ath10k-firmware-qca988x-ct
286 endef
287 TARGET_DEVICES += netgear_r7500
288
289 define Device/netgear_r7500v2
290 $(call Device/DniImage)
291 DEVICE_VENDOR := NETGEAR
292 DEVICE_MODEL := Nighthawk X4 R7500
293 DEVICE_VARIANT := v2
294 SOC := qcom-ipq8064
295 KERNEL_SIZE := 4096k
296 NETGEAR_BOARD_ID := R7500v2
297 NETGEAR_HW_ID := 29764958+0+128+512+3x3+4x4
298 BLOCKSIZE := 128k
299 PAGESIZE := 2048
300 BOARD_NAME := r7500v2
301 SUPPORTED_DEVICES += r7500v2
302 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct \
303 ath10k-firmware-qca988x-ct
304 endef
305 TARGET_DEVICES += netgear_r7500v2
306
307 define Device/netgear_r7800
308 $(call Device/DniImage)
309 DEVICE_VENDOR := NETGEAR
310 DEVICE_MODEL := Nighthawk X4S R7800
311 SOC := qcom-ipq8065
312 KERNEL_SIZE := 4096k
313 NETGEAR_BOARD_ID := R7800
314 NETGEAR_HW_ID := 29764958+0+128+512+4x4+4x4+cascade
315 BLOCKSIZE := 128k
316 PAGESIZE := 2048
317 BOARD_NAME := r7800
318 SUPPORTED_DEVICES += r7800
319 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct kmod-ramoops
320 endef
321 TARGET_DEVICES += netgear_r7800
322
323 define Device/netgear_xr450
324 $(call Device/DniImage)
325 DEVICE_VENDOR := NETGEAR
326 DEVICE_MODEL := Nighthawk XR450
327 SOC := qcom-ipq8065
328 KERNEL_SIZE := 4096k
329 NETGEAR_BOARD_ID := XR450
330 NETGEAR_HW_ID := 29764958+0+256+512+4x4+4x4+cascade
331 BLOCKSIZE := 128k
332 PAGESIZE := 2048
333 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct kmod-ramoops
334 endef
335 TARGET_DEVICES += netgear_xr450
336
337 define Device/netgear_xr500
338 $(call Device/DniImage)
339 DEVICE_VENDOR := NETGEAR
340 DEVICE_MODEL := Nighthawk XR500
341 SOC := qcom-ipq8065
342 KERNEL_SIZE := 4096k
343 NETGEAR_BOARD_ID := XR500
344 NETGEAR_HW_ID := 29764958+0+256+512+4x4+4x4+cascade
345 BLOCKSIZE := 128k
346 PAGESIZE := 2048
347 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct kmod-ramoops
348 endef
349 TARGET_DEVICES += netgear_xr500
350
351 define Device/nokia_ac400i
352 $(call Device/FitImage)
353 $(call Device/UbiFit)
354 DEVICE_VENDOR := Nokia
355 DEVICE_MODEL := AC400i
356 SOC := qcom-ipq8065
357 DEVICE_DTS := qcom-ipq8065-ac400i
358 BLOCKSIZE := 128k
359 PAGESIZE := 2048
360 BOARD_NAME := ac400i
361 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
362 endef
363 TARGET_DEVICES += nokia_ac400i
364
365 define Device/qcom_ipq8064-ap148
366 $(call Device/FitImage)
367 $(call Device/UbiFit)
368 DEVICE_VENDOR := Qualcomm
369 DEVICE_MODEL := AP148
370 DEVICE_VARIANT := standard
371 SOC := qcom-ipq8064
372 DEVICE_DTS := qcom-ipq8064-ap148
373 KERNEL_INSTALL := 1
374 BLOCKSIZE := 128k
375 PAGESIZE := 2048
376 BOARD_NAME := ap148
377 SUPPORTED_DEVICES += ap148
378 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
379 endef
380 TARGET_DEVICES += qcom_ipq8064-ap148
381
382 define Device/qcom_ipq8064-ap148-legacy
383 $(call Device/LegacyImage)
384 $(call Device/UbiFit)
385 DEVICE_VENDOR := Qualcomm
386 DEVICE_MODEL := AP148
387 DEVICE_VARIANT := legacy
388 SOC := qcom-ipq8064
389 DEVICE_DTS := qcom-ipq8064-ap148
390 BLOCKSIZE := 128k
391 PAGESIZE := 2048
392 BOARD_NAME := ap148
393 SUPPORTED_DEVICES := qcom,ipq8064-ap148 ap148
394 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
395 endef
396 TARGET_DEVICES += qcom_ipq8064-ap148-legacy
397
398 define Device/qcom_ipq8064-ap161
399 $(call Device/FitImage)
400 $(call Device/UbiFit)
401 DEVICE_VENDOR := Qualcomm
402 DEVICE_MODEL := AP161
403 SOC := qcom-ipq8064
404 DEVICE_DTS := qcom-ipq8064-ap161
405 KERNEL_INSTALL := 1
406 BLOCKSIZE := 128k
407 PAGESIZE := 2048
408 BOARD_NAME := ap161
409 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
410 endef
411 TARGET_DEVICES += qcom_ipq8064-ap161
412
413 define Device/qcom_ipq8064-db149
414 $(call Device/FitImage)
415 DEVICE_VENDOR := Qualcomm
416 DEVICE_MODEL := DB149
417 SOC := qcom-ipq8064
418 DEVICE_DTS := qcom-ipq8064-db149
419 KERNEL_INSTALL := 1
420 BOARD_NAME := db149
421 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
422 endef
423 TARGET_DEVICES += qcom_ipq8064-db149
424
425 define Device/tplink_ad7200
426 $(call Device/TpSafeImage)
427 DEVICE_VENDOR := TP-Link
428 DEVICE_MODEL := AD7200
429 DEVICE_VARIANT := v1/v2
430 DEVICE_ALT0_VENDOR := TP-Link
431 DEVICE_ALT0_MODEL := Talon AD7200
432 DEVICE_ALT0_VARIANT := v1/v2
433 SOC := qcom-ipq8064
434 BLOCKSIZE := 128k
435 PAGESIZE := 2048
436 TPLINK_BOARD_ID := AD7200
437 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-ramoops kmod-wil6210
438 endef
439 TARGET_DEVICES += tplink_ad7200
440
441 define Device/tplink_c2600
442 $(call Device/TpSafeImage)
443 DEVICE_VENDOR := TP-Link
444 DEVICE_MODEL := Archer C2600
445 DEVICE_VARIANT := v1
446 SOC := qcom-ipq8064
447 BLOCKSIZE := 128k
448 PAGESIZE := 2048
449 BOARD_NAME := c2600
450 SUPPORTED_DEVICES += c2600
451 TPLINK_BOARD_ID := C2600
452 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct kmod-ramoops
453 endef
454 TARGET_DEVICES += tplink_c2600
455
456 define Device/tplink_vr2600v
457 DEVICE_VENDOR := TP-Link
458 DEVICE_MODEL := Archer VR2600v
459 DEVICE_VARIANT := v1
460 KERNEL_SUFFIX := -uImage
461 KERNEL = kernel-bin | append-dtb | uImage none
462 KERNEL_NAME := zImage
463 IMAGE_SIZE := 12672k
464 SOC := qcom-ipq8064
465 BLOCKSIZE := 128k
466 PAGESIZE := 2048
467 BOARD_NAME := vr2600v
468 SUPPORTED_DEVICES += vr2600v
469 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
470 IMAGE/sysupgrade.bin := pad-extra 512 | append-kernel | \
471 append-rootfs | pad-rootfs | append-metadata
472 endef
473 TARGET_DEVICES += tplink_vr2600v
474
475 define Device/ubnt_unifi-ac-hd
476 $(call Device/FitImageLzma)
477 DEVICE_VENDOR := Ubiquiti
478 DEVICE_MODEL := UniFi AC HD
479 SOC := qcom-ipq8064
480 BLOCKSIZE := 64k
481 IMAGE_SIZE := 14784k
482 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
483 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
484 append-rootfs | pad-rootfs | check-size | append-metadata
485 endef
486 TARGET_DEVICES += ubnt_unifi-ac-hd
487
488 define Device/zyxel_nbg6817
489 DEVICE_VENDOR := ZyXEL
490 DEVICE_MODEL := NBG6817
491 SOC := qcom-ipq8065
492 KERNEL_SIZE := 4096k
493 BLOCKSIZE := 64k
494 BOARD_NAME := nbg6817
495 RAS_BOARD := NBG6817
496 RAS_ROOTFS_SIZE := 20934k
497 RAS_VERSION := "V1.99(OWRT.9999)C0"
498 SUPPORTED_DEVICES += nbg6817
499 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs \
500 kmod-fs-ext4 losetup
501 $(call Device/ZyXELImage)
502 endef
503 TARGET_DEVICES += zyxel_nbg6817