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