1 include $(TOPDIR
)/rules.mk
2 include $(INCLUDE_DIR
)/image.mk
4 DEVICE_VARS
+= RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
8 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
9 KERNEL_INITRAMFS_PREFIX
:= $$(IMG_PREFIX
)-$(1)-initramfs
10 KERNEL_PREFIX
:= $$(IMAGE_PREFIX
)
11 KERNEL_LOADADDR
:= 0x80208000
12 DEVICE_DTS
= $$(SOC
)-$(lastword
$(subst _
, ,$(1)))
13 SUPPORTED_DEVICES
:= $(subst _
,$(comma
),$(1))
14 IMAGE
/sysupgrade.bin
= sysupgrade-tar | append-metadata
15 IMAGE
/sysupgrade.bin
/squashfs
:=
18 define Device
/FitImage
19 KERNEL_SUFFIX
:= -fit-uImage.itb
20 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
24 define Device
/FitImageLzma
25 KERNEL_SUFFIX
:= -fit-uImage.itb
26 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
30 define Device
/FitzImage
31 KERNEL_SUFFIX
:= -fit-zImage.itb
32 KERNEL
= kernel-bin | fit none
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
38 IMAGES
:= nand-factory.ubi nand-sysupgrade.bin
39 IMAGE
/nand-factory.ubi
:= append-ubi
40 IMAGE
/nand-sysupgrade.bin
:= sysupgrade-tar | append-metadata
43 define Device
/DniImage
44 KERNEL_SUFFIX
:= -fit-uImage.itb
45 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
49 IMAGES
:= factory.img sysupgrade.bin
50 IMAGE
/factory.img
:= append-kernel | pad-offset
64k
64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni
51 IMAGE
/sysupgrade.bin
:= append-kernel | pad-offset
64k
64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | append-metadata
53 DEVICE_VARS
+= NETGEAR_BOARD_ID NETGEAR_HW_ID
56 -$(STAGING_DIR_HOST
)/bin
/mksenaofw \
57 -n
$(BOARD_NAME
) -r
$(VENDOR_ID
) -p
$(1) \
58 -c
$(DATECODE
) -w
$(2) -x
$(CW_VER
) -t
0 \
64 define Device
/8dev_jalapeno-common
65 $(call Device
/FitImage
)
72 define Device
/8dev_jalapeno
73 $(call Device
/8dev_jalapeno-common
)
74 DEVICE_VENDOR
:= 8devices
75 DEVICE_MODEL
:= Jalapeno
77 TARGET_DEVICES
+= 8dev_jalapeno
79 define Device
/alfa-network_ap120c-ac
80 $(call Device
/FitImage
)
82 DEVICE_VENDOR
:= ALFA Network
83 DEVICE_MODEL
:= AP120C-AC
85 DEVICE_PACKAGES
:= kmod-usb-acm \
86 kmod-tpm-i2c-atmel uboot-envtools
90 IMAGES
:= nand-factory.bin nand-sysupgrade.bin
91 IMAGE
/nand-factory.bin
:= append-ubi | qsdk-ipq-factory-nand
93 TARGET_DEVICES
+= alfa-network_ap120c-ac
95 define Device
/aruba_ap-303
96 $(call Device
/FitImageLzma
)
97 DEVICE_VENDOR
:= Aruba
98 DEVICE_MODEL
:= AP-303
100 DEVICE_PACKAGES
:= ipq-wifi-aruba_ap-303
101 IMAGES
:= sysupgrade.bin
103 TARGET_DEVICES
+= aruba_ap-303
105 define Device
/aruba_ap-303h
106 $(call Device
/FitImageLzma
)
107 DEVICE_VENDOR
:= Aruba
108 DEVICE_MODEL
:= AP-303H
110 DEVICE_PACKAGES
:= ipq-wifi-aruba_ap-303
111 IMAGES
:= sysupgrade.bin
113 TARGET_DEVICES
+= aruba_ap-303h
115 define Device
/asus_map-ac2200
116 $(call Device
/FitImageLzma
)
117 DEVICE_VENDOR
:= ASUS
118 DEVICE_MODEL
:= Lyra
(MAP-AC2200
)
120 IMAGES
:= sysupgrade.bin
121 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct kmod-ath3k
123 TARGET_DEVICES
+= asus_map-ac2200
125 define Device
/asus_rt-ac58u
126 $(call Device
/FitImageLzma
)
127 DEVICE_VENDOR
:= ASUS
128 DEVICE_MODEL
:= RT-AC58U
133 IMAGE_SIZE
:= 20439364
134 FILESYSTEMS
:= squashfs
135 # Someone - in their infinite wisdom - decided to put the firmware
136 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
137 # Since u-boot works with strings we either need another fixup step
138 # to add a version... or we are very careful not to add '\0' into that
139 # string and call it a day.... Yeah, we do the latter!
140 UIMAGE_NAME
:=$(shell echo
-e
'\03\01\01\01RT-AC58U')
141 IMAGES
:= sysupgrade.bin
142 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
143 kmod-usb-ledtrig-usbport
145 TARGET_DEVICES
+= asus_rt-ac58u
147 define Device
/avm_fritzbox-4040
148 $(call Device
/FitImageLzma
)
150 DEVICE_MODEL
:= FRITZ
!Box
4040
152 BOARD_NAME
:= fritz4040
154 UBOOT_PATH
:= $(STAGING_DIR_IMAGE
)/uboot-fritz4040.bin
155 UBOOT_PARTITION_SIZE
:= 524288
156 IMAGES
= eva.bin sysupgrade.bin
157 IMAGE
/eva.bin
:= append-uboot | pad-to
$$$$(UBOOT_PARTITION_SIZE
) | append-kernel | append-rootfs | pad-rootfs
158 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
159 DEVICE_PACKAGES
:= fritz-tffs fritz-caldata
161 TARGET_DEVICES
+= avm_fritzbox-4040
163 define Device
/avm_fritzbox-7530
164 $(call Device
/FitImageLzma
)
166 DEVICE_MODEL
:= FRITZ
!Box
7530
168 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand
169 IMAGES
:= sysupgrade.bin
171 TARGET_DEVICES
+= avm_fritzbox-7530
173 define Device
/avm_fritzrepeater-1200
174 $(call Device
/FitImageLzma
)
176 DEVICE_MODEL
:= FRITZ
!Repeater
1200
178 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
179 IMAGES
:= sysupgrade.bin
181 TARGET_DEVICES
+= avm_fritzrepeater-1200
183 define Device
/avm_fritzrepeater-3000
184 $(call Device
/FitImageLzma
)
186 DEVICE_MODEL
:= FRITZ
!Repeater
3000
188 DEVICE_PACKAGES
:= ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
189 IMAGES
:= sysupgrade.bin
191 TARGET_DEVICES
+= avm_fritzrepeater-3000
193 define Device
/cilab_meshpoint-one
194 $(call Device
/8dev_jalapeno-common
)
195 DEVICE_VENDOR
:= Crisis Innovation Lab
196 DEVICE_MODEL
:= MeshPoint.One
197 DEVICE_PACKAGES
:= kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
199 TARGET_DEVICES
+= cilab_meshpoint-one
201 define Device
/compex_wpj419
202 $(call Device
/FitImage
)
203 $(call Device
/UbiFit
)
204 DEVICE_VENDOR
:= Compex
205 DEVICE_MODEL
:= WPJ419
207 DEVICE_DTS_CONFIG
:= config@
12
211 FILESYSTEMS
:= squashfs
213 TARGET_DEVICES
+= compex_wpj419
215 define Device
/compex_wpj428
216 $(call Device
/FitImage
)
217 DEVICE_VENDOR
:= Compex
218 DEVICE_MODEL
:= WPJ428
220 DEVICE_DTS_CONFIG
:= config@
4
224 IMAGES
= sysupgrade.bin
225 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
226 DEVICE_PACKAGES
:= kmod-gpio-beeper
228 TARGET_DEVICES
+= compex_wpj428
230 define Device
/engenius_eap1300
231 $(call Device
/FitImage
)
232 DEVICE_VENDOR
:= EnGenius
233 DEVICE_MODEL
:= EAP1300
234 DEVICE_DTS_CONFIG
:= config@
4
235 BOARD_NAME
:= eap1300
239 IMAGES
:= sysupgrade.bin
240 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
242 TARGET_DEVICES
+= engenius_eap1300
244 define Device
/engenius_ens620ext
245 $(call Device
/FitImage
)
246 DEVICE_VENDOR
:= EnGenius
247 DEVICE_MODEL
:= ENS620EXT
249 DEVICE_DTS_CONFIG
:= config@
4
252 BOARD_NAME
:= ENS620EXT
255 PRODUCT_ID_NEW
:= 0xA4
262 FILESYSTEMS
:= squashfs
263 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
264 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
265 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
266 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
268 TARGET_DEVICES
+= engenius_ens620ext
270 define Device
/ezviz_cs-w3-wd1200g-eup
271 $(call Device
/FitImage
)
272 DEVICE_VENDOR
:= EZVIZ
273 DEVICE_MODEL
:= CS-W3-WD1200G
274 DEVICE_VARIANT
:= EUP
275 DEVICE_DTS_CONFIG
:= config@
4
278 IMAGES
:= sysupgrade.bin
279 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | \
281 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
282 ipq-wifi-ezviz_cs-w3-wd1200g-eup
284 TARGET_DEVICES
+= ezviz_cs-w3-wd1200g-eup
286 define Device
/glinet_gl-b1300
287 $(call Device
/FitImage
)
288 DEVICE_VENDOR
:= GL.iNet
289 DEVICE_MODEL
:= GL-B1300
290 BOARD_NAME
:= gl-b1300
294 IMAGES
:= sysupgrade.bin
295 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
297 TARGET_DEVICES
+= glinet_gl-b1300
299 define Device
/linksys_ea6350v3
300 # The Linksys EA6350v3 has a uboot bootloader that does not
301 # support either booting lzma kernel images nor booting UBI
302 # partitions. This uboot, however, supports raw kernel images and
305 # As for the time of writing this, the device will boot the kernel
306 # from a fixed address with a fixed length of 3MiB. Also, the
307 # device has a hard-coded kernel command line that requieres the
308 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
309 # Oh... and the kernel partition overlaps with the rootfs
310 # partition (the same for alt_kernel and alt_rootfs).
312 # If you are planing re-partitioning the device, you may want to
313 # keep those details in mind:
314 # 1. The kernel adresses you should honor are 0x00000000 and
315 # 0x02800000 respectively.
316 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
317 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
318 # 4. The kernel command line from uboot is harcoded to boot with
319 # rootfs either in mtd11 or mtd13.
320 $(call Device
/FitzImage
)
321 DEVICE_VENDOR
:= Linksys
322 DEVICE_MODEL
:= EA6350
330 IMAGES
:= factory.bin sysupgrade.bin
331 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
332 DEVICE_PACKAGES
:= uboot-envtools
334 TARGET_DEVICES
+= linksys_ea6350v3
336 define Device
/linksys_ea8300
337 $(call Device
/FitzImage
)
338 DEVICE_VENDOR
:= Linksys
339 DEVICE_MODEL
:= EA8300
345 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
346 IMAGES
:= sysupgrade.bin factory.bin
347 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
348 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
350 TARGET_DEVICES
+= linksys_ea8300
352 define Device
/meraki_mr33
353 $(call Device
/FitImage
)
354 DEVICE_VENDOR
:= Cisco Meraki
359 IMAGES
= sysupgrade.bin
360 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
362 TARGET_DEVICES
+= meraki_mr33
364 define Device
/netgear_ex61x0v2
365 $(call Device
/DniImage
)
366 DEVICE_DTS_CONFIG
:= config@
4
367 NETGEAR_BOARD_ID
:= EX6150v2series
368 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
372 define Device
/netgear_ex6100v2
373 $(call Device
/netgear_ex61x0v2
)
374 DEVICE_VENDOR
:= Netgear
375 DEVICE_MODEL
:= EX6100
378 TARGET_DEVICES
+= netgear_ex6100v2
380 define Device
/netgear_ex6150v2
381 $(call Device
/netgear_ex61x0v2
)
382 DEVICE_VENDOR
:= Netgear
383 DEVICE_MODEL
:= EX6150
386 TARGET_DEVICES
+= netgear_ex6150v2
388 define Device
/openmesh_a42
389 $(call Device
/FitImageLzma
)
390 DEVICE_VENDOR
:= OpenMesh
393 DEVICE_DTS_CONFIG
:= config@om.a42
395 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
397 IMAGES
= factory.bin sysupgrade.bin
398 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A42
399 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
400 DEVICE_PACKAGES
:= uboot-envtools
402 TARGET_DEVICES
+= openmesh_a42
404 define Device
/openmesh_a62
405 $(call Device
/FitImageLzma
)
406 DEVICE_VENDOR
:= OpenMesh
409 DEVICE_DTS_CONFIG
:= config@om.a62
411 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
413 IMAGES
= factory.bin sysupgrade.bin
414 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
415 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
416 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
419 TARGET_DEVICES
+= openmesh_a62
421 define Device
/qcom_ap-dk01.1
-c1
422 DEVICE_VENDOR
:= Qualcomm Atheros
423 DEVICE_MODEL
:= AP-DK01.1
425 BOARD_NAME
:= ap-dk01.1
-c1
427 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
431 $(call Device
/FitImage
)
432 IMAGES
:= sysupgrade.bin
433 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
435 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
437 define Device
/qcom_ap-dk04.1
-c1
438 $(call Device
/FitImage
)
439 $(call Device
/UbiFit
)
440 DEVICE_VENDOR
:= Qualcomm Atheros
441 DEVICE_MODEL
:= AP-DK04.1
444 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
449 BOARD_NAME
:= ap-dk04.1
-c1
451 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
453 define Device
/qxwlan_e2600ac-c1
454 $(call Device
/FitImage
)
455 DEVICE_VENDOR
:= Qxwlan
456 DEVICE_MODEL
:= E2600AC
458 BOARD_NAME
:= e2600ac-c1
462 IMAGES
:= sysupgrade.bin
463 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
464 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
466 TARGET_DEVICES
+= qxwlan_e2600ac-c1
468 define Device
/qxwlan_e2600ac-c2
469 $(call Device
/FitImage
)
470 $(call Device
/UbiFit
)
471 DEVICE_VENDOR
:= Qxwlan
472 DEVICE_MODEL
:= E2600AC
478 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
480 TARGET_DEVICES
+= qxwlan_e2600ac-c2
482 define Device
/unielec_u4019-32m
483 $(call Device
/FitImage
)
484 DEVICE_VENDOR
:= Unielec
485 DEVICE_MODEL
:= U4019
486 DEVICE_VARIANT
:= 32M
487 BOARD_NAME
:= u4019-32m
491 IMAGES
:= sysupgrade.bin
492 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
494 TARGET_DEVICES
+= unielec_u4019-32m
496 define Device
/zyxel_nbg6617
497 $(call Device
/FitImageLzma
)
498 DEVICE_VENDOR
:= ZyXEL
499 DEVICE_MODEL
:= NBG6617
501 ROOTFS_SIZE
:= 24960k
503 RAS_ROOTFS_SIZE
:= 19840k
504 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
505 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
506 IMAGES
:= sysupgrade.bin factory.bin
507 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
508 # at least as large as the one of the initial firmware image (not the current
509 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
510 # this minimum-size. However, the larger image can be flashed both ways.
511 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
512 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
513 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
515 TARGET_DEVICES
+= zyxel_nbg6617
517 define Device
/zyxel_wre6606
518 $(call Device
/FitImage
)
519 DEVICE_VENDOR
:= ZyXEL
520 DEVICE_MODEL
:= WRE6606
521 DEVICE_DTS_CONFIG
:= config@
4
523 IMAGES
:= sysupgrade.bin
524 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
525 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
527 TARGET_DEVICES
+= zyxel_wre6606
529 $(eval
$(call BuildImage
))