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