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