1 include $(TOPDIR
)/rules.mk
2 include $(INCLUDE_DIR
)/image.mk
4 DEVICE_VARS
+= RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION \
5 WRGG_DEVNAME WRGG_SIGNATURE
9 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
10 KERNEL_INITRAMFS_PREFIX
:= $$(IMG_PREFIX
)-$(1)-initramfs
11 KERNEL_PREFIX
:= $$(IMAGE_PREFIX
)
12 KERNEL_LOADADDR
:= 0x80208000
13 DEVICE_DTS
= $$(SOC
)-$(lastword
$(subst _
, ,$(1)))
14 SUPPORTED_DEVICES
:= $(subst _
,$(comma
),$(1))
15 IMAGE
/sysupgrade.bin
= sysupgrade-tar | append-metadata
16 IMAGE
/sysupgrade.bin
/squashfs
:=
19 define Device
/FitImage
20 KERNEL_SUFFIX
:= -fit-uImage.itb
21 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
25 define Device
/FitImageLzma
26 KERNEL_SUFFIX
:= -fit-uImage.itb
27 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
31 define Device
/FitzImage
32 KERNEL_SUFFIX
:= -fit-zImage.itb
33 KERNEL
= kernel-bin | fit none
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
39 IMAGES
:= nand-factory.ubi nand-sysupgrade.bin
40 IMAGE
/nand-factory.ubi
:= append-ubi
41 IMAGE
/nand-sysupgrade.bin
:= sysupgrade-tar | append-metadata
44 define Device
/DniImage
45 KERNEL_SUFFIX
:= -fit-uImage.itb
46 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
50 IMAGES
:= factory.img sysupgrade.bin
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 | append-rootfs | pad-rootfs | append-metadata
54 DEVICE_VARS
+= NETGEAR_BOARD_ID NETGEAR_HW_ID
57 -$(STAGING_DIR_HOST
)/bin
/mksenaofw \
58 -n
$(BOARD_NAME
) -r
$(VENDOR_ID
) -p
$(1) \
59 -c
$(DATECODE
) -w
$(2) -x
$(CW_VER
) -t
0 \
65 define Build
/wrgg-image
68 -d
"$(WRGG_DEVNAME)" \
69 -s
"$(WRGG_SIGNATURE)" \
74 define Device
/8dev_jalapeno-common
75 $(call Device
/FitImage
)
82 define Device
/8dev_jalapeno
83 $(call Device
/8dev_jalapeno-common
)
84 DEVICE_VENDOR
:= 8devices
85 DEVICE_MODEL
:= Jalapeno
87 TARGET_DEVICES
+= 8dev_jalapeno
89 define Device
/alfa-network_ap120c-ac
90 $(call Device
/FitImage
)
92 DEVICE_VENDOR
:= ALFA Network
93 DEVICE_MODEL
:= AP120C-AC
95 DEVICE_PACKAGES
:= kmod-usb-acm \
96 kmod-tpm-i2c-atmel uboot-envtools
100 IMAGES
:= nand-factory.bin nand-sysupgrade.bin
101 IMAGE
/nand-factory.bin
:= append-ubi | qsdk-ipq-factory-nand
103 TARGET_DEVICES
+= alfa-network_ap120c-ac
105 define Device
/aruba_ap-303
106 $(call Device
/FitImageLzma
)
107 DEVICE_VENDOR
:= Aruba
108 DEVICE_MODEL
:= AP-303
110 DEVICE_PACKAGES
:= ipq-wifi-aruba_ap-303
111 IMAGES
:= sysupgrade.bin
113 TARGET_DEVICES
+= aruba_ap-303
115 define Device
/aruba_ap-303h
116 $(call Device
/FitImageLzma
)
117 DEVICE_VENDOR
:= Aruba
118 DEVICE_MODEL
:= AP-303H
120 DEVICE_PACKAGES
:= ipq-wifi-aruba_ap-303
121 IMAGES
:= sysupgrade.bin
123 TARGET_DEVICES
+= aruba_ap-303h
125 define Device
/asus_map-ac2200
126 $(call Device
/FitImageLzma
)
127 DEVICE_VENDOR
:= ASUS
128 DEVICE_MODEL
:= Lyra
(MAP-AC2200
)
130 IMAGES
:= sysupgrade.bin
131 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct kmod-ath3k
133 TARGET_DEVICES
+= asus_map-ac2200
135 define Device
/asus_rt-ac58u
136 $(call Device
/FitImageLzma
)
137 DEVICE_VENDOR
:= ASUS
138 DEVICE_MODEL
:= RT-AC58U
143 IMAGE_SIZE
:= 20439364
144 FILESYSTEMS
:= squashfs
145 # Someone - in their infinite wisdom - decided to put the firmware
146 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
147 # Since u-boot works with strings we either need another fixup step
148 # to add a version... or we are very careful not to add '\0' into that
149 # string and call it a day.... Yeah, we do the latter!
150 UIMAGE_NAME
:=$(shell echo
-e
'\03\01\01\01RT-AC58U')
151 IMAGES
:= sysupgrade.bin
152 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
153 kmod-usb-ledtrig-usbport
155 TARGET_DEVICES
+= asus_rt-ac58u
157 define Device
/avm_fritzbox-4040
158 $(call Device
/FitImageLzma
)
160 DEVICE_MODEL
:= FRITZ
!Box
4040
162 BOARD_NAME
:= fritz4040
164 UBOOT_PATH
:= $(STAGING_DIR_IMAGE
)/uboot-fritz4040.bin
165 UBOOT_PARTITION_SIZE
:= 524288
166 IMAGES
= eva.bin sysupgrade.bin
167 IMAGE
/eva.bin
:= append-uboot | pad-to
$$$$(UBOOT_PARTITION_SIZE
) | append-kernel | append-rootfs | pad-rootfs
168 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
169 DEVICE_PACKAGES
:= fritz-tffs fritz-caldata
171 TARGET_DEVICES
+= avm_fritzbox-4040
173 define Device
/avm_fritzbox-7530
174 $(call Device
/FitImageLzma
)
176 DEVICE_MODEL
:= FRITZ
!Box
7530
178 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand
179 IMAGES
:= sysupgrade.bin
181 TARGET_DEVICES
+= avm_fritzbox-7530
183 define Device
/avm_fritzrepeater-1200
184 $(call Device
/FitImageLzma
)
186 DEVICE_MODEL
:= FRITZ
!Repeater
1200
188 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
189 IMAGES
:= sysupgrade.bin
191 TARGET_DEVICES
+= avm_fritzrepeater-1200
193 define Device
/avm_fritzrepeater-3000
194 $(call Device
/FitImageLzma
)
196 DEVICE_MODEL
:= FRITZ
!Repeater
3000
198 DEVICE_PACKAGES
:= ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
199 IMAGES
:= sysupgrade.bin
201 TARGET_DEVICES
+= avm_fritzrepeater-3000
203 define Device
/cilab_meshpoint-one
204 $(call Device
/8dev_jalapeno-common
)
205 DEVICE_VENDOR
:= Crisis Innovation Lab
206 DEVICE_MODEL
:= MeshPoint.One
207 DEVICE_PACKAGES
:= kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
209 TARGET_DEVICES
+= cilab_meshpoint-one
211 define Device
/compex_wpj419
212 $(call Device
/FitImage
)
213 $(call Device
/UbiFit
)
214 DEVICE_VENDOR
:= Compex
215 DEVICE_MODEL
:= WPJ419
217 DEVICE_DTS_CONFIG
:= config@
12
221 FILESYSTEMS
:= squashfs
223 TARGET_DEVICES
+= compex_wpj419
225 define Device
/compex_wpj428
226 $(call Device
/FitImage
)
227 DEVICE_VENDOR
:= Compex
228 DEVICE_MODEL
:= WPJ428
230 DEVICE_DTS_CONFIG
:= config@
4
234 IMAGES
= sysupgrade.bin
235 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
236 DEVICE_PACKAGES
:= kmod-gpio-beeper
238 TARGET_DEVICES
+= compex_wpj428
240 define Device
/dlink_dap-2610
241 $(call Device
/FitImageLzma
)
242 DEVICE_VENDOR
:= D-Link
243 DEVICE_MODEL
:= DAP-2610
245 DEVICE_DTS_CONFIG
:= config@ap.dk01.1
-c1
247 WRGG_DEVNAME
:= /dev
/mtdblock
/8
248 WRGG_SIGNATURE
:= wapac30_dkbs_dap2610
250 IMAGES
:= sysupgrade.bin factory.bin
251 # Bootloader expects a special 160 byte header which is added by
253 # Factory image size must be larger than 6MB, and size in wrgg header must
254 # match actual factory image size to be flashable from D-Link http server.
255 # Bootloader verifies checksum of wrgg image before booting, thus jffs2
256 # cannot be part of the wrgg image. This is solved in the factory image by
257 # having the rootfs at the end of the image (without pad-rootfs). And in
258 # the sysupgrade image only the kernel is included in the wrgg checksum,
259 # but this is not flashable from the D-link http server.
260 # append-rootfs must start on an erase block boundary.
261 IMAGE
/factory.bin
:= append-kernel | pad-offset
6144k
160 | append-rootfs | wrgg-image | check-size
$$$$(IMAGE_SIZE
)
262 IMAGE
/sysupgrade.bin
:= append-kernel | wrgg-image | pad-to
$$$$(BLOCKSIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
263 DEVICE_PACKAGES
:= ipq-wifi-dlink_dap2610
265 TARGET_DEVICES
+= dlink_dap-2610
267 define Device
/engenius_eap1300
268 $(call Device
/FitImage
)
269 DEVICE_VENDOR
:= EnGenius
270 DEVICE_MODEL
:= EAP1300
271 DEVICE_DTS_CONFIG
:= config@
4
272 BOARD_NAME
:= eap1300
276 IMAGES
:= sysupgrade.bin
277 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
279 TARGET_DEVICES
+= engenius_eap1300
281 define Device
/engenius_emd1
282 $(call Device
/FitImage
)
283 DEVICE_VENDOR
:= EnGenius
285 DEVICE_DTS_CONFIG
:= config@
4
288 IMAGES
:= sysupgrade.bin factory.bin
289 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
290 IMAGE
/factory.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
)
292 TARGET_DEVICES
+= engenius_emd1
294 define Device
/engenius_ens620ext
295 $(call Device
/FitImage
)
296 DEVICE_VENDOR
:= EnGenius
297 DEVICE_MODEL
:= ENS620EXT
299 DEVICE_DTS_CONFIG
:= config@
4
302 BOARD_NAME
:= ENS620EXT
305 PRODUCT_ID_NEW
:= 0xA4
312 FILESYSTEMS
:= squashfs
313 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
314 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
315 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
316 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
318 TARGET_DEVICES
+= engenius_ens620ext
320 define Device
/ezviz_cs-w3-wd1200g-eup
321 $(call Device
/FitImage
)
322 DEVICE_VENDOR
:= EZVIZ
323 DEVICE_MODEL
:= CS-W3-WD1200G
324 DEVICE_VARIANT
:= EUP
325 DEVICE_DTS_CONFIG
:= config@
4
328 IMAGES
:= sysupgrade.bin
329 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | \
331 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
332 ipq-wifi-ezviz_cs-w3-wd1200g-eup
334 TARGET_DEVICES
+= ezviz_cs-w3-wd1200g-eup
336 define Device
/glinet_gl-b1300
337 $(call Device
/FitImage
)
338 DEVICE_VENDOR
:= GL.iNet
339 DEVICE_MODEL
:= GL-B1300
340 BOARD_NAME
:= gl-b1300
344 IMAGES
:= sysupgrade.bin
345 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
347 TARGET_DEVICES
+= glinet_gl-b1300
349 define Device
/linksys_ea6350v3
350 # The Linksys EA6350v3 has a uboot bootloader that does not
351 # support either booting lzma kernel images nor booting UBI
352 # partitions. This uboot, however, supports raw kernel images and
355 # As for the time of writing this, the device will boot the kernel
356 # from a fixed address with a fixed length of 3MiB. Also, the
357 # device has a hard-coded kernel command line that requieres the
358 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
359 # Oh... and the kernel partition overlaps with the rootfs
360 # partition (the same for alt_kernel and alt_rootfs).
362 # If you are planing re-partitioning the device, you may want to
363 # keep those details in mind:
364 # 1. The kernel adresses you should honor are 0x00000000 and
365 # 0x02800000 respectively.
366 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
367 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
368 # 4. The kernel command line from uboot is harcoded to boot with
369 # rootfs either in mtd11 or mtd13.
370 $(call Device
/FitzImage
)
371 DEVICE_VENDOR
:= Linksys
372 DEVICE_MODEL
:= EA6350
380 IMAGES
:= factory.bin sysupgrade.bin
381 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
382 DEVICE_PACKAGES
:= uboot-envtools
384 TARGET_DEVICES
+= linksys_ea6350v3
386 define Device
/linksys_ea8300
387 $(call Device
/FitzImage
)
388 DEVICE_VENDOR
:= Linksys
389 DEVICE_MODEL
:= EA8300
395 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
396 IMAGES
:= sysupgrade.bin factory.bin
397 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
398 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
400 TARGET_DEVICES
+= linksys_ea8300
402 define Device
/meraki_mr33
403 $(call Device
/FitImage
)
404 DEVICE_VENDOR
:= Cisco Meraki
409 IMAGES
= sysupgrade.bin
410 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
412 TARGET_DEVICES
+= meraki_mr33
414 define Device
/netgear_ex61x0v2
415 $(call Device
/DniImage
)
416 DEVICE_DTS_CONFIG
:= config@
4
417 NETGEAR_BOARD_ID
:= EX6150v2series
418 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
422 define Device
/netgear_ex6100v2
423 $(call Device
/netgear_ex61x0v2
)
424 DEVICE_VENDOR
:= Netgear
425 DEVICE_MODEL
:= EX6100
428 TARGET_DEVICES
+= netgear_ex6100v2
430 define Device
/netgear_ex6150v2
431 $(call Device
/netgear_ex61x0v2
)
432 DEVICE_VENDOR
:= Netgear
433 DEVICE_MODEL
:= EX6150
436 TARGET_DEVICES
+= netgear_ex6150v2
438 define Device
/openmesh_a42
439 $(call Device
/FitImageLzma
)
440 DEVICE_VENDOR
:= OpenMesh
443 DEVICE_DTS_CONFIG
:= config@om.a42
445 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
447 IMAGES
= factory.bin sysupgrade.bin
448 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A42
449 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
450 DEVICE_PACKAGES
:= uboot-envtools
452 TARGET_DEVICES
+= openmesh_a42
454 define Device
/openmesh_a62
455 $(call Device
/FitImageLzma
)
456 DEVICE_VENDOR
:= OpenMesh
459 DEVICE_DTS_CONFIG
:= config@om.a62
461 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
463 IMAGES
= factory.bin sysupgrade.bin
464 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
465 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
466 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
469 TARGET_DEVICES
+= openmesh_a62
471 define Device
/qcom_ap-dk01.1
-c1
472 DEVICE_VENDOR
:= Qualcomm Atheros
473 DEVICE_MODEL
:= AP-DK01.1
475 BOARD_NAME
:= ap-dk01.1
-c1
477 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
481 $(call Device
/FitImage
)
482 IMAGES
:= sysupgrade.bin
483 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
485 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
487 define Device
/qcom_ap-dk04.1
-c1
488 $(call Device
/FitImage
)
489 $(call Device
/UbiFit
)
490 DEVICE_VENDOR
:= Qualcomm Atheros
491 DEVICE_MODEL
:= AP-DK04.1
494 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
499 BOARD_NAME
:= ap-dk04.1
-c1
501 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
503 define Device
/qxwlan_e2600ac-c1
504 $(call Device
/FitImage
)
505 DEVICE_VENDOR
:= Qxwlan
506 DEVICE_MODEL
:= E2600AC
508 BOARD_NAME
:= e2600ac-c1
512 IMAGES
:= sysupgrade.bin
513 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
514 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
516 TARGET_DEVICES
+= qxwlan_e2600ac-c1
518 define Device
/qxwlan_e2600ac-c2
519 $(call Device
/FitImage
)
520 $(call Device
/UbiFit
)
521 DEVICE_VENDOR
:= Qxwlan
522 DEVICE_MODEL
:= E2600AC
528 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
530 TARGET_DEVICES
+= qxwlan_e2600ac-c2
532 define Device
/unielec_u4019-32m
533 $(call Device
/FitImage
)
534 DEVICE_VENDOR
:= Unielec
535 DEVICE_MODEL
:= U4019
536 DEVICE_VARIANT
:= 32M
537 BOARD_NAME
:= u4019-32m
541 IMAGES
:= sysupgrade.bin
542 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
544 TARGET_DEVICES
+= unielec_u4019-32m
546 define Device
/zyxel_nbg6617
547 $(call Device
/FitImageLzma
)
548 DEVICE_VENDOR
:= ZyXEL
549 DEVICE_MODEL
:= NBG6617
551 ROOTFS_SIZE
:= 24960k
553 RAS_ROOTFS_SIZE
:= 19840k
554 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
555 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
556 IMAGES
:= sysupgrade.bin factory.bin
557 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
558 # at least as large as the one of the initial firmware image (not the current
559 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
560 # this minimum-size. However, the larger image can be flashed both ways.
561 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
562 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
563 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
565 TARGET_DEVICES
+= zyxel_nbg6617
567 define Device
/zyxel_wre6606
568 $(call Device
/FitImage
)
569 DEVICE_VENDOR
:= ZyXEL
570 DEVICE_MODEL
:= WRE6606
571 DEVICE_DTS_CONFIG
:= config@
4
573 IMAGES
:= sysupgrade.bin
574 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
575 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
577 TARGET_DEVICES
+= zyxel_wre6606
579 $(eval
$(call BuildImage
))