ipq40xx: unbreak EZVIZ CS-W3-WD1200G EUP on 5.10
[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 := -fit-uImage.itb
8 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
9 KERNEL_NAME := Image
10 endef
11
12 define Device/FitImageLzma
13 KERNEL_SUFFIX := -fit-uImage.itb
14 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
15 KERNEL_NAME := Image
16 endef
17
18 define Device/FitzImage
19 KERNEL_SUFFIX := -fit-zImage.itb
20 KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb
21 KERNEL_NAME := zImage
22 endef
23
24 define Device/UbiFit
25 KERNEL_IN_UBI := 1
26 IMAGES := nand-factory.ubi nand-sysupgrade.bin
27 IMAGE/nand-factory.ubi := append-ubi
28 IMAGE/nand-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 dd if=$@.new bs=64 count=1 >> $(IMAGE_KERNEL)
47 endef
48
49 define Build/append-rutx-metadata
50 echo \
51 '{ \
52 "device_code": [".*"], \
53 "hwver": [".*"], \
54 "batch": [".*"], \
55 "serial": [".*"], \
56 "supported_devices":["teltonika,rutx"] \
57 }' | fwtool -I - $@
58 endef
59
60 define Build/mkmylofw_32m
61 $(eval device_id=$(word 1,$(1)))
62 $(eval revision=$(word 2,$(1)))
63
64 let \
65 size="$$(stat -c%s $@)" \
66 pad="$(subst k,* 1024,$(BLOCKSIZE))" \
67 pad="(pad - (size % pad)) % pad" \
68 newsize='size + pad'; \
69 $(STAGING_DIR_HOST)/bin/mkmylofw \
70 -B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \
71 -s 0x2000000 -p0x180000:$$newsize:al:0x80208000:"OpenWrt":$@ \
72 $@.new
73 @mv $@.new $@
74 endef
75
76 define Build/wac5xx-netgear-tar
77 mkdir $@.tmp
78 mv $@ $@.tmp/wac5xx-ubifs-root.img
79 md5sum $@.tmp/wac5xx-ubifs-root.img > $@.tmp/wac5xx-ubifs-root.md5sum
80 echo "WAC505 WAC510" > $@.tmp/metadata.txt
81 echo "WAC505_V9.9.9.9" > $@.tmp/version
82 tar -C $@.tmp/ -cf $@ .
83 rm -rf $@.tmp
84 endef
85
86 define Build/qsdk-ipq-factory-nand-askey
87 $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh $@.its\
88 askey_kernel $(IMAGE_KERNEL) \
89 askey_fs $(IMAGE_ROOTFS) \
90 ubifs $@
91 PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
92 @mv $@.new $@
93 endef
94
95 define Build/qsdk-ipq-app-gpt
96 cp $@ $@.tmp 2>/dev/null || true
97 ptgen -g -o $@.tmp -a 1 -l 1024 \
98 -t 0x2e -N 0:HLOS -r -p 32M \
99 -t 0x83 -N rootfs -r -p 128M \
100 -N rootfs_data -p 512M
101 cat $@.tmp >> $@
102 rm $@.tmp
103 endef
104
105 define Build/SenaoFW
106 -$(STAGING_DIR_HOST)/bin/mksenaofw \
107 -n $(BOARD_NAME) -r $(VENDOR_ID) -p $(1) \
108 -c $(DATECODE) -w $(2) -x $(CW_VER) -t 0 \
109 -e $@ \
110 -o $@.new
111 @cp $@.new $@
112 endef
113
114 define Build/wrgg-image
115 mkwrggimg -i $@ \
116 -o $@.new \
117 -d "$(WRGG_DEVNAME)" \
118 -s "$(WRGG_SIGNATURE)" \
119 -v "" -m "" -B ""
120 mv $@.new $@
121 endef
122
123 define Device/8dev_habanero-dvk
124 $(call Device/FitImageLzma)
125 DEVICE_VENDOR := 8devices
126 DEVICE_MODEL := Habanero DVK
127 IMAGE_SIZE := 30976k
128 SOC := qcom-ipq4019
129 DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk
130 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata
131 endef
132 TARGET_DEVICES += 8dev_habanero-dvk
133
134 define Device/8dev_jalapeno-common
135 $(call Device/FitImage)
136 $(call Device/UbiFit)
137 BLOCKSIZE := 128k
138 PAGESIZE := 2048
139 SOC := qcom-ipq4018
140 endef
141
142 define Device/8dev_jalapeno
143 $(call Device/8dev_jalapeno-common)
144 DEVICE_VENDOR := 8devices
145 DEVICE_MODEL := Jalapeno
146 endef
147 TARGET_DEVICES += 8dev_jalapeno
148
149 define Device/alfa-network_ap120c-ac
150 $(call Device/FitImage)
151 $(call Device/UbiFit)
152 DEVICE_VENDOR := ALFA Network
153 DEVICE_MODEL := AP120C-AC
154 SOC := qcom-ipq4018
155 DEVICE_PACKAGES := kmod-usb-acm kmod-tpm-i2c-atmel
156 BLOCKSIZE := 128k
157 PAGESIZE := 2048
158 IMAGE_SIZE := 65536k
159 IMAGES := nand-factory.bin nand-sysupgrade.bin
160 IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
161 endef
162 TARGET_DEVICES += alfa-network_ap120c-ac
163
164 define Device/aruba_glenmorangie
165 $(call Device/FitImageLzma)
166 DEVICE_VENDOR := Aruba
167 SOC := qcom-ipq4029
168 DEVICE_PACKAGES := ipq-wifi-aruba_ap-303
169 endef
170
171 define Device/aruba_ap-303
172 $(call Device/aruba_glenmorangie)
173 DEVICE_MODEL := AP-303
174 endef
175 TARGET_DEVICES += aruba_ap-303
176
177 define Device/aruba_ap-303h
178 $(call Device/aruba_glenmorangie)
179 DEVICE_MODEL := AP-303H
180 endef
181 TARGET_DEVICES += aruba_ap-303h
182
183 define Device/aruba_ap-365
184 $(call Device/aruba_glenmorangie)
185 DEVICE_MODEL := AP-365
186 DEVICE_PACKAGES += kmod-hwmon-ad7418
187 endef
188 TARGET_DEVICES += aruba_ap-365
189
190 define Device/asus_map-ac2200
191 $(call Device/FitImageLzma)
192 DEVICE_VENDOR := ASUS
193 DEVICE_MODEL := Lyra (MAP-AC2200)
194 SOC := qcom-ipq4019
195 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-ath3k
196 endef
197 TARGET_DEVICES += asus_map-ac2200
198
199 define Device/asus_rt-ac58u
200 $(call Device/FitImageLzma)
201 DEVICE_VENDOR := ASUS
202 DEVICE_MODEL := RT-AC58U
203 SOC := qcom-ipq4018
204 BLOCKSIZE := 128k
205 PAGESIZE := 2048
206 DTB_SIZE := 65536
207 IMAGE_SIZE := 20439364
208 FILESYSTEMS := squashfs
209 # Someone - in their infinite wisdom - decided to put the firmware
210 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
211 # Since u-boot works with strings we either need another fixup step
212 # to add a version... or we are very careful not to add '\0' into that
213 # string and call it a day.... Yeah, we do the latter!
214 UIMAGE_NAME:=$(shell echo -e '\03\01\01\01RT-AC58U')
215 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
216 kmod-usb-ledtrig-usbport
217 endef
218 TARGET_DEVICES += asus_rt-ac58u
219
220 define Device/avm_fritzbox-4040
221 $(call Device/FitImageLzma)
222 DEVICE_VENDOR := AVM
223 DEVICE_MODEL := FRITZ!Box 4040
224 SOC := qcom-ipq4018
225 BOARD_NAME := fritz4040
226 IMAGE_SIZE := 29056k
227 UBOOT_PATH := $(STAGING_DIR_IMAGE)/uboot-fritz4040.bin
228 UBOOT_PARTITION_SIZE := 524288
229 IMAGES += eva.bin
230 IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs
231 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
232 DEVICE_PACKAGES := fritz-tffs fritz-caldata
233 endef
234 TARGET_DEVICES += avm_fritzbox-4040
235
236 define Device/avm_fritzbox-7530
237 $(call Device/FitImageLzma)
238 DEVICE_VENDOR := AVM
239 DEVICE_MODEL := FRITZ!Box 7530
240 SOC := qcom-ipq4019
241 DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand
242 endef
243 TARGET_DEVICES += avm_fritzbox-7530
244
245 define Device/avm_fritzrepeater-1200
246 $(call Device/FitImageLzma)
247 DEVICE_VENDOR := AVM
248 DEVICE_MODEL := FRITZ!Repeater 1200
249 SOC := qcom-ipq4019
250 DEVICE_PACKAGES := fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
251 endef
252 TARGET_DEVICES += avm_fritzrepeater-1200
253
254 define Device/avm_fritzrepeater-3000
255 $(call Device/FitImageLzma)
256 DEVICE_VENDOR := AVM
257 DEVICE_MODEL := FRITZ!Repeater 3000
258 SOC := qcom-ipq4019
259 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
260 endef
261 TARGET_DEVICES += avm_fritzrepeater-3000
262
263 define Device/buffalo_wtr-m2133hp
264 $(call Device/FitImage)
265 $(call Device/UbiFit)
266 DEVICE_VENDOR := Buffalo
267 DEVICE_MODEL := WTR-M2133HP
268 SOC := qcom-ipq4019
269 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-buffalo_wtr-m2133hp
270 BLOCKSIZE := 128k
271 PAGESIZE := 2048
272 endef
273 TARGET_DEVICES += buffalo_wtr-m2133hp
274
275 define Device/cellc_rtl30vw
276 KERNEL_SUFFIX := -fit-zImage.itb
277 KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
278 KERNEL = kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | uImage lzma | pad-to 2048
279 KERNEL_NAME := zImage
280 KERNEL_IN_UBI :=
281 IMAGES := nand-factory.bin nand-sysupgrade.bin
282 IMAGE/nand-factory.bin := append-rootfshdr | append-ubi | qsdk-ipq-factory-nand-askey
283 IMAGE/nand-sysupgrade.bin := append-rootfshdr | sysupgrade-tar | append-metadata
284 DEVICE_VENDOR := Cell C
285 DEVICE_MODEL := RTL30VW
286 SOC := qcom-ipq4019
287 DEVICE_DTS_CONFIG := config@5
288 KERNEL_INSTALL := 1
289 KERNEL_SIZE := 4096k
290 IMAGE_SIZE := 57344k
291 BLOCKSIZE := 128k
292 PAGESIZE := 2048
293 DEVICE_PACKAGES := kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi ipq-wifi-cellc_rtl30vw
294 endef
295 TARGET_DEVICES += cellc_rtl30vw
296
297 define Device/cilab_meshpoint-one
298 $(call Device/8dev_jalapeno-common)
299 DEVICE_VENDOR := Crisis Innovation Lab
300 DEVICE_MODEL := MeshPoint.One
301 DEVICE_PACKAGES := kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
302 endef
303 TARGET_DEVICES += cilab_meshpoint-one
304
305 define Device/compex_wpj419
306 $(call Device/FitImage)
307 $(call Device/UbiFit)
308 DEVICE_VENDOR := Compex
309 DEVICE_MODEL := WPJ419
310 SOC := qcom-ipq4019
311 DEVICE_DTS_CONFIG := config@12
312 KERNEL_INSTALL := 1
313 BLOCKSIZE := 128k
314 PAGESIZE := 2048
315 FILESYSTEMS := squashfs
316 endef
317 TARGET_DEVICES += compex_wpj419
318
319 define Device/compex_wpj428
320 $(call Device/FitImage)
321 DEVICE_VENDOR := Compex
322 DEVICE_MODEL := WPJ428
323 SOC := qcom-ipq4028
324 DEVICE_DTS_CONFIG := config@4
325 BLOCKSIZE := 64k
326 IMAGE_SIZE := 31232k
327 KERNEL_SIZE := 4096k
328 IMAGES += cpximg-6a04.bin
329 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
330 IMAGE/cpximg-6a04.bin := append-kernel | append-rootfs | pad-rootfs | mkmylofw_32m 0x8A2 3
331 DEVICE_PACKAGES := kmod-gpio-beeper
332 DEFAULT := n
333 endef
334 TARGET_DEVICES += compex_wpj428
335
336 define Device/devolo_magic-2-wifi-next
337 $(call Device/FitImage)
338 DEVICE_VENDOR := devolo
339 DEVICE_MODEL := Magic 2 WiFi next
340 SOC := qcom-ipq4018
341 KERNEL_SIZE := 4096k
342
343 # If the bootloader sees 0xDEADC0DE and this trailer at the 64k boundary of a TFTP image
344 # it will bootm it, just like we want for the initramfs.
345 KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to 64k |\
346 append-string -e '\xDE\xAD\xC0\xDE{"fl_initramfs":""}\x00'
347
348 IMAGE_SIZE := 26624k
349 IMAGES := sysupgrade.bin
350 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
351 DEVICE_PACKAGES := ipq-wifi-devolo_magic-2-wifi-next
352 DEFAULT := n
353 endef
354 TARGET_DEVICES += devolo_magic-2-wifi-next
355
356 define Device/dlink_dap-2610
357 $(call Device/FitImageLzma)
358 DEVICE_VENDOR := D-Link
359 DEVICE_MODEL := DAP-2610
360 SOC := qcom-ipq4018
361 DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
362 BLOCKSIZE := 64k
363 WRGG_DEVNAME := /dev/mtdblock/8
364 WRGG_SIGNATURE := wapac30_dkbs_dap2610
365 IMAGE_SIZE := 14080k
366 IMAGES += factory.bin
367 # Bootloader expects a special 160 byte header which is added by
368 # wrgg-image.
369 # Factory image size must be larger than 6MB, and size in wrgg header must
370 # match actual factory image size to be flashable from D-Link http server.
371 # Bootloader verifies checksum of wrgg image before booting, thus jffs2
372 # cannot be part of the wrgg image. This is solved in the factory image by
373 # having the rootfs at the end of the image (without pad-rootfs). And in
374 # the sysupgrade image only the kernel is included in the wrgg checksum,
375 # but this is not flashable from the D-link http server.
376 # append-rootfs must start on an erase block boundary.
377 IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size
378 IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
379 DEVICE_PACKAGES := ipq-wifi-dlink_dap2610
380 endef
381 TARGET_DEVICES += dlink_dap-2610
382
383 define Device/edgecore_ecw5211
384 $(call Device/FitImage)
385 $(call Device/UbiFit)
386 DEVICE_VENDOR := Edgecore
387 DEVICE_MODEL := ECW5211
388 SOC := qcom-ipq4018
389 BLOCKSIZE := 128k
390 PAGESIZE := 2048
391 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
392 DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm
393 endef
394 TARGET_DEVICES += edgecore_ecw5211
395
396 define Device/edgecore_oap100
397 $(call Device/FitImage)
398 $(call Device/UbiFit)
399 DEVICE_VENDOR := Edgecore
400 DEVICE_MODEL := OAP100
401 SOC := qcom-ipq4019
402 BLOCKSIZE := 128k
403 PAGESIZE := 2048
404 IMAGES := nand-sysupgrade.bin
405 DEVICE_DTS_CONFIG := config@ap.dk07.1-c1
406 DEVICE_PACKAGES := ipq-wifi-edgecore_oap100 kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi
407 endef
408 TARGET_DEVICES += edgecore_oap100
409
410 define Device/engenius_eap1300
411 $(call Device/FitImage)
412 DEVICE_VENDOR := EnGenius
413 DEVICE_MODEL := EAP1300
414 DEVICE_DTS_CONFIG := config@4
415 BOARD_NAME := eap1300
416 SOC := qcom-ipq4018
417 KERNEL_SIZE := 5120k
418 IMAGE_SIZE := 25344k
419 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
420 endef
421 TARGET_DEVICES += engenius_eap1300
422
423 define Device/engenius_eap2200
424 $(call Device/FitImage)
425 $(call Device/UbiFit)
426 DEVICE_VENDOR := EnGenius
427 DEVICE_MODEL := EAP2200
428 SOC := qcom-ipq4019
429 BLOCKSIZE := 128k
430 PAGESIZE := 2048
431 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-engenius_eap2200 -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
432 endef
433 TARGET_DEVICES += engenius_eap2200
434
435 define Device/engenius_emd1
436 $(call Device/FitImage)
437 DEVICE_VENDOR := EnGenius
438 DEVICE_MODEL := EMD1
439 DEVICE_DTS_CONFIG := config@4
440 SOC := qcom-ipq4018
441 IMAGE_SIZE := 30720k
442 IMAGES += factory.bin
443 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
444 IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
445 DEVICE_PACKAGES := ipq-wifi-engenius_emd1
446 endef
447 TARGET_DEVICES += engenius_emd1
448
449 define Device/engenius_emr3500
450 $(call Device/FitImage)
451 DEVICE_VENDOR := EnGenius
452 DEVICE_MODEL := EMR3500
453 DEVICE_DTS_CONFIG := config@4
454 SOC := qcom-ipq4018
455 KERNEL_SIZE := 4096k
456 IMAGE_SIZE := 30720k
457 IMAGES += factory.bin
458 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
459 IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
460 DEVICE_PACKAGES := ipq-wifi-engenius_emr3500
461 DEFAULT := n
462 endef
463 TARGET_DEVICES += engenius_emr3500
464
465 define Device/engenius_ens620ext
466 $(call Device/FitImage)
467 DEVICE_VENDOR := EnGenius
468 DEVICE_MODEL := ENS620EXT
469 SOC := qcom-ipq4018
470 DEVICE_DTS_CONFIG := config@4
471 BLOCKSIZE := 64k
472 PAGESIZE := 256
473 BOARD_NAME := ENS620EXT
474 VENDOR_ID := 0x0101
475 PRODUCT_ID := 0x79
476 PRODUCT_ID_NEW := 0xA4
477 DATECODE := 190507
478 FW_VER := 3.1.2
479 FW_VER_NEW := 3.5.6
480 CW_VER := 1.8.99
481 IMAGE_SIZE := 21312k
482 KERNEL_SIZE := 5120k
483 FILESYSTEMS := squashfs
484 IMAGES += factory_30.bin factory_35.bin
485 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
486 IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER)
487 IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW)
488 endef
489 TARGET_DEVICES += engenius_ens620ext
490
491 define Device/ezviz_cs-w3-wd1200g-eup
492 $(call Device/FitImage)
493 DEVICE_VENDOR := EZVIZ
494 DEVICE_MODEL := CS-W3-WD1200G
495 DEVICE_VARIANT := EUP
496 IMAGE_SIZE := 14848k
497 KERNEL_SIZE = 6m
498 SOC := qcom-ipq4018
499 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
500 append-metadata
501 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
502 ipq-wifi-ezviz_cs-w3-wd1200g-eup
503 DEVICE_COMPAT_VERSION := 2.0
504 DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated (see wiki). \
505 Upgrade via sysupgrade mechanism is not possible.
506 endef
507 TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
508
509 define Device/glinet_gl-ap1300
510 $(call Device/FitImage)
511 $(call Device/UbiFit)
512 DEVICE_VENDOR := GL.iNet
513 DEVICE_MODEL := GL-AP1300
514 SOC := qcom-ipq4018
515 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
516 BLOCKSIZE := 128k
517 PAGESIZE := 2048
518 IMAGE_SIZE := 131072k
519 KERNEL_INSTALL := 1
520 DEVICE_PACKAGES := ipq-wifi-glinet_gl-ap1300
521 endef
522 TARGET_DEVICES += glinet_gl-ap1300
523
524 define Device/glinet_gl-b1300
525 $(call Device/FitzImage)
526 DEVICE_VENDOR := GL.iNet
527 DEVICE_MODEL := GL-B1300
528 BOARD_NAME := gl-b1300
529 SOC := qcom-ipq4029
530 KERNEL_SIZE := 4096k
531 IMAGE_SIZE := 26624k
532 IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
533 endef
534 TARGET_DEVICES += glinet_gl-b1300
535
536 define Device/glinet_gl-b2200
537 $(call Device/FitzImage)
538 DEVICE_VENDOR := GL.iNet
539 DEVICE_MODEL := GL-B2200
540 SOC := qcom-ipq4019
541 DEVICE_DTS_CONFIG := config@ap.dk04.1-c3
542 KERNEL_INITRAMFS_SUFFIX := -recovery.itb
543 IMAGES := emmc.img.gz sysupgrade.bin
544 IMAGE/emmc.img.gz := qsdk-ipq-app-gpt |\
545 pad-to 1024k | append-kernel |\
546 pad-to 33792k | append-rootfs |\
547 append-metadata | gzip
548 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
549 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-glinet_gl-b2200 \
550 kmod-fs-ext4 kmod-mmc kmod-spi-dev mkf2fs e2fsprogs kmod-fs-f2fs
551 endef
552 TARGET_DEVICES += glinet_gl-b2200
553
554 define Device/glinet_gl-s1300
555 $(call Device/FitzImage)
556 DEVICE_VENDOR := GL.iNet
557 DEVICE_MODEL := GL-S1300
558 SOC := qcom-ipq4029
559 KERNEL_SIZE := 4096k
560 IMAGE_SIZE := 26624k
561 IMAGES := sysupgrade.bin
562 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
563 DEVICE_PACKAGES := ipq-wifi-glinet_gl-s1300 kmod-fs-ext4 kmod-mmc kmod-spi-dev
564 endef
565 TARGET_DEVICES += glinet_gl-s1300
566
567 define Device/linksys_ea6350v3
568 # The Linksys EA6350v3 has a uboot bootloader that does not
569 # support either booting lzma kernel images nor booting UBI
570 # partitions. This uboot, however, supports raw kernel images and
571 # gzipped images.
572 #
573 # As for the time of writing this, the device will boot the kernel
574 # from a fixed address with a fixed length of 3MiB. Also, the
575 # device has a hard-coded kernel command line that requieres the
576 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
577 # Oh... and the kernel partition overlaps with the rootfs
578 # partition (the same for alt_kernel and alt_rootfs).
579 #
580 # If you are planing re-partitioning the device, you may want to
581 # keep those details in mind:
582 # 1. The kernel adresses you should honor are 0x00000000 and
583 # 0x02800000 respectively.
584 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
585 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
586 # 4. The kernel command line from uboot is harcoded to boot with
587 # rootfs either in mtd11 or mtd13.
588 $(call Device/FitzImage)
589 DEVICE_VENDOR := Linksys
590 DEVICE_MODEL := EA6350
591 DEVICE_VARIANT := v3
592 SOC := qcom-ipq4018
593 BLOCKSIZE := 128k
594 PAGESIZE := 2048
595 KERNEL_SIZE := 3072k
596 IMAGE_SIZE := 37888k
597 UBINIZE_OPTS := -E 5
598 IMAGES += factory.bin
599 IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
600 endef
601 TARGET_DEVICES += linksys_ea6350v3
602
603 define Device/linksys_ea8300
604 $(call Device/FitzImage)
605 DEVICE_VENDOR := Linksys
606 DEVICE_MODEL := EA8300
607 SOC := qcom-ipq4019
608 KERNEL_SIZE := 3072k
609 IMAGE_SIZE := 87040k
610 BLOCKSIZE := 128k
611 PAGESIZE := 2048
612 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
613 IMAGES += factory.bin
614 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
615 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
616 endef
617 TARGET_DEVICES += linksys_ea8300
618
619 define Device/linksys_mr8300
620 $(call Device/FitzImage)
621 DEVICE_VENDOR := Linksys
622 DEVICE_MODEL := MR8300
623 SOC := qcom-ipq4019
624 KERNEL_SIZE := 3072k
625 IMAGE_SIZE := 87040k
626 BLOCKSIZE := 128k
627 PAGESIZE := 2048
628 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
629 IMAGES += factory.bin
630 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
631 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-linksys_mr8300-v0 kmod-usb-ledtrig-usbport
632 endef
633 TARGET_DEVICES += linksys_mr8300
634
635 define Device/luma_wrtq-329acn
636 $(call Device/FitImage)
637 DEVICE_VENDOR := Luma Home
638 DEVICE_MODEL := WRTQ-329ACN
639 SOC := qcom-ipq4018
640 DEVICE_PACKAGES := ipq-wifi-luma_wrtq-329acn kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio
641 IMAGE_SIZE := 76632k
642 BLOCKSIZE := 128k
643 PAGESIZE := 2048
644 endef
645 TARGET_DEVICES += luma_wrtq-329acn
646
647 define Device/meraki_mr33
648 $(call Device/FitImage)
649 DEVICE_VENDOR := Cisco Meraki
650 DEVICE_MODEL := MR33
651 SOC := qcom-ipq4029
652 BLOCKSIZE := 128k
653 PAGESIZE := 2048
654 DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct
655 endef
656 TARGET_DEVICES += meraki_mr33
657
658 define Device/mobipromo_cm520-79f
659 $(call Device/FitzImage)
660 $(call Device/UbiFit)
661 DEVICE_VENDOR := MobiPromo
662 DEVICE_MODEL := CM520-79F
663 SOC := qcom-ipq4019
664 BLOCKSIZE := 128k
665 PAGESIZE := 2048
666 DEVICE_PACKAGES := ipq-wifi-mobipromo_cm520-79f kmod-usb-ledtrig-usbport
667 endef
668 TARGET_DEVICES += mobipromo_cm520-79f
669
670 define Device/netgear_ex61x0v2
671 $(call Device/DniImage)
672 DEVICE_VENDOR := NETGEAR
673 DEVICE_DTS_CONFIG := config@4
674 NETGEAR_BOARD_ID := EX6150v2series
675 NETGEAR_HW_ID := 29765285+16+0+128+2x2
676 IMAGE_SIZE := 14400k
677 SOC := qcom-ipq4018
678 endef
679
680 define Device/netgear_ex6100v2
681 $(call Device/netgear_ex61x0v2)
682 DEVICE_MODEL := EX6100
683 DEVICE_VARIANT := v2
684 endef
685 TARGET_DEVICES += netgear_ex6100v2
686
687 define Device/netgear_ex6150v2
688 $(call Device/netgear_ex61x0v2)
689 DEVICE_MODEL := EX6150
690 DEVICE_VARIANT := v2
691 endef
692 TARGET_DEVICES += netgear_ex6150v2
693
694 define Device/netgear_orbi
695 $(call Device/DniImage)
696 SOC := qcom-ipq4019
697 DEVICE_VENDOR := NETGEAR
698 IMAGE/factory.img := append-kernel | pad-offset 128k 64 | \
699 append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | \
700 append-rootfs | pad-rootfs | netgear-dni
701 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | \
702 sysupgrade-tar rootfs=$$$$@ | append-metadata
703 DEVICE_PACKAGES := ath10k-firmware-qca9984-ct e2fsprogs kmod-fs-ext4 losetup
704 endef
705
706 define Device/netgear_rbx50
707 $(call Device/netgear_orbi)
708 NETGEAR_HW_ID := 29765352+0+4000+512+2x2+2x2+4x4
709 KERNEL_SIZE := 3932160
710 ROOTFS_SIZE := 32243712
711 IMAGE_SIZE := 36175872
712 endef
713
714 define Device/netgear_rbr50
715 $(call Device/netgear_rbx50)
716 DEVICE_MODEL := RBR50
717 DEVICE_VARIANT := v1
718 NETGEAR_BOARD_ID := RBR50
719 endef
720 TARGET_DEVICES += netgear_rbr50
721
722 define Device/netgear_rbs50
723 $(call Device/netgear_rbx50)
724 DEVICE_MODEL := RBS50
725 DEVICE_VARIANT := v1
726 NETGEAR_BOARD_ID := RBS50
727 endef
728 TARGET_DEVICES += netgear_rbs50
729
730 define Device/netgear_srx60
731 $(call Device/netgear_orbi)
732 NETGEAR_HW_ID := 29765352+0+4096+512+2x2+2x2+4x4
733 KERNEL_SIZE := 3932160
734 ROOTFS_SIZE := 32243712
735 IMAGE_SIZE := 36175872
736 endef
737
738 define Device/netgear_srr60
739 $(call Device/netgear_srx60)
740 DEVICE_MODEL := SRR60
741 NETGEAR_BOARD_ID := SRR60
742 endef
743 TARGET_DEVICES += netgear_srr60
744
745 define Device/netgear_srs60
746 $(call Device/netgear_srx60)
747 DEVICE_MODEL := SRS60
748 NETGEAR_BOARD_ID := SRS60
749 endef
750 TARGET_DEVICES += netgear_srs60
751
752 define Device/netgear_wac510
753 $(call Device/FitImage)
754 $(call Device/UbiFit)
755 DEVICE_VENDOR := Netgear
756 DEVICE_MODEL := WAC510
757 SOC := qcom-ipq4018
758 DEVICE_DTS_CONFIG := config@5
759 BLOCKSIZE := 128k
760 PAGESIZE := 2048
761 IMAGES += nand-factory.tar
762 IMAGE/nand-factory.tar := append-ubi | wac5xx-netgear-tar
763 DEVICE_PACKAGES := uboot-envtools
764 endef
765 TARGET_DEVICES += netgear_wac510
766
767 define Device/openmesh_a42
768 $(call Device/FitImageLzma)
769 DEVICE_VENDOR := OpenMesh
770 DEVICE_MODEL := A42
771 SOC := qcom-ipq4018
772 DEVICE_DTS_CONFIG := config@om.a42
773 BLOCKSIZE := 64k
774 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
775 IMAGE_SIZE := 15616k
776 IMAGES += factory.bin
777 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
778 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
779 endef
780 TARGET_DEVICES += openmesh_a42
781
782 define Device/openmesh_a62
783 $(call Device/FitImageLzma)
784 DEVICE_VENDOR := OpenMesh
785 DEVICE_MODEL := A62
786 SOC := qcom-ipq4019
787 DEVICE_DTS_CONFIG := config@om.a62
788 BLOCKSIZE := 64k
789 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
790 IMAGE_SIZE := 15552k
791 IMAGES += factory.bin
792 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
793 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
794 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct
795 endef
796 TARGET_DEVICES += openmesh_a62
797
798 define Device/p2w_r619ac
799 $(call Device/FitzImage)
800 $(call Device/UbiFit)
801 DEVICE_VENDOR := P&W
802 DEVICE_MODEL := R619AC
803 SOC := qcom-ipq4019
804 DEVICE_DTS_CONFIG := config@10
805 BLOCKSIZE := 128k
806 PAGESIZE := 2048
807 DEVICE_PACKAGES := ipq-wifi-p2w_r619ac
808 endef
809
810 define Device/p2w_r619ac-64m
811 $(call Device/p2w_r619ac)
812 DEVICE_VARIANT := 64M NAND
813 IMAGES += nand-factory.bin
814 IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
815 endef
816 TARGET_DEVICES += p2w_r619ac-64m
817
818 define Device/p2w_r619ac-128m
819 $(call Device/p2w_r619ac)
820 DEVICE_VARIANT := 128M NAND
821 endef
822 TARGET_DEVICES += p2w_r619ac-128m
823
824 define Device/plasmacloud_pa1200
825 $(call Device/FitImageLzma)
826 DEVICE_VENDOR := Plasma Cloud
827 DEVICE_MODEL := PA1200
828 SOC := qcom-ipq4018
829 DEVICE_DTS_CONFIG := config@pc.pa1200
830 BLOCKSIZE := 64k
831 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
832 IMAGE_SIZE := 15616k
833 IMAGES += factory.bin
834 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
835 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
836 DEVICE_PACKAGES := ipq-wifi-plasmacloud_pa1200
837 endef
838 TARGET_DEVICES += plasmacloud_pa1200
839
840 define Device/plasmacloud_pa2200
841 $(call Device/FitImageLzma)
842 DEVICE_VENDOR := Plasma Cloud
843 DEVICE_MODEL := PA2200
844 SOC := qcom-ipq4019
845 DEVICE_DTS_CONFIG := config@pc.pa2200
846 BLOCKSIZE := 64k
847 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
848 IMAGE_SIZE := 15552k
849 IMAGES += factory.bin
850 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
851 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
852 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud_pa2200
853 endef
854 TARGET_DEVICES += plasmacloud_pa2200
855
856 define Device/qcom_ap-dk01.1-c1
857 DEVICE_VENDOR := Qualcomm Atheros
858 DEVICE_MODEL := AP-DK01.1
859 DEVICE_VARIANT := C1
860 BOARD_NAME := ap-dk01.1-c1
861 SOC := qcom-ipq4019
862 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
863 KERNEL_INSTALL := 1
864 KERNEL_SIZE := 4096k
865 IMAGE_SIZE := 26624k
866 $(call Device/FitImage)
867 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
868 DEFAULT := n
869 endef
870 TARGET_DEVICES += qcom_ap-dk01.1-c1
871
872 define Device/qcom_ap-dk04.1-c1
873 $(call Device/FitImage)
874 $(call Device/UbiFit)
875 DEVICE_VENDOR := Qualcomm Atheros
876 DEVICE_MODEL := AP-DK04.1
877 DEVICE_VARIANT := C1
878 SOC := qcom-ipq4019
879 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
880 KERNEL_INSTALL := 1
881 KERNEL_SIZE := 4048k
882 BLOCKSIZE := 128k
883 PAGESIZE := 2048
884 BOARD_NAME := ap-dk04.1-c1
885 DEFAULT := n
886 endef
887 TARGET_DEVICES += qcom_ap-dk04.1-c1
888
889 define Device/qxwlan_e2600ac-c1
890 $(call Device/FitImage)
891 DEVICE_VENDOR := Qxwlan
892 DEVICE_MODEL := E2600AC
893 DEVICE_VARIANT := C1
894 BOARD_NAME := e2600ac-c1
895 SOC := qcom-ipq4019
896 KERNEL_SIZE := 4096k
897 IMAGE_SIZE := 31232k
898 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
899 DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
900 DEFAULT := n
901 endef
902 TARGET_DEVICES += qxwlan_e2600ac-c1
903
904 define Device/qxwlan_e2600ac-c2
905 $(call Device/FitImage)
906 $(call Device/UbiFit)
907 DEVICE_VENDOR := Qxwlan
908 DEVICE_MODEL := E2600AC
909 DEVICE_VARIANT := C2
910 SOC := qcom-ipq4019
911 KERNEL_INSTALL := 1
912 BLOCKSIZE := 128k
913 PAGESIZE := 2048
914 DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
915 endef
916 TARGET_DEVICES += qxwlan_e2600ac-c2
917
918 define Device/teltonika_rutx10
919 $(call Device/FitImage)
920 $(call Device/UbiFit)
921 DEVICE_VENDOR := Teltonika
922 DEVICE_MODEL := RUTX10
923 SOC := qcom-ipq4018
924 DEVICE_DTS_CONFIG := config@5
925 KERNEL_INSTALL := 1
926 BLOCKSIZE := 128k
927 PAGESIZE := 2048
928 FILESYSTEMS := squashfs
929 IMAGE/nand-factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
930 DEVICE_PACKAGES := ipq-wifi-teltonika_rutx kmod-bluetooth
931 endef
932 TARGET_DEVICES += teltonika_rutx10
933
934 define Device/unielec_u4019-32m
935 $(call Device/FitImage)
936 DEVICE_VENDOR := Unielec
937 DEVICE_MODEL := U4019
938 DEVICE_VARIANT := 32M
939 BOARD_NAME := u4019-32m
940 SOC := qcom-ipq4019
941 KERNEL_SIZE := 4096k
942 IMAGE_SIZE := 31232k
943 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
944 DEFAULT := n
945 endef
946 TARGET_DEVICES += unielec_u4019-32m
947
948 define Device/zyxel_nbg6617
949 $(call Device/FitImageLzma)
950 DEVICE_VENDOR := ZyXEL
951 DEVICE_MODEL := NBG6617
952 SOC := qcom-ipq4018
953 KERNEL_SIZE := 4096k
954 ROOTFS_SIZE := 24960k
955 RAS_BOARD := NBG6617
956 RAS_ROOTFS_SIZE := 19840k
957 RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
958 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
959 IMAGES += factory.bin
960 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
961 # at least as large as the one of the initial firmware image (not the current
962 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
963 # this minimum-size. However, the larger image can be flashed both ways.
964 IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
965 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
966 DEVICE_PACKAGES := kmod-usb-ledtrig-usbport
967 endef
968 TARGET_DEVICES += zyxel_nbg6617
969
970 define Device/zyxel_wre6606
971 $(call Device/FitImage)
972 DEVICE_VENDOR := ZyXEL
973 DEVICE_MODEL := WRE6606
974 DEVICE_DTS_CONFIG := config@4
975 SOC := qcom-ipq4018
976 IMAGE_SIZE := 13184k
977 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
978 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
979 endef
980 TARGET_DEVICES += zyxel_wre6606