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