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_ens620ext
282 $(call Device
/FitImage
)
283 DEVICE_VENDOR
:= EnGenius
284 DEVICE_MODEL
:= ENS620EXT
286 DEVICE_DTS_CONFIG
:= config@
4
289 BOARD_NAME
:= ENS620EXT
292 PRODUCT_ID_NEW
:= 0xA4
299 FILESYSTEMS
:= squashfs
300 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
301 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
302 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
303 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
305 TARGET_DEVICES
+= engenius_ens620ext
307 define Device
/ezviz_cs-w3-wd1200g-eup
308 $(call Device
/FitImage
)
309 DEVICE_VENDOR
:= EZVIZ
310 DEVICE_MODEL
:= CS-W3-WD1200G
311 DEVICE_VARIANT
:= EUP
312 DEVICE_DTS_CONFIG
:= config@
4
315 IMAGES
:= sysupgrade.bin
316 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | \
318 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
319 ipq-wifi-ezviz_cs-w3-wd1200g-eup
321 TARGET_DEVICES
+= ezviz_cs-w3-wd1200g-eup
323 define Device
/glinet_gl-b1300
324 $(call Device
/FitImage
)
325 DEVICE_VENDOR
:= GL.iNet
326 DEVICE_MODEL
:= GL-B1300
327 BOARD_NAME
:= gl-b1300
331 IMAGES
:= sysupgrade.bin
332 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
334 TARGET_DEVICES
+= glinet_gl-b1300
336 define Device
/linksys_ea6350v3
337 # The Linksys EA6350v3 has a uboot bootloader that does not
338 # support either booting lzma kernel images nor booting UBI
339 # partitions. This uboot, however, supports raw kernel images and
342 # As for the time of writing this, the device will boot the kernel
343 # from a fixed address with a fixed length of 3MiB. Also, the
344 # device has a hard-coded kernel command line that requieres the
345 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
346 # Oh... and the kernel partition overlaps with the rootfs
347 # partition (the same for alt_kernel and alt_rootfs).
349 # If you are planing re-partitioning the device, you may want to
350 # keep those details in mind:
351 # 1. The kernel adresses you should honor are 0x00000000 and
352 # 0x02800000 respectively.
353 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
354 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
355 # 4. The kernel command line from uboot is harcoded to boot with
356 # rootfs either in mtd11 or mtd13.
357 $(call Device
/FitzImage
)
358 DEVICE_VENDOR
:= Linksys
359 DEVICE_MODEL
:= EA6350
367 IMAGES
:= factory.bin sysupgrade.bin
368 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
369 DEVICE_PACKAGES
:= uboot-envtools
371 TARGET_DEVICES
+= linksys_ea6350v3
373 define Device
/linksys_ea8300
374 $(call Device
/FitzImage
)
375 DEVICE_VENDOR
:= Linksys
376 DEVICE_MODEL
:= EA8300
382 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
383 IMAGES
:= sysupgrade.bin factory.bin
384 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
385 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
387 TARGET_DEVICES
+= linksys_ea8300
389 define Device
/meraki_mr33
390 $(call Device
/FitImage
)
391 DEVICE_VENDOR
:= Cisco Meraki
396 IMAGES
= sysupgrade.bin
397 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
399 TARGET_DEVICES
+= meraki_mr33
401 define Device
/netgear_ex61x0v2
402 $(call Device
/DniImage
)
403 DEVICE_DTS_CONFIG
:= config@
4
404 NETGEAR_BOARD_ID
:= EX6150v2series
405 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
409 define Device
/netgear_ex6100v2
410 $(call Device
/netgear_ex61x0v2
)
411 DEVICE_VENDOR
:= Netgear
412 DEVICE_MODEL
:= EX6100
415 TARGET_DEVICES
+= netgear_ex6100v2
417 define Device
/netgear_ex6150v2
418 $(call Device
/netgear_ex61x0v2
)
419 DEVICE_VENDOR
:= Netgear
420 DEVICE_MODEL
:= EX6150
423 TARGET_DEVICES
+= netgear_ex6150v2
425 define Device
/openmesh_a42
426 $(call Device
/FitImageLzma
)
427 DEVICE_VENDOR
:= OpenMesh
430 DEVICE_DTS_CONFIG
:= config@om.a42
432 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
434 IMAGES
= factory.bin sysupgrade.bin
435 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A42
436 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
437 DEVICE_PACKAGES
:= uboot-envtools
439 TARGET_DEVICES
+= openmesh_a42
441 define Device
/openmesh_a62
442 $(call Device
/FitImageLzma
)
443 DEVICE_VENDOR
:= OpenMesh
446 DEVICE_DTS_CONFIG
:= config@om.a62
448 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
450 IMAGES
= factory.bin sysupgrade.bin
451 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
452 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
453 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
456 TARGET_DEVICES
+= openmesh_a62
458 define Device
/qcom_ap-dk01.1
-c1
459 DEVICE_VENDOR
:= Qualcomm Atheros
460 DEVICE_MODEL
:= AP-DK01.1
462 BOARD_NAME
:= ap-dk01.1
-c1
464 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
468 $(call Device
/FitImage
)
469 IMAGES
:= sysupgrade.bin
470 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
472 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
474 define Device
/qcom_ap-dk04.1
-c1
475 $(call Device
/FitImage
)
476 $(call Device
/UbiFit
)
477 DEVICE_VENDOR
:= Qualcomm Atheros
478 DEVICE_MODEL
:= AP-DK04.1
481 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
486 BOARD_NAME
:= ap-dk04.1
-c1
488 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
490 define Device
/qxwlan_e2600ac-c1
491 $(call Device
/FitImage
)
492 DEVICE_VENDOR
:= Qxwlan
493 DEVICE_MODEL
:= E2600AC
495 BOARD_NAME
:= e2600ac-c1
499 IMAGES
:= sysupgrade.bin
500 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
501 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
503 TARGET_DEVICES
+= qxwlan_e2600ac-c1
505 define Device
/qxwlan_e2600ac-c2
506 $(call Device
/FitImage
)
507 $(call Device
/UbiFit
)
508 DEVICE_VENDOR
:= Qxwlan
509 DEVICE_MODEL
:= E2600AC
515 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
517 TARGET_DEVICES
+= qxwlan_e2600ac-c2
519 define Device
/unielec_u4019-32m
520 $(call Device
/FitImage
)
521 DEVICE_VENDOR
:= Unielec
522 DEVICE_MODEL
:= U4019
523 DEVICE_VARIANT
:= 32M
524 BOARD_NAME
:= u4019-32m
528 IMAGES
:= sysupgrade.bin
529 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
531 TARGET_DEVICES
+= unielec_u4019-32m
533 define Device
/zyxel_nbg6617
534 $(call Device
/FitImageLzma
)
535 DEVICE_VENDOR
:= ZyXEL
536 DEVICE_MODEL
:= NBG6617
538 ROOTFS_SIZE
:= 24960k
540 RAS_ROOTFS_SIZE
:= 19840k
541 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
542 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
543 IMAGES
:= sysupgrade.bin factory.bin
544 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
545 # at least as large as the one of the initial firmware image (not the current
546 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
547 # this minimum-size. However, the larger image can be flashed both ways.
548 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
549 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
550 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
552 TARGET_DEVICES
+= zyxel_nbg6617
554 define Device
/zyxel_wre6606
555 $(call Device
/FitImage
)
556 DEVICE_VENDOR
:= ZyXEL
557 DEVICE_MODEL
:= WRE6606
558 DEVICE_DTS_CONFIG
:= config@
4
560 IMAGES
:= sysupgrade.bin
561 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
562 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
564 TARGET_DEVICES
+= zyxel_wre6606
566 $(eval
$(call BuildImage
))