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