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