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