ipq40xx: add support for GL.iNet GL-AP1300
[openwrt/staging/dedeckeh.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/devolo_magic-2-wifi-next
321 $(call Device/FitImage)
322 DEVICE_VENDOR := devolo
323 DEVICE_MODEL := Magic 2 WiFi next
324 SOC := qcom-ipq4018
325 KERNEL_SIZE := 4096k
326
327 # If the bootloader sees 0xDEADC0DE and this trailer at the 64k boundary of a TFTP image
328 # it will bootm it, just like we want for the initramfs.
329 KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to 64k |\
330 append-string -e '\xDE\xAD\xC0\xDE{"fl_initramfs":""}\x00'
331
332 IMAGE_SIZE := 26624k
333 IMAGES := sysupgrade.bin
334 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
335 DEVICE_PACKAGES := ipq-wifi-devolo_magic-2-wifi-next uboot-envtools
336 endef
337 TARGET_DEVICES += devolo_magic-2-wifi-next
338
339 define Device/dlink_dap-2610
340 $(call Device/FitImageLzma)
341 DEVICE_VENDOR := D-Link
342 DEVICE_MODEL := DAP-2610
343 SOC := qcom-ipq4018
344 DEVICE_DTS_CONFIG := config@ap.dk01.1-c1
345 BLOCKSIZE := 64k
346 WRGG_DEVNAME := /dev/mtdblock/8
347 WRGG_SIGNATURE := wapac30_dkbs_dap2610
348 IMAGE_SIZE := 14080k
349 IMAGES += factory.bin
350 # Bootloader expects a special 160 byte header which is added by
351 # wrgg-image.
352 # Factory image size must be larger than 6MB, and size in wrgg header must
353 # match actual factory image size to be flashable from D-Link http server.
354 # Bootloader verifies checksum of wrgg image before booting, thus jffs2
355 # cannot be part of the wrgg image. This is solved in the factory image by
356 # having the rootfs at the end of the image (without pad-rootfs). And in
357 # the sysupgrade image only the kernel is included in the wrgg checksum,
358 # but this is not flashable from the D-link http server.
359 # append-rootfs must start on an erase block boundary.
360 IMAGE/factory.bin := append-kernel | pad-offset 6144k 160 | append-rootfs | wrgg-image | check-size
361 IMAGE/sysupgrade.bin := append-kernel | wrgg-image | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
362 DEVICE_PACKAGES := ipq-wifi-dlink_dap2610
363 endef
364 TARGET_DEVICES += dlink_dap-2610
365
366 define Device/edgecore_ecw5211
367 $(call Device/FitImage)
368 $(call Device/UbiFit)
369 DEVICE_VENDOR := Edgecore
370 DEVICE_MODEL := ECW5211
371 SOC := qcom-ipq4018
372 BLOCKSIZE := 128k
373 PAGESIZE := 2048
374 DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-usb-acm uboot-envtools
375 endef
376 TARGET_DEVICES += edgecore_ecw5211
377
378 define Device/edgecore_oap100
379 $(call Device/FitImage)
380 $(call Device/UbiFit)
381 DEVICE_VENDOR := Edgecore
382 DEVICE_MODEL := OAP100
383 SOC := qcom-ipq4019
384 BLOCKSIZE := 128k
385 PAGESIZE := 2048
386 IMAGES := nand-sysupgrade.bin
387 DEVICE_DTS_CONFIG := config@ap.dk07.1-c1
388 DEVICE_PACKAGES := ipq-wifi-edgecore_oap100 kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi
389 endef
390 TARGET_DEVICES += edgecore_oap100
391
392 define Device/engenius_eap1300
393 $(call Device/FitImage)
394 DEVICE_VENDOR := EnGenius
395 DEVICE_MODEL := EAP1300
396 DEVICE_DTS_CONFIG := config@4
397 BOARD_NAME := eap1300
398 SOC := qcom-ipq4018
399 KERNEL_SIZE := 5120k
400 IMAGE_SIZE := 25344k
401 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
402 endef
403 TARGET_DEVICES += engenius_eap1300
404
405 define Device/engenius_eap2200
406 $(call Device/FitImage)
407 $(call Device/UbiFit)
408 DEVICE_VENDOR := EnGenius
409 DEVICE_MODEL := EAP2200
410 SOC := qcom-ipq4019
411 BLOCKSIZE := 128k
412 PAGESIZE := 2048
413 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-engenius_eap2200 -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
414 endef
415 TARGET_DEVICES += engenius_eap2200
416
417 define Device/engenius_emd1
418 $(call Device/FitImage)
419 DEVICE_VENDOR := EnGenius
420 DEVICE_MODEL := EMD1
421 DEVICE_DTS_CONFIG := config@4
422 SOC := qcom-ipq4018
423 IMAGE_SIZE := 30720k
424 IMAGES += factory.bin
425 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
426 IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
427 endef
428 TARGET_DEVICES += engenius_emd1
429
430 define Device/engenius_emr3500
431 $(call Device/FitImage)
432 DEVICE_VENDOR := EnGenius
433 DEVICE_MODEL := EMR3500
434 DEVICE_DTS_CONFIG := config@4
435 SOC := qcom-ipq4018
436 KERNEL_SIZE := 4096k
437 IMAGE_SIZE := 30720k
438 IMAGES += factory.bin
439 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
440 IMAGE/factory.bin := qsdk-ipq-factory-nor | check-size
441 endef
442 TARGET_DEVICES += engenius_emr3500
443
444 define Device/engenius_ens620ext
445 $(call Device/FitImage)
446 DEVICE_VENDOR := EnGenius
447 DEVICE_MODEL := ENS620EXT
448 SOC := qcom-ipq4018
449 DEVICE_DTS_CONFIG := config@4
450 BLOCKSIZE := 64k
451 PAGESIZE := 256
452 BOARD_NAME := ENS620EXT
453 VENDOR_ID := 0x0101
454 PRODUCT_ID := 0x79
455 PRODUCT_ID_NEW := 0xA4
456 DATECODE := 190507
457 FW_VER := 3.1.2
458 FW_VER_NEW := 3.5.6
459 CW_VER := 1.8.99
460 IMAGE_SIZE := 21312k
461 KERNEL_SIZE := 5120k
462 FILESYSTEMS := squashfs
463 IMAGES += factory_30.bin factory_35.bin
464 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
465 IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER)
466 IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW)
467 endef
468 TARGET_DEVICES += engenius_ens620ext
469
470 define Device/ezviz_cs-w3-wd1200g-eup
471 $(call Device/FitImage)
472 DEVICE_VENDOR := EZVIZ
473 DEVICE_MODEL := CS-W3-WD1200G
474 DEVICE_VARIANT := EUP
475 DEVICE_DTS_CONFIG := config@4
476 IMAGE_SIZE := 14848k
477 SOC := qcom-ipq4018
478 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
479 append-metadata
480 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
481 ipq-wifi-ezviz_cs-w3-wd1200g-eup
482 endef
483 TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
484
485 define Device/glinet_gl-ap1300
486 $(call Device/FitImage)
487 $(call Device/UbiFit)
488 DEVICE_VENDOR := GL.iNet
489 DEVICE_MODEL := GL-AP1300
490 SOC := qcom-ipq4018
491 DEVICE_DTS_CONFIG := config@ap.dk01.1-c2
492 BLOCKSIZE := 128k
493 PAGESIZE := 2048
494 IMAGE_SIZE := 131072k
495 KERNEL_INSTALL := 1
496 DEVICE_PACKAGES := ipq-wifi-glinet_gl-ap1300
497 endef
498 TARGET_DEVICES += glinet_gl-ap1300
499
500 define Device/glinet_gl-b1300
501 $(call Device/FitImage)
502 DEVICE_VENDOR := GL.iNet
503 DEVICE_MODEL := GL-B1300
504 BOARD_NAME := gl-b1300
505 SOC := qcom-ipq4029
506 KERNEL_SIZE := 4096k
507 IMAGE_SIZE := 26624k
508 IMAGE/sysupgrade.bin := append-kernel |append-rootfs | pad-rootfs | append-metadata
509 endef
510 TARGET_DEVICES += glinet_gl-b1300
511
512 define Device/glinet_gl-s1300
513 $(call Device/FitImage)
514 DEVICE_VENDOR := GL.iNet
515 DEVICE_MODEL := GL-S1300
516 SOC := qcom-ipq4029
517 KERNEL_SIZE := 4096k
518 IMAGE_SIZE := 26624k
519 IMAGES := sysupgrade.bin
520 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
521 DEVICE_PACKAGES := ipq-wifi-glinet_gl-s1300 kmod-fs-ext4 kmod-mmc kmod-spi-dev
522 endef
523 TARGET_DEVICES += glinet_gl-s1300
524
525 define Device/linksys_ea6350v3
526 # The Linksys EA6350v3 has a uboot bootloader that does not
527 # support either booting lzma kernel images nor booting UBI
528 # partitions. This uboot, however, supports raw kernel images and
529 # gzipped images.
530 #
531 # As for the time of writing this, the device will boot the kernel
532 # from a fixed address with a fixed length of 3MiB. Also, the
533 # device has a hard-coded kernel command line that requieres the
534 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
535 # Oh... and the kernel partition overlaps with the rootfs
536 # partition (the same for alt_kernel and alt_rootfs).
537 #
538 # If you are planing re-partitioning the device, you may want to
539 # keep those details in mind:
540 # 1. The kernel adresses you should honor are 0x00000000 and
541 # 0x02800000 respectively.
542 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
543 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
544 # 4. The kernel command line from uboot is harcoded to boot with
545 # rootfs either in mtd11 or mtd13.
546 $(call Device/FitzImage)
547 DEVICE_VENDOR := Linksys
548 DEVICE_MODEL := EA6350
549 DEVICE_VARIANT := v3
550 SOC := qcom-ipq4018
551 BLOCKSIZE := 128k
552 PAGESIZE := 2048
553 KERNEL_SIZE := 3072k
554 IMAGE_SIZE := 37888k
555 UBINIZE_OPTS := -E 5
556 IMAGES += factory.bin
557 IMAGE/factory.bin := append-kernel | append-uImage-fakehdr filesystem | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA6350v3
558 DEVICE_PACKAGES := uboot-envtools
559 endef
560 TARGET_DEVICES += linksys_ea6350v3
561
562 define Device/linksys_ea8300
563 $(call Device/FitzImage)
564 DEVICE_VENDOR := Linksys
565 DEVICE_MODEL := EA8300
566 SOC := qcom-ipq4019
567 KERNEL_SIZE := 3072k
568 IMAGE_SIZE := 87040k
569 BLOCKSIZE := 128k
570 PAGESIZE := 2048
571 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
572 IMAGES += factory.bin
573 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=EA8300
574 DEVICE_PACKAGES := uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
575 endef
576 TARGET_DEVICES += linksys_ea8300
577
578 define Device/linksys_mr8300
579 $(call Device/FitzImage)
580 DEVICE_VENDOR := Linksys
581 DEVICE_MODEL := MR8300
582 SOC := qcom-ipq4019
583 KERNEL_SIZE := 3072k
584 IMAGE_SIZE := 87040k
585 BLOCKSIZE := 128k
586 PAGESIZE := 2048
587 UBINIZE_OPTS := -E 5 # EOD marks to "hide" factory sig at EOF
588 IMAGES += factory.bin
589 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MR8300
590 DEVICE_PACKAGES := uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_mr8300-v0 kmod-usb-ledtrig-usbport
591 endef
592 TARGET_DEVICES += linksys_mr8300
593
594 define Device/luma_wrtq-329acn
595 $(call Device/FitImage)
596 DEVICE_VENDOR := Luma Home
597 DEVICE_MODEL := WRTQ-329ACN
598 SOC := qcom-ipq4018
599 DEVICE_PACKAGES := ipq-wifi-luma_wrtq-329acn kmod-ath3k kmod-eeprom-at24 kmod-i2c-gpio uboot-envtools
600 IMAGE_SIZE := 76632k
601 BLOCKSIZE := 128k
602 PAGESIZE := 2048
603 endef
604 TARGET_DEVICES += luma_wrtq-329acn
605
606 define Device/meraki_mr33
607 $(call Device/FitImage)
608 DEVICE_VENDOR := Cisco Meraki
609 DEVICE_MODEL := MR33
610 SOC := qcom-ipq4029
611 BLOCKSIZE := 128k
612 PAGESIZE := 2048
613 DEVICE_PACKAGES := -swconfig ath10k-firmware-qca9887-ct
614 endef
615 TARGET_DEVICES += meraki_mr33
616
617 define Device/mobipromo_cm520-79f
618 $(call Device/FitzImage)
619 $(call Device/UbiFit)
620 DEVICE_VENDOR := MobiPromo
621 DEVICE_MODEL := CM520-79F
622 SOC := qcom-ipq4019
623 BLOCKSIZE := 128k
624 PAGESIZE := 2048
625 DEVICE_PACKAGES := ipq-wifi-mobipromo_cm520-79f kmod-usb-ledtrig-usbport
626 endef
627 TARGET_DEVICES += mobipromo_cm520-79f
628
629 define Device/netgear_ex61x0v2
630 $(call Device/DniImage)
631 DEVICE_VENDOR := NETGEAR
632 DEVICE_DTS_CONFIG := config@4
633 NETGEAR_BOARD_ID := EX6150v2series
634 NETGEAR_HW_ID := 29765285+16+0+128+2x2
635 IMAGE_SIZE := 14400k
636 SOC := qcom-ipq4018
637 endef
638
639 define Device/netgear_ex6100v2
640 $(call Device/netgear_ex61x0v2)
641 DEVICE_MODEL := EX6100
642 DEVICE_VARIANT := v2
643 endef
644 TARGET_DEVICES += netgear_ex6100v2
645
646 define Device/netgear_ex6150v2
647 $(call Device/netgear_ex61x0v2)
648 DEVICE_MODEL := EX6150
649 DEVICE_VARIANT := v2
650 endef
651 TARGET_DEVICES += netgear_ex6150v2
652
653 define Device/openmesh_a42
654 $(call Device/FitImageLzma)
655 DEVICE_VENDOR := OpenMesh
656 DEVICE_MODEL := A42
657 SOC := qcom-ipq4018
658 DEVICE_DTS_CONFIG := config@om.a42
659 BLOCKSIZE := 64k
660 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
661 IMAGE_SIZE := 15616k
662 IMAGES += factory.bin
663 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A42
664 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
665 DEVICE_PACKAGES := uboot-envtools
666 endef
667 TARGET_DEVICES += openmesh_a42
668
669 define Device/openmesh_a62
670 $(call Device/FitImageLzma)
671 DEVICE_VENDOR := OpenMesh
672 DEVICE_MODEL := A62
673 SOC := qcom-ipq4019
674 DEVICE_DTS_CONFIG := config@om.a62
675 BLOCKSIZE := 64k
676 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
677 IMAGE_SIZE := 15552k
678 IMAGES += factory.bin
679 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=A62
680 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
681 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct uboot-envtools
682 endef
683 TARGET_DEVICES += openmesh_a62
684
685 define Device/plasmacloud_pa1200
686 $(call Device/FitImageLzma)
687 DEVICE_VENDOR := Plasma Cloud
688 DEVICE_MODEL := PA1200
689 SOC := qcom-ipq4018
690 DEVICE_DTS_CONFIG := config@pc.pa1200
691 BLOCKSIZE := 64k
692 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
693 IMAGE_SIZE := 15616k
694 IMAGES += factory.bin
695 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA1200
696 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
697 DEVICE_PACKAGES := uboot-envtools ipq-wifi-plasmacloud-pa1200
698 endef
699 TARGET_DEVICES += plasmacloud_pa1200
700
701 define Device/plasmacloud_pa2200
702 $(call Device/FitImageLzma)
703 DEVICE_VENDOR := Plasma Cloud
704 DEVICE_MODEL := PA2200
705 SOC := qcom-ipq4019
706 DEVICE_DTS_CONFIG := config@pc.pa2200
707 BLOCKSIZE := 64k
708 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | pad-to $$(BLOCKSIZE)
709 IMAGE_SIZE := 15552k
710 IMAGES += factory.bin
711 IMAGE/factory.bin := append-rootfs | pad-rootfs | openmesh-image ce_type=PA2200
712 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
713 DEVICE_PACKAGES := ath10k-firmware-qca9888-ct ipq-wifi-plasmacloud-pa2200 uboot-envtools
714 endef
715 TARGET_DEVICES += plasmacloud_pa2200
716
717 define Device/qcom_ap-dk01.1-c1
718 DEVICE_VENDOR := Qualcomm Atheros
719 DEVICE_MODEL := AP-DK01.1
720 DEVICE_VARIANT := C1
721 BOARD_NAME := ap-dk01.1-c1
722 SOC := qcom-ipq4019
723 DEVICE_DTS := qcom-ipq4019-ap.dk01.1-c1
724 KERNEL_INSTALL := 1
725 KERNEL_SIZE := 4096k
726 IMAGE_SIZE := 26624k
727 $(call Device/FitImage)
728 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | append-metadata
729 endef
730 TARGET_DEVICES += qcom_ap-dk01.1-c1
731
732 define Device/qcom_ap-dk04.1-c1
733 $(call Device/FitImage)
734 $(call Device/UbiFit)
735 DEVICE_VENDOR := Qualcomm Atheros
736 DEVICE_MODEL := AP-DK04.1
737 DEVICE_VARIANT := C1
738 SOC := qcom-ipq4019
739 DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
740 KERNEL_INSTALL := 1
741 KERNEL_SIZE := 4048k
742 BLOCKSIZE := 128k
743 PAGESIZE := 2048
744 BOARD_NAME := ap-dk04.1-c1
745 endef
746 TARGET_DEVICES += qcom_ap-dk04.1-c1
747
748 define Device/qxwlan_e2600ac-c1
749 $(call Device/FitImage)
750 DEVICE_VENDOR := Qxwlan
751 DEVICE_MODEL := E2600AC
752 DEVICE_VARIANT := C1
753 BOARD_NAME := e2600ac-c1
754 SOC := qcom-ipq4019
755 KERNEL_SIZE := 4096k
756 IMAGE_SIZE := 31232k
757 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
758 DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
759 endef
760 TARGET_DEVICES += qxwlan_e2600ac-c1
761
762 define Device/qxwlan_e2600ac-c2
763 $(call Device/FitImage)
764 $(call Device/UbiFit)
765 DEVICE_VENDOR := Qxwlan
766 DEVICE_MODEL := E2600AC
767 DEVICE_VARIANT := C2
768 SOC := qcom-ipq4019
769 KERNEL_INSTALL := 1
770 BLOCKSIZE := 128k
771 PAGESIZE := 2048
772 DEVICE_PACKAGES := ipq-wifi-qxwlan_e2600ac
773 endef
774 TARGET_DEVICES += qxwlan_e2600ac-c2
775
776 define Device/unielec_u4019-32m
777 $(call Device/FitImage)
778 DEVICE_VENDOR := Unielec
779 DEVICE_MODEL := U4019
780 DEVICE_VARIANT := 32M
781 BOARD_NAME := u4019-32m
782 SOC := qcom-ipq4019
783 KERNEL_SIZE := 4096k
784 IMAGE_SIZE := 31232k
785 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
786 endef
787 TARGET_DEVICES += unielec_u4019-32m
788
789 define Device/zyxel_nbg6617
790 $(call Device/FitImageLzma)
791 DEVICE_VENDOR := ZyXEL
792 DEVICE_MODEL := NBG6617
793 SOC := qcom-ipq4018
794 KERNEL_SIZE := 4096k
795 ROOTFS_SIZE := 24960k
796 RAS_BOARD := NBG6617
797 RAS_ROOTFS_SIZE := 19840k
798 RAS_VERSION := "$(VERSION_DIST) $(REVISION)"
799 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
800 IMAGES += factory.bin
801 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
802 # at least as large as the one of the initial firmware image (not the current
803 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
804 # this minimum-size. However, the larger image can be flashed both ways.
805 IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k | check-size $$$$(ROOTFS_SIZE) | zyxel-ras-image separate-kernel
806 IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-rootfs | check-size $$$$(ROOTFS_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
807 DEVICE_PACKAGES := uboot-envtools kmod-usb-ledtrig-usbport
808 endef
809 TARGET_DEVICES += zyxel_nbg6617
810
811 define Device/zyxel_wre6606
812 $(call Device/FitImage)
813 DEVICE_VENDOR := ZyXEL
814 DEVICE_MODEL := WRE6606
815 DEVICE_DTS_CONFIG := config@4
816 SOC := qcom-ipq4018
817 IMAGE_SIZE := 13184k
818 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
819 DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
820 endef
821 TARGET_DEVICES += zyxel_wre6606
822
823 $(eval $(call BuildImage))