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