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