ipq4019: add support for ZTE MF287 Pro aka DreiNeo Pro
[openwrt/openwrt.git] / target / linux / ipq40xx / image / generic.mk
1
2 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
3 DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
4 DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE
5
6 define Device/FitImage
7 KERNEL_SUFFIX := -uImage.itb
8 KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
9 KERNEL_NAME := Image
10 endef
11
12 define Device/FitImageLzma
13 KERNEL_SUFFIX := -uImage.itb
14 KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb
15 KERNEL_NAME := Image
16 endef
17
18 define Device/FitzImage
19 KERNEL_SUFFIX := -zImage.itb
20 KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb
21 KERNEL_NAME := zImage
22 endef
23
24 define Device/UbiFit
25 KERNEL_IN_UBI := 1
26 IMAGES := factory.ubi sysupgrade.bin
27 IMAGE/factory.ubi := append-ubi
28 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
29 endef
30
31 define Device/DniImage
32 $(call Device/FitzImage)
33 NETGEAR_BOARD_ID :=
34 NETGEAR_HW_ID :=
35 IMAGES += factory.img
36 IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni
37 IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
38 append-rootfs | pad-rootfs | check-size | append-metadata
39 endef
40
41 define Build/append-rootfshdr
42 mkimage -A $(LINUX_KARCH) \
43 -O linux -T filesystem \
44 -C lzma -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
45 -n root.squashfs -d $(IMAGE_ROOTFS) $@.new
46 cat $(IMAGE_KERNEL) > $@.$1
47 dd if=$@.new bs=64 count=1 >> $@.$1
48 endef
49
50 define Build/append-rutx-metadata
51 echo \
52 '{ \
53 "device_code": [".*"], \
54 "hwver": [".*"], \
55 "batch": [".*"], \
56 "serial": [".*"], \
57 "supported_devices":["teltonika,rutx"] \
58 }' | fwtool -I - $@
59 endef
60
61 define Build/copy-file
62 cat "$(1)" > "$@"
63 endef
64
65 define Build/mkmylofw_32m
66 $(eval device_id=$(word 1,$(1)))
67 $(eval revision=$(word 2,$(1)))
68
69 let \
70 size="$$(stat -c%s $@)" \
71 pad="$(subst k,* 1024,$(BLOCKSIZE))" \
72 pad="(pad - (size % pad)) % pad" \
73 newsize='size + pad'; \
74 $(STAGING_DIR_HOST)/bin/mkmylofw \
75 -B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \
76 -s 0x2000000 -p0x180000:$$newsize:al:0x80208000:"OpenWrt":$@ \
77 $@.new
78 @mv $@.new $@
79 endef
80
81 define Build/wac5xx-netgear-tar
82 mkdir $@.tmp
83 mv $@ $@.tmp/wac5xx-ubifs-root.img
84 md5sum $@.tmp/wac5xx-ubifs-root.img > $@.tmp/wac5xx-ubifs-root.md5sum
85 echo "WAC505 WAC510" > $@.tmp/metadata.txt
86 echo "WAC505_V9.9.9.9" > $@.tmp/version
87 tar -C $@.tmp/ -cf $@ .
88 rm -rf $@.tmp
89 endef
90
91 define Build/qsdk-ipq-factory-nand-askey
92 $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh $@.its\
93 askey_kernel $@.$1 \
94 askey_fs $(IMAGE_ROOTFS) \
95 ubifs $@
96 PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
97 @mv $@.new $@
98 endef
99
100 define Build/qsdk-ipq-app-gpt
101 cp $@ $@.tmp 2>/dev/null || true
102 ptgen -g -o $@.tmp -a 1 -l 1024 \
103 -t 0x2e -N 0:HLOS -r -p 32M \
104 -t 0x83 -N rootfs -r -p 128M \
105 -N rootfs_data -p 512M
106 cat $@.tmp >> $@
107 rm $@.tmp
108 endef
109
110 define Build/SenaoFW
111 -$(STAGING_DIR_HOST)/bin/mksenaofw \
112 -n $(BOARD_NAME) -r $(VENDOR_ID) -p $(1) \
113 -c $(DATECODE) -w $(2) -x $(CW_VER) -t 0 \
114 -e $@ \
115 -o $@.new
116 @cp $@.new $@
117 endef
118
119 define Build/wrgg-image
120 mkwrggimg -i $@ \
121 -o $@.new \
122 -d "$(WRGG_DEVNAME)" \
123 -s "$(WRGG_SIGNATURE)" \
124 -v "" -m "" -B ""
125 mv $@.new $@
126 endef
127
128 define Device/8dev_habanero-dvk
129 $(call Device/FitImageLzma)
130 DEVICE_VENDOR := 8devices
131 DEVICE_MODEL := Habanero DVK
132 IMAGE_SIZE := 30976k
133 SOC := qcom-ipq4019
134 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata
135 endef
136 TARGET_DEVICES += 8dev_habanero-dvk
137
138 define Device/8dev_jalapeno-common
139 $(call Device/FitImage)
140 $(call Device/UbiFit)
141 BLOCKSIZE := 128k
142 PAGESIZE := 2048
143 SOC := qcom-ipq4018
144 endef
145
146 define Device/8dev_jalapeno
147 $(call Device/8dev_jalapeno-common)
148 DEVICE_VENDOR := 8devices
149 DEVICE_MODEL := Jalapeno
150 endef
151 TARGET_DEVICES += 8dev_jalapeno
152
153 define Device/alfa-network_ap120c-ac
154 $(call Device/FitImage)
155 $(call Device/UbiFit)
156 DEVICE_VENDOR := ALFA Network
157 DEVICE_MODEL := AP120C-AC
158 SOC := qcom-ipq4018
159 DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel
160 BLOCKSIZE := 128k
161 PAGESIZE := 2048
162 IMAGE_SIZE := 65536k
163 IMAGES := factory.bin sysupgrade.bin
164 IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
165 endef
166 TARGET_DEVICES += alfa-network_ap120c-ac
167
168 define Device/aruba_glenmorangie
169 $(call Device/FitImageLzma)
170 DEVICE_VENDOR := Aruba
171 SOC := qcom-ipq4029
172 endef
173
174 define Device/aruba_ap-303
175 $(call Device/aruba_glenmorangie)
176 DEVICE_MODEL := AP-303
177 endef
178 TARGET_DEVICES += aruba_ap-303
179
180 define Device/aruba_ap-303h
181 $(call Device/aruba_glenmorangie)
182 DEVICE_MODEL := AP-303H
183 endef
184 TARGET_DEVICES += aruba_ap-303h
185
186 define Device/aruba_ap-365
187 $(call Device/aruba_glenmorangie)
188 DEVICE_MODEL := AP-365
189 DEVICE_PACKAGES := kmod-hwmon-ad7418
190 endef
191 TARGET_DEVICES += aruba_ap-365
192
193 define Device/asus_map-ac2200
194 $(call Device/FitImageLzma)
195 DEVICE_VENDOR := ASUS
196 DEVICE_MODEL := Lyra (MAP-AC2200)
197 SOC := qcom-ipq4019
198 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-ath3k
199 endef
200 TARGET_DEVICES += asus_map-ac2200
201
202 # WARNING: this is an initramfs image that gets you half of the way there
203 # you need to delete the jffs2 ubi volume and sysupgrade to the final image
204 # to get a "trx" you can flash via web UI for ac42u/ac58u:
205 # - change call Device/FitImageLzma to Device/FitImage
206 # - add the following below UIMAGE_NAME
207 # UIMAGE_MAGIC := 0x27051956
208 # IMAGES += factory.trx
209 # IMAGE/factory.trx := copy-file $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) | uImage none
210 define Device/asus_rt-ac42u
211 $(call Device/FitImageLzma)
212 DEVICE_VENDOR := ASUS
213 DEVICE_MODEL := RT-AC42U
214 DEVICE_ALT0_VENDOR := ASUS
215 DEVICE_ALT0_MODEL := RT-ACRH17
216 DEVICE_ALT1_VENDOR := ASUS
217 DEVICE_ALT1_MODEL := RT-AC2200
218 SOC := qcom-ipq4019
219 BLOCKSIZE := 128k
220 PAGESIZE := 2048
221 IMAGE_SIZE := 20439364
222 FILESYSTEMS := squashfs
223 # RT-AC82U is nowhere to be found online
224 # Rather, this device is a/k/a RT-AC42U
225 # But we'll go with what the vendor firmware has...
226 UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC82U')
227 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct kmod-usb-ledtrig-usbport
228 endef
229 TARGET_DEVICES += asus_rt-ac42u
230
231 define Device/asus_rt-ac58u
232 $(call Device/FitImageLzma)
233 DEVICE_VENDOR := ASUS
234 DEVICE_MODEL := RT-AC58U
235 DEVICE_ALT0_VENDOR := ASUS
236 DEVICE_ALT0_MODEL := RT-ACRH13
237 SOC := qcom-ipq4018
238 BLOCKSIZE := 128k
239 PAGESIZE := 2048
240 IMAGE_SIZE := 20439364
241 FILESYSTEMS := squashfs
242 # Someone - in their infinite wisdom - decided to put the firmware
243 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
244 # Since u-boot works with strings we either need another fixup step
245 # to add a version... or we are very careful not to add '\0' into that
246 # string and call it a day.... Yeah, we do the latter!
247 UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
248 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
249 kmod-usb-ledtrig-usbport
250 endef
251 TARGET_DEVICES += asus_rt-ac58u
252
253 define Device/avm_fritzbox-4040
254 $(call Device/FitImageLzma)
255 DEVICE_VENDOR := AVM
256 DEVICE_MODEL := FRITZ!Box 4040
257 SOC := qcom-ipq4018
258 BOARD_NAME := fritz4040
259 IMAGE_SIZE := 29056k
260 UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-fritz4040.bin
261 UBOOT_PARTITION_SIZE := 524288
262 IMAGES += eva.bin
263 IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs
264 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
265 DEVICE_PACKAGES := fritz-tffs fritz-caldata
266 endef
267 TARGET_DEVICES += avm_fritzbox-4040
268
269 define Device/avm_fritzbox-7530
270 $(call Device/FitImageLzma)
271 DEVICE_VENDOR := AVM
272 DEVICE_MODEL := FRITZ!Box 7530
273 DEVICE_ALT0_VENDOR := AVM
274 DEVICE_ALT0_MODEL := FRITZ!Box 7520
275 SOC := qcom-ipq4019
276 DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ltq-vdsl-vr11-app
277 endef
278 TARGET_DEVICES += avm_fritzbox-7530
279
280 define Device/avm_fritzrepeater-1200
281 $(call Device/FitImageLzma)
282 DEVICE_VENDOR := AVM
283 DEVICE_MODEL := FRITZ!Repeater 1200
284 SOC := qcom-ipq4019
285 DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand
286 endef
287 TARGET_DEVICES += avm_fritzrepeater-1200
288
289 define Device/avm_fritzrepeater-3000
290 $(call Device/FitImageLzma)
291 DEVICE_VENDOR := AVM
292 DEVICE_MODEL := FRITZ!Repeater 3000
293 SOC := qcom-ipq4019
294 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
295 endef
296 TARGET_DEVICES += avm_fritzrepeater-3000
297
298 define Device/buffalo_wtr-m2133hp
299 $(call Device/FitImage)
300 $(call Device/UbiFit)
301 DEVICE_VENDOR := Buffalo
302 DEVICE_MODEL := WTR-M2133HP
303 SOC := qcom-ipq4019
304 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
305 BLOCKSIZE := 128k
306 PAGESIZE := 2048
307 endef
308 TARGET_DEVICES += buffalo_wtr-m2133hp
309
310 define Device/cellc_rtl30vw
311 KERNEL_SUFFIX := -zImage.itb
312 KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb
313 KERNEL = kernel-bin | fit none $$(KDIR)/image-$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
314 KERNEL_NAME := zImage
315 KERNEL_IN_UBI :=
316 IMAGES := factory.bin sysupgrade.bin
317 IMAGE/factory.bin := append-rootfshdr kernel | append-ubi | qsdk-ipq-factory-nand-askey kernel
318 IMAGE/sysupgrade.bin := append-rootfshdr kernel | sysupgrade-tar kernel=$$$$@.kernel | append-metadata
319 DEVICE_VENDOR := Cell C
320 DEVICE_MODEL := RTL30VW
321 SOC := qcom-ipq4019
322 DEVICE_DTS_CONFIG := config@5
323 KERNEL_INSTALL := 1
324 KERNEL_SIZE := 4096k
325 IMAGE_SIZE := 57344k
326 BLOCKSIZE := 128k
327 PAGESIZE := 2048
328 DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
329 endef
330 TARGET_DEVICES += cellc_rtl30vw
331
332 define Device/cilab_meshpoint-one
333 $(call Device/8dev_jalapeno-common)
334 DEVICE_VENDOR := Crisis Innovation Lab
335 DEVICE_MODEL := MeshPoint.One
336 DEVICE_PACKAGES += kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
337 endef
338 # Missing DSA Setup
339 #TARGET_DEVICES += cilab_meshpoint-one
340
341 define Device/compex_wpj419
342 $(call Device/FitImage)
343 $(call Device/UbiFit)
344 DEVICE_VENDOR := Compex
345 DEVICE_MODEL := WPJ419
346 SOC := qcom-ipq4019
347 DEVICE_DTS_CONFIG := config@12
348 KERNEL_INSTALL := 1
349 BLOCKSIZE := 128k
350 PAGESIZE := 2048
351 FILESYSTEMS := squashfs
352 endef
353 # Missing DSA Setup
354 #TARGET_DEVICES += compex_wpj419
355
356 define Device/compex_wpj428
357 $(call Device/FitImage)
358 DEVICE_VENDOR := Compex
359 DEVICE_MODEL := WPJ428
360 SOC := qcom-ipq4028
361 DEVICE_DTS_CONFIG := config@4
362 BLOCKSIZE := 64k
363 IMAGE_SIZE := 31232k
364 KERNEL_SIZE := 4096k
365 IMAGES += cpximg-6a04.bin
366 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
367 IMAGE/cpximg-6a04.bin := append-kernel | append-rootfs | pad-rootfs | mkmylofw_32m 0x8A2 3
368 DEVICE_PACKAGES := kmod-gpio-beeper
369 DEFAULT := n
370 endef
371 TARGET_DEVICES += compex_wpj428
372
373 define Device/devolo_magic-2-wifi-next
374 $(call Device/FitImage)
375 DEVICE_VENDOR := devolo
376 DEVICE_MODEL := Magic 2 WiFi next
377 SOC := qcom-ipq4018
378 KERNEL_SIZE := 4096k
379
380 # If the bootloader sees 0xDEADC0DE and this trailer at the 64k boundary of a TFTP image
381 # it will bootm it, just like we want for the initramfs.
382 KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to 64k |\
383 append-string -e '\xDE\xAD\xC0\xDE{"fl_initramfs":""}\x00'
384
385 IMAGE_SIZE := 26624k
386 IMAGES := sysupgrade.bin
387 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
388 DEFAULT := n
389 endef
390 # Missing DSA Setup
391 #TARGET_DEVICES += devolo_magic-2-wifi-next
392
393 define Device/dlink_dap-2610
394 $(call Device/FitImageLzma)
395 DEVICE_VENDOR := D-Link
396 DEVICE_MODEL := DAP-2610
397 SOC := qcom-ipq4018
398 DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
399 BLOCKSIZE := 64k
400 WRGG_DEVNAME := /dev/mtdblock/8
401 WRGG_SIGNATURE := wapac30_dkbs_dap2610
402 IMAGE_SIZE := 14080k
403 IMAGES += factory.bin
404 # Bootloader expects a special 160 byte header which is added by
405 # wrgg-image.
406 # Factory image size must be larger than 6MB, and size in wrgg header must
407 # match actual factory image size to be flashable from D-Link http server.
408 # Bootloader verifies checksum of wrgg image before booting, thus jffs2
409 # cannot be part of the wrgg image. This is solved in the factory image by
410 # having the rootfs at the end of the image (without pad-rootfs). And in
411 # the sysupgrade image only the kernel is included in the wrgg checksum,
412 # but this is not flashable from the D-link http server.
413 # append-rootfs must start on an erase block boundary.
414 IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size
415 IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
416 endef
417 TARGET_DEVICES += dlink_dap-2610
418
419 define Device/edgecore_ecw5211
420 $(call Device/FitImage)
421 $(call Device/UbiFit)
422 DEVICE_VENDOR := Edgecore
423 DEVICE_MODEL := ECW5211
424 SOC := qcom-ipq4018
425 BLOCKSIZE := 128k
426 PAGESIZE := 2048
427 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
428 DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm
429 endef
430 TARGET_DEVICES += edgecore_ecw5211
431
432 define Device/edgecore_oap100
433 $(call Device/FitImage)
434 $(call Device/UbiFit)
435 DEVICE_VENDOR := Edgecore
436 DEVICE_MODEL := OAP100
437 SOC := qcom-ipq4019
438 BLOCKSIZE := 128k
439 PAGESIZE := 2048
440 IMAGES := sysupgrade.bin
441 DEVICE_DTS_CONFIG := config@ap.dk07.1-c1
442 DEVICE_PACKAGES := kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi
443 endef
444 # Missing DSA Setup
445 #TARGET_DEVICES += edgecore_oap100
446
447 define Device/engenius_eap1300
448 $(call Device/FitImage)
449 DEVICE_VENDOR := EnGenius
450 DEVICE_MODEL := EAP1300
451 DEVICE_DTS_CONFIG := config@4
452 BOARD_NAME := eap1300
453 SOC := qcom-ipq4018
454 KERNEL_SIZE := 5120k
455 IMAGE_SIZE := 25344k
456 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
457 endef
458 # Missing DSA Setup
459 #TARGET_DEVICES += engenius_eap1300
460
461 define Device/engenius_eap2200
462 $(call Device/FitImage)
463 $(call Device/UbiFit)
464 DEVICE_VENDOR := EnGenius
465 DEVICE_MODEL := EAP2200
466 SOC := qcom-ipq4019
467 BLOCKSIZE := 128k
468 PAGESIZE := 2048
469 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
470 endef
471 # Missing DSA Setup
472 #TARGET_DEVICES += engenius_eap2200
473
474 define Device/engenius_emd1
475 $(call Device/FitImage)
476 DEVICE_VENDOR := EnGenius
477 DEVICE_MODEL := EMD1
478 DEVICE_DTS_CONFIG := config@4
479 SOC := qcom-ipq4018
480 IMAGE_SIZE := 30720k
481 IMAGES += factory.bin
482 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
483 IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
484 endef
485 # Missing DSA Setup
486 #TARGET_DEVICES += engenius_emd1
487
488 define Device/engenius_emr3500
489 $(call Device/FitImage)
490 DEVICE_VENDOR := EnGenius
491 DEVICE_MODEL := EMR3500
492 DEVICE_DTS_CONFIG := config@4
493 SOC := qcom-ipq4018
494 KERNEL_SIZE := 4096k
495 IMAGE_SIZE := 30720k
496 IMAGES += factory.bin
497 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
498 IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
499 DEFAULT := n
500 endef
501 # Missing DSA Setup
502 #TARGET_DEVICES += engenius_emr3500
503
504 define Device/engenius_ens620ext
505 $(call Device/FitImage)
506 DEVICE_VENDOR := EnGenius
507 DEVICE_MODEL := ENS620EXT
508 SOC := qcom-ipq4018
509 DEVICE_DTS_CONFIG := config@4
510 BLOCKSIZE := 64k
511 PAGESIZE := 256
512 BOARD_NAME := ENS620EXT
513 VENDOR_ID := 0x0101
514 PRODUCT_ID := 0x79
515 PRODUCT_ID_NEW := 0xA4
516 DATECODE := 190507
517 FW_VER := 3.1.2
518 FW_VER_NEW := 3.5.6
519 CW_VER := 1.8.99
520 IMAGE_SIZE := 21312k
521 KERNEL_SIZE := 5120k
522 FILESYSTEMS := squashfs
523 IMAGES += factory_30.bin factory_35.bin
524 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
525 IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER)
526 IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW)
527 endef
528 # Missing DSA Setup
529 #TARGET_DEVICES += engenius_ens620ext
530
531 define Device/extreme-networks_ws-ap3915i
532 $(call Device/FitImage)
533 DEVICE_VENDOR := Extreme Networks
534 DEVICE_MODEL := WS-AP3915i
535 IMAGE_SIZE := 30080k
536 SOC := qcom-ipq4029
537 BLOCKSIZE := 128k
538 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
539 endef
540 TARGET_DEVICES += extreme-networks_ws-ap3915i
541
542 define Device/ezviz_cs-w3-wd1200g-eup
543 $(call Device/FitImage)
544 DEVICE_VENDOR := EZVIZ
545 DEVICE_MODEL := CS-W3-WD1200G
546 DEVICE_VARIANT := EUP
547 IMAGE_SIZE := 14848k
548 KERNEL_SIZE = 6m
549 SOC := qcom-ipq4018
550 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
551 append-metadata
552 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
553 DEVICE_COMPAT_VERSION := 2.0
554 DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated (see wiki). \
555 Upgrade via sysupgrade mechanism is not possible.
556 endef
557 TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
558
559 define Device/glinet_gl-a1300
560 $(call Device/FitImage)
561 $(call Device/UbiFit)
562 DEVICE_VENDOR := GL.iNet
563 DEVICE_MODEL := GL-A1300
564 SOC := qcom-ipq4018
565 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
566 BLOCKSIZE := 128k
567 PAGESIZE := 2048
568 IMAGE_SIZE := 131072k
569 endef
570 TARGET_DEVICES += glinet_gl-a1300
571
572 define Device/glinet_gl-ap1300
573 $(call Device/FitImage)
574 $(call Device/UbiFit)
575 DEVICE_VENDOR := GL.iNet
576 DEVICE_MODEL := GL-AP1300
577 SOC := qcom-ipq4018
578 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
579 BLOCKSIZE := 128k
580 PAGESIZE := 2048
581 IMAGE_SIZE := 131072k
582 KERNEL_INSTALL := 1
583 DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
584 endef
585 TARGET_DEVICES += glinet_gl-ap1300
586
587 define Device/glinet_gl-b1300
588 $(call Device/FitzImage)
589 DEVICE_VENDOR := GL.iNet
590 DEVICE_MODEL := GL-B1300
591 BOARD_NAME := gl-b1300
592 SOC := qcom-ipq4029
593 KERNEL_SIZE := 4096k
594 IMAGE_SIZE := 26624k
595 IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
596 endef
597 TARGET_DEVICES += glinet_gl-b1300
598
599 define Device/glinet_gl-b2200
600 $(call Device/FitzImage)
601 DEVICE_VENDOR := GL.iNet
602 DEVICE_MODEL := GL-B2200
603 SOC := qcom-ipq4019
604 DEVICE_DTS_CONFIG := config@ap.dk04.1-c3
605 KERNEL_INITRAMFS_SUFFIX := -recovery.itb
606 IMAGES := emmc.img.gz sysupgrade.bin
607 IMAGE/emmc.img.gz := qsdk-ipq-app-gpt |\
608 pad-to 1024k | append-kernel |\
609 pad-to 33792k | append-rootfs |\
610 append-metadata | gzip
611 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
612 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct \
613 kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs
614 endef
615 TARGET_DEVICES += glinet_gl-b2200
616
617 define Device/glinet_gl-s1300
618 $(call Device/FitzImage)
619 DEVICE_VENDOR := GL.iNet
620 DEVICE_MODEL := GL-S1300
621 SOC := qcom-ipq4029
622 KERNEL_SIZE := 4096k
623 IMAGE_SIZE := 26624k
624 IMAGES := sysupgrade.bin
625 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
626 DEVICE_PACKAGES := kmod-fs-ext4 kmod-mmc kmod-spi-dev
627 endef
628 # Missing DSA Setup
629 #TARGET_DEVICES += glinet_gl-s1300
630
631 define Device/kernel-size-6350-8300
632 DEVICE_COMPAT_VERSION := 2.0
633 DEVICE_COMPAT_MESSAGE := Kernel partition size must be increased for \
634 this OpenWrt version. Before continuing, you MUST issue either the \
635 command "fw_setenv kernsize 500000" from the OpenWrt command line, \
636 or "setenv kernsize 500000 ; saveenv" from the U-Boot serial console. \
637 Instead of the sysupgrade image, you must then install the OpenWrt \
638 factory image, setting the force flag and wiping the configuration. \
639 (e.g. "sysupgrade -n -F openwrt-squashfs-factory.bin" on command line)
640 endef
641
642 define Device/linksys_ea6350v3
643 # The Linksys EA6350v3 has a uboot bootloader that does not
644 # support either booting lzma kernel images nor booting UBI
645 # partitions. This uboot, however, supports raw kernel images and
646 # gzipped images.
647 #
648 # As configured by the OEM factory, the device will boot the kernel
649 # from a fixed address with a fixed length of 3 MiB. Also, the
650 # device has a hard-coded kernel command line that requires the
651 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
652 # Oh... and the kernel partition overlaps with the rootfs
653 # partition (the same for alt_kernel and alt_rootfs).
654 #
655 # If you are planing re-partitioning the device, you may want to
656 # keep these details in mind:
657 # 1. The kernel addresses you should honor are 0x00000000 and
658 # 0x02800000 respectively.
659 # 2. The kernel size (plus the dtb) cannot exceed 3 MiB in size
660 # unless the uboot environment variable "kernsize" is increased.
661 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
662 # 4. The kernel command line from uboot is harcoded to boot with
663 # rootfs either in mtd11 or mtd13.
664 $(call Device/FitzImage)
665 $(call Device/kernel-size-6350-8300)
666 DEVICE_VENDOR := Linksys
667 DEVICE_MODEL := EA6350
668 DEVICE_VARIANT := v3
669 SOC := qcom-ipq4018
670 BLOCKSIZE := 128k
671 PAGESIZE := 2048
672 KERNEL_SIZE := 5120k
673 IMAGE_SIZE := 35840k
674 UBINIZE_OPTS := -E 5
675 IMAGES += factory.bin
676 IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
677 endef
678 TARGET_DEVICES += linksys_ea6350v3
679
680 define Device/linksys_ea8300
681 $(call Device/FitzImage)
682 $(call Device/kernel-size-6350-8300)
683 DEVICE_VENDOR := Linksys
684 DEVICE_MODEL := EA8300
685 SOC := qcom-ipq4019
686 KERNEL_SIZE := 5120k
687 IMAGE_SIZE := 84992k
688 BLOCKSIZE := 128k
689 PAGESIZE := 2048
690 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
691 IMAGES += factory.bin
692 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
693 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
694 endef
695 TARGET_DEVICES += linksys_ea8300
696
697 define Device/linksys_mr8300
698 $(call Device/FitzImage)
699 $(call Device/kernel-size-6350-8300)
700 DEVICE_VENDOR := Linksys
701 DEVICE_MODEL := MR8300
702 SOC := qcom-ipq4019
703 KERNEL_SIZE := 5120k
704 IMAGE_SIZE := 84992k
705 BLOCKSIZE := 128k
706 PAGESIZE := 2048
707 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
708 IMAGES += factory.bin
709 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
710 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-usb-ledtrig-usbport
711 endef
712 TARGET_DEVICES += linksys_mr8300
713
714 define Device/linksys_whw03v2
715 $(call Device/FitzImage)
716 DEVICE_VENDOR := Linksys
717 DEVICE_MODEL := WHW03
718 DEVICE_VARIANT := V2
719 SOC := qcom-ipq4019
720 KERNEL_SIZE := 6144k
721 IMAGE_SIZE := 158720k
722 BLOCKSIZE := 128k
723 PAGESIZE := 2048
724 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
725 IMAGES += factory.bin
726 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW03v2
727 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-bluetooth
728 endef
729 TARGET_DEVICES += linksys_whw03v2
730
731 define Device/linksys_whw01
732 $(call Device/FitzImage)
733 DEVICE_VENDOR := Linksys
734 DEVICE_MODEL := WHW01
735 KERNEL_SIZE := 6144k
736 IMAGE_SIZE := 75776K
737 SOC := qcom-ipq4018
738 BLOCKSIZE := 128k
739 PAGESIZE := 2048
740 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
741 IMAGES += factory.bin
742 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW01
743 DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
744 endef
745 TARGET_DEVICES += linksys_whw01
746
747 define Device/luma_wrtq-329acn
748 $(call Device/FitImage)
749 DEVICE_VENDOR := Luma Home
750 DEVICE_MODEL := WRTQ-329ACN
751 SOC := qcom-ipq4018
752 DEVICE_PACKAGES := kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
753 IMAGE_SIZE := 76632k
754 BLOCKSIZE := 128k
755 PAGESIZE := 2048
756 endef
757 TARGET_DEVICES += luma_wrtq-329acn
758
759 define Device/meraki_common
760 $(call Device/FitImage)
761 DEVICE_VENDOR := Cisco Meraki
762 SOC := qcom-ipq4029
763 BLOCKSIZE := 128k
764 PAGESIZE := 2048
765 DEVICE_DTS_LOADADDR := 0x89000000
766 DEVICE_PACKAGES := ath10k-firmware-qca9887-ct
767 endef
768
769 define Device/meraki_mr33
770 $(call Device/meraki_common)
771 DEVICE_MODEL := MR33
772 endef
773 TARGET_DEVICES += meraki_mr33
774
775 define Device/meraki_mr74
776 $(call Device/meraki_common)
777 DEVICE_MODEL := MR74
778 DEVICE_DTS_CONFIG := config@3
779 endef
780 TARGET_DEVICES += meraki_mr74
781
782 define Device/mobipromo_cm520-79f
783 $(call Device/FitzImage)
784 $(call Device/UbiFit)
785 DEVICE_VENDOR := MobiPromo
786 DEVICE_MODEL := CM520-79F
787 SOC := qcom-ipq4019
788 BLOCKSIZE := 128k
789 PAGESIZE := 2048
790 DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
791 endef
792 TARGET_DEVICES += mobipromo_cm520-79f
793
794 define Device/netgear_ex61x0v2
795 $(call Device/DniImage)
796 DEVICE_VENDOR := NETGEAR
797 DEVICE_DTS_CONFIG := config@4
798 NETGEAR_BOARD_ID := EX6150v2series
799 NETGEAR_HW_ID := 29765285+16+0+128+2x2
800 IMAGE_SIZE := 14400k
801 SOC := qcom-ipq4018
802 endef
803
804 define Device/netgear_ex6100v2
805 $(call Device/netgear_ex61x0v2)
806 DEVICE_MODEL := EX6100
807 DEVICE_VARIANT := v2
808 endef
809 TARGET_DEVICES += netgear_ex6100v2
810
811 define Device/netgear_ex6150v2
812 $(call Device/netgear_ex61x0v2)
813 DEVICE_MODEL := EX6150
814 DEVICE_VARIANT := v2
815 endef
816 TARGET_DEVICES += netgear_ex6150v2
817
818 define Device/netgear_orbi
819 $(call Device/DniImage)
820 SOC := qcom-ipq4019
821 DEVICE_VENDOR := NETGEAR
822 IMAGE/factory.img := append-kernel | pad-offset 128k 64 | \
823 append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
824 append-rootfs | pad-rootfs | netgear-dni
825 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | \
826 sysupgrade-tar rootfs=$$$$@ | append-metadata
827 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
828 endef
829
830 define Device/netgear_rbx50
831 $(call Device/netgear_orbi)
832 NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4
833 KERNEL_SIZE := 3932160
834 ROOTFS_SIZE := 32243712
835 IMAGE_SIZE := 36175872
836 endef
837
838 define Device/netgear_rbr50
839 $(call Device/netgear_rbx50)
840 DEVICE_MODEL := RBR50
841 DEVICE_VARIANT := v1
842 NETGEAR_BOARD_ID := RBR50
843 endef
844 TARGET_DEVICES += netgear_rbr50
845
846 define Device/netgear_rbs50
847 $(call Device/netgear_rbx50)
848 DEVICE_MODEL := RBS50
849 DEVICE_VARIANT := v1
850 NETGEAR_BOARD_ID := RBS50
851 endef
852 TARGET_DEVICES += netgear_rbs50
853
854 define Device/netgear_srx60
855 $(call Device/netgear_orbi)
856 NETGEAR_HW_ID := 29765352+0+4096+512+2x2+2x2+4x4
857 KERNEL_SIZE := 3932160
858 ROOTFS_SIZE := 32243712
859 IMAGE_SIZE := 36175872
860 endef
861
862 define Device/netgear_srr60
863 $(call Device/netgear_srx60)
864 DEVICE_MODEL := SRR60
865 NETGEAR_BOARD_ID := SRR60
866 endef
867 TARGET_DEVICES += netgear_srr60
868
869 define Device/netgear_srs60
870 $(call Device/netgear_srx60)
871 DEVICE_MODEL := SRS60
872 NETGEAR_BOARD_ID := SRS60
873 endef
874 TARGET_DEVICES += netgear_srs60
875
876 define Device/netgear_wac510
877 $(call Device/FitImage)
878 $(call Device/UbiFit)
879 DEVICE_VENDOR := Netgear
880 DEVICE_MODEL := WAC510
881 SOC := qcom-ipq4018
882 DEVICE_DTS_CONFIG := config@5
883 BLOCKSIZE := 128k
884 PAGESIZE := 2048
885 IMAGES += factory.tar
886 IMAGE/factory.tar := append-ubi | wac5xx-netgear-tar
887 DEVICE_PACKAGES := uboot-envtools
888 endef
889 TARGET_DEVICES += netgear_wac510
890
891 define Device/openmesh_a42
892 $(call Device/FitImageLzma)
893 DEVICE_VENDOR := OpenMesh
894 DEVICE_MODEL := A42
895 SOC := qcom-ipq4018
896 DEVICE_DTS_CONFIG := config@om.a42
897 BLOCKSIZE := 64k
898 KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
899 IMAGE_SIZE := 15616k
900 IMAGES += factory.bin
901 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
902 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
903 endef
904 TARGET_DEVICES += openmesh_a42
905
906 define Device/openmesh_a62
907 $(call Device/FitImageLzma)
908 DEVICE_VENDOR := OpenMesh
909 DEVICE_MODEL := A62
910 SOC := qcom-ipq4019
911 DEVICE_DTS_CONFIG := config@om.a62
912 BLOCKSIZE := 64k
913 KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
914 IMAGE_SIZE := 15552k
915 IMAGES += factory.bin
916 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
917 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
918 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
919 endef
920 TARGET_DEVICES += openmesh_a62
921
922 define Device/p2w_r619ac
923 $(call Device/FitzImage)
924 $(call Device/UbiFit)
925 DEVICE_VENDOR := P&W
926 DEVICE_MODEL := R619AC
927 SOC := qcom-ipq4019
928 DEVICE_DTS_CONFIG := config@10
929 BLOCKSIZE := 128k
930 PAGESIZE := 2048
931 endef
932
933 define Device/p2w_r619ac-64m
934 $(call Device/p2w_r619ac)
935 DEVICE_VARIANT := 64M NAND
936 IMAGES += factory.bin
937 IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
938 endef
939 TARGET_DEVICES += p2w_r619ac-64m
940
941 define Device/p2w_r619ac-128m
942 $(call Device/p2w_r619ac)
943 DEVICE_VARIANT := 128M NAND
944 endef
945 TARGET_DEVICES += p2w_r619ac-128m
946
947 define Device/pakedge_wr-1
948 $(call Device/FitImageLzma)
949 DEVICE_VENDOR := Pakedge
950 DEVICE_MODEL := WR-1
951 DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
952 SOC := qcom-ipq4018
953 BLOCKSIZE := 64k
954 IMAGE_SIZE := 31232k
955 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata
956 endef
957 TARGET_DEVICES += pakedge_wr-1
958
959 define Device/plasmacloud_pa1200
960 $(call Device/FitImageLzma)
961 DEVICE_VENDOR := Plasma Cloud
962 DEVICE_MODEL := PA1200
963 SOC := qcom-ipq4018
964 DEVICE_DTS_CONFIG := config@pc.pa1200
965 BLOCKSIZE := 64k
966 KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
967 IMAGE_SIZE := 15616k
968 IMAGES += factory.bin
969 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
970 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
971 endef
972 TARGET_DEVICES += plasmacloud_pa1200
973
974 define Device/plasmacloud_pa2200
975 $(call Device/FitImageLzma)
976 DEVICE_VENDOR := Plasma Cloud
977 DEVICE_MODEL := PA2200
978 SOC := qcom-ipq4019
979 DEVICE_DTS_CONFIG := config@pc.pa2200
980 BLOCKSIZE := 64k
981 KERNEL = kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
982 IMAGE_SIZE := 15552k
983 IMAGES += factory.bin
984 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
985 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
986 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
987 endef
988 TARGET_DEVICES += plasmacloud_pa2200
989
990 define Device/qxwlan_e2600ac-c1
991 $(call Device/FitImage)
992 DEVICE_VENDOR := Qxwlan
993 DEVICE_MODEL := E2600AC
994 DEVICE_VARIANT := C1
995 BOARD_NAME := e2600ac-c1
996 SOC := qcom-ipq4019
997 IMAGE_SIZE := 31232k
998 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
999 endef
1000 TARGET_DEVICES += qxwlan_e2600ac-c1
1001
1002 define Device/qxwlan_e2600ac-c2
1003 $(call Device/FitImage)
1004 $(call Device/UbiFit)
1005 DEVICE_VENDOR := Qxwlan
1006 DEVICE_MODEL := E2600AC
1007 DEVICE_VARIANT := C2
1008 SOC := qcom-ipq4019
1009 KERNEL_INSTALL := 1
1010 BLOCKSIZE := 128k
1011 PAGESIZE := 2048
1012 endef
1013 TARGET_DEVICES += qxwlan_e2600ac-c2
1014
1015 define Device/sony_ncp-hg100-cellular
1016 $(call Device/FitImage)
1017 DEVICE_VENDOR := Sony
1018 DEVICE_MODEL := NCP-HG100/Cellular
1019 DEVICE_DTS_CONFIG := config@ap.dk04.1-c4
1020 SOC := qcom-ipq4019
1021 KERNEL_SIZE := 8192k
1022 IMAGE_SIZE := 128m
1023 DEVICE_PACKAGES := e2fsprogs kmod-fs-ext4 uqmi
1024 endef
1025 TARGET_DEVICES += sony_ncp-hg100-cellular
1026
1027 define Device/teltonika_rutx10
1028 $(call Device/FitImage)
1029 $(call Device/UbiFit)
1030 DEVICE_VENDOR := Teltonika
1031 DEVICE_MODEL := RUTX10
1032 SOC := qcom-ipq4018
1033 DEVICE_DTS_CONFIG := config@5
1034 KERNEL_INSTALL := 1
1035 BLOCKSIZE := 128k
1036 PAGESIZE := 2048
1037 FILESYSTEMS := squashfs
1038 IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
1039 DEVICE_PACKAGES := kmod-bluetooth
1040 endef
1041 # Missing DSA Setup
1042 #TARGET_DEVICES += teltonika_rutx10
1043
1044 define Device/teltonika_rutx50
1045 $(call Device/FitImage)
1046 $(call Device/UbiFit)
1047 DEVICE_VENDOR := Teltonika
1048 DEVICE_MODEL := RUTX50
1049 SOC := qcom-ipq4018
1050 DEVICE_DTS_CONFIG := config@5
1051 KERNEL_INSTALL := 1
1052 BLOCKSIZE := 128k
1053 PAGESIZE := 2048
1054 FILESYSTEMS := squashfs
1055 IMAGE/factory.ubi := append-ubi
1056 DEVICE_PACKAGES := ipq-wifi-teltonika_rutx kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
1057 endef
1058 TARGET_DEVICES += teltonika_rutx50
1059
1060 define Device/tel_x1pro
1061 $(call Device/FitImage)
1062 DEVICE_VENDOR := Telco
1063 DEVICE_MODEL := X1 Pro
1064 SOC := qcom-ipq4019
1065 KERNEL_SIZE := 4096k
1066 IMAGE_SIZE := 31232k
1067 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
1068 DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
1069 DEFAULT := n
1070 endef
1071 # Missing DSA Setup
1072 #TARGET_DEVICES += tel_x1pro
1073
1074 define Device/unielec_u4019-32m
1075 $(call Device/FitImage)
1076 DEVICE_VENDOR := Unielec
1077 DEVICE_MODEL := U4019
1078 DEVICE_VARIANT := 32M
1079 BOARD_NAME := u4019-32m
1080 SOC := qcom-ipq4019
1081 KERNEL_SIZE := 4096k
1082 IMAGE_SIZE := 31232k
1083 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
1084 DEFAULT := n
1085 endef
1086 # Missing DSA Setup
1087 #TARGET_DEVICES += unielec_u4019-32m
1088
1089 define Device/wallys_dr40x9
1090 $(call Device/FitImage)
1091 $(call Device/UbiFit)
1092 DEVICE_VENDOR := Wallys
1093 DEVICE_MODEL := DR40X9
1094 SOC := qcom-ipq40x9
1095 DEVICE_DTS_CONFIG := config@ap.dk07.1-c1
1096 BLOCKSIZE := 128k
1097 PAGESIZE := 2048
1098 DEVICE_PACKAGES := ipq-wifi-wallys_dr40x9
1099 endef
1100 TARGET_DEVICES += wallys_dr40x9
1101
1102 define Device/zte_mf18a
1103 $(call Device/FitImage)
1104 DEVICE_VENDOR := ZTE
1105 DEVICE_MODEL := MF18A
1106 SOC := qcom-ipq4019
1107 DEVICE_DTS_CONFIG := config@ap.dk04.1-c1
1108 BLOCKSIZE := 128k
1109 PAGESIZE := 2048
1110 KERNEL_IN_UBI := 1
1111 DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct
1112 endef
1113 TARGET_DEVICES += zte_mf18a
1114
1115 define Device/zte_mf28x_common
1116 $(call Device/FitzImage)
1117 DEVICE_VENDOR := ZTE
1118 SOC := qcom-ipq4019
1119 DEVICE_DTS_CONFIG := config@ap.dk04.1-c1
1120 BLOCKSIZE := 128k
1121 PAGESIZE := 2048
1122 KERNEL_IN_UBI := 1
1123 DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
1124 endef
1125
1126 define Device/zte_mf286d
1127 $(call Device/zte_mf28x_common)
1128 DEVICE_MODEL := MF286D
1129 endef
1130 TARGET_DEVICES += zte_mf286d
1131
1132 define Device/zte_mf287_common
1133 $(call Device/zte_mf28x_common)
1134 DEVICE_PACKAGES += ipq-wifi-zte_mf287plus
1135 SOC := qcom-ipq4018
1136 # The recovery image is used to return back to stock (an initramfs-based image
1137 # that can be flashed to the device via sysupgrade
1138 # The factory image is used to install from the stock firmware by using an
1139 # exploit for the web interface
1140 IMAGES += factory.bin recovery.bin
1141 IMAGE/factory.bin := append-ubi
1142 IMAGE/recovery.bin := append-squashfs4-fakeroot | sysupgrade-tar kernel=$$$$(BIN_DIR)/openwrt-$$(BOARD)$$(if $$(SUBTARGET),-$$(SUBTARGET))-$$(DEVICE_NAME)-initramfs-zImage.itb rootfs=$$$$@ | append-metadata
1143 endef
1144
1145 define Device/zte_mf287plus
1146 $(call Device/zte_mf287_common)
1147 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
1148 DEVICE_MODEL := MF287Plus
1149 DEVICE_ALT0_VENDOR := ZTE
1150 DEVICE_ALT0_MODEL := MF287
1151 endef
1152 TARGET_DEVICES += zte_mf287plus
1153
1154 define Device/zte_mf287pro
1155 $(call Device/zte_mf287_common)
1156 DEVICE_DTS_CONFIG := config@ap.dk04.1-c1
1157 DEVICE_MODEL := MF287Pro
1158 endef
1159 TARGET_DEVICES += zte_mf287pro
1160
1161 define Device/zte_mf289f
1162 $(call Device/zte_mf28x_common)
1163 DEVICE_MODEL := MF289F
1164 DEVICE_PACKAGES += ipq-wifi-zte_mf289f ath10k-firmware-qca9984-ct
1165 endef
1166 TARGET_DEVICES += zte_mf289f
1167
1168 define Device/zyxel_nbg6617
1169 $(call Device/FitImageLzma)
1170 DEVICE_VENDOR := ZyXEL
1171 DEVICE_MODEL := NBG6617
1172 SOC := qcom-ipq4018
1173 KERNEL_SIZE := 4096k
1174 ROOTFS_SIZE := 24960k
1175 RAS_BOARD := NBG6617
1176 RAS_ROOTFS_SIZE := 19840k
1177 RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
1178 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
1179 IMAGES += factory.bin
1180 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
1181 # at least as large as the one of the initial firmware image (not the current
1182 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
1183 # this minimum-size. However, the larger image can be flashed both ways.
1184 IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
1185 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
1186 DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
1187 endef
1188 TARGET_DEVICES += zyxel_nbg6617
1189
1190 define Device/zyxel_wre6606
1191 $(call Device/FitImage)
1192 DEVICE_VENDOR := ZyXEL
1193 DEVICE_MODEL := WRE6606
1194 DEVICE_DTS_CONFIG := config@4
1195 SOC := qcom-ipq4018
1196 IMAGE_SIZE := 13184k
1197 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
1198 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
1199 endef
1200 # Missing DSA Setup
1201 #TARGET_DEVICES += zyxel_wre6606