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