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