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 SUPPORTED_DEVICES
:= $(subst _
,$(comma
),$(1))
13 IMAGE
/sysupgrade.bin
= sysupgrade-tar | append-metadata
14 IMAGE
/sysupgrade.bin
/squashfs
:=
17 define Device
/FitImage
18 KERNEL_SUFFIX
:= -fit-uImage.itb
19 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
23 define Device
/FitImageLzma
24 KERNEL_SUFFIX
:= -fit-uImage.itb
25 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
29 define Device
/FitzImage
30 KERNEL_SUFFIX
:= -fit-zImage.itb
31 KERNEL
= kernel-bin | fit none
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
37 IMAGES
:= nand-factory.ubi nand-sysupgrade.bin
38 IMAGE
/nand-factory.ubi
:= append-ubi
39 IMAGE
/nand-sysupgrade.bin
:= sysupgrade-tar | append-metadata
42 define Device
/DniImage
43 KERNEL_SUFFIX
:= -fit-uImage.itb
44 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
48 IMAGES
:= factory.img sysupgrade.bin
49 IMAGE
/factory.img
:= append-kernel | pad-offset
64k
64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni
50 IMAGE
/sysupgrade.bin
:= append-kernel | pad-offset
64k
64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | append-metadata
52 DEVICE_VARS
+= NETGEAR_BOARD_ID NETGEAR_HW_ID
55 -$(STAGING_DIR_HOST
)/bin
/mksenaofw \
56 -n
$(BOARD_NAME
) -r
$(VENDOR_ID
) -p
$(1) \
57 -c
$(DATECODE
) -w
$(2) -x
$(CW_VER
) -t
0 \
63 define Device
/8dev_jalapeno-common
64 $(call Device
/FitImage
)
70 define Device
/8dev_jalapeno
71 $(call Device
/8dev_jalapeno-common
)
72 DEVICE_VENDOR
:= 8devices
73 DEVICE_MODEL
:= Jalapeno
74 DEVICE_DTS
:= qcom-ipq4018-jalapeno
76 TARGET_DEVICES
+= 8dev_jalapeno
78 define Device
/alfa-network_ap120c-ac
79 $(call Device
/FitImage
)
81 DEVICE_VENDOR
:= ALFA Network
82 DEVICE_MODEL
:= AP120C-AC
83 DEVICE_DTS
:= qcom-ipq4018-ap120c-ac
84 DEVICE_PACKAGES
:= kmod-usb-acm \
85 kmod-tpm-i2c-atmel uboot-envtools
89 IMAGES
:= nand-factory.bin nand-sysupgrade.bin
90 IMAGE
/nand-factory.bin
:= append-ubi | qsdk-ipq-factory-nand
92 TARGET_DEVICES
+= alfa-network_ap120c-ac
94 define Device
/aruba_ap-303
95 $(call Device
/FitImageLzma
)
96 DEVICE_VENDOR
:= Aruba
97 DEVICE_MODEL
:= AP-303
98 DEVICE_DTS
:= qcom-ipq4029-ap-303
99 DEVICE_PACKAGES
:= ipq-wifi-aruba_ap-303
100 IMAGES
:= sysupgrade.bin
102 TARGET_DEVICES
+= aruba_ap-303
104 define Device
/asus_map-ac2200
105 $(call Device
/FitImageLzma
)
106 DEVICE_VENDOR
:= ASUS
107 DEVICE_MODEL
:= Lyra
(MAP-AC2200
)
108 DEVICE_DTS
:= qcom-ipq4019-map-ac2200
109 IMAGES
:= sysupgrade.bin
110 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct kmod-ath3k
112 TARGET_DEVICES
+= asus_map-ac2200
114 define Device
/asus_rt-ac58u
115 $(call Device
/FitImageLzma
)
116 DEVICE_VENDOR
:= ASUS
117 DEVICE_MODEL
:= RT-AC58U
118 DEVICE_DTS
:= qcom-ipq4018-rt-ac58u
122 IMAGE_SIZE
:= 20439364
123 FILESYSTEMS
:= squashfs
124 # Someone - in their infinite wisdom - decided to put the firmware
125 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
126 # Since u-boot works with strings we either need another fixup step
127 # to add a version... or we are very careful not to add '\0' into that
128 # string and call it a day.... Yeah, we do the latter!
129 UIMAGE_NAME
:=$(shell echo
-e
'\03\01\01\01RT-AC58U')
130 IMAGES
:= sysupgrade.bin
131 DEVICE_PACKAGES
:= kmod-usb-ledtrig-usbport
133 TARGET_DEVICES
+= asus_rt-ac58u
135 define Device
/avm_fritzbox-4040
136 $(call Device
/FitImageLzma
)
138 DEVICE_MODEL
:= FRITZ
!Box
4040
139 DEVICE_DTS
:= qcom-ipq4018-fritz4040
140 BOARD_NAME
:= fritz4040
142 UBOOT_PATH
:= $(STAGING_DIR_IMAGE
)/uboot-fritz4040.bin
143 UBOOT_PARTITION_SIZE
:= 524288
144 IMAGES
= eva.bin sysupgrade.bin
145 IMAGE
/eva.bin
:= append-uboot | pad-to
$$$$(UBOOT_PARTITION_SIZE
) | append-kernel | append-rootfs | pad-rootfs
146 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
147 DEVICE_PACKAGES
:= fritz-tffs fritz-caldata
149 TARGET_DEVICES
+= avm_fritzbox-4040
151 define Device
/avm_fritzbox-7530
152 $(call Device
/FitImageLzma
)
154 DEVICE_MODEL
:= FRITZ
!Box
7530
155 DEVICE_DTS
:= qcom-ipq4019-fritzbox-7530
156 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand
157 IMAGES
:= sysupgrade.bin
159 TARGET_DEVICES
+= avm_fritzbox-7530
161 define Device
/avm_fritzrepeater-1200
162 $(call Device
/FitImageLzma
)
164 DEVICE_MODEL
:= FRITZ
!Repeater
1200
165 DEVICE_DTS
:= qcom-ipq4019-fritzrepeater-1200
166 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
167 IMAGES
:= sysupgrade.bin
169 TARGET_DEVICES
+= avm_fritzrepeater-1200
171 define Device
/avm_fritzrepeater-3000
172 $(call Device
/FitImageLzma
)
174 DEVICE_MODEL
:= FRITZ
!Repeater
3000
175 DEVICE_DTS
:= qcom-ipq4019-fritzrepeater-3000
176 DEVICE_PACKAGES
:= ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
177 IMAGES
:= sysupgrade.bin
179 TARGET_DEVICES
+= avm_fritzrepeater-3000
181 define Device
/cilab_meshpoint-one
182 $(call Device
/8dev_jalapeno-common
)
183 DEVICE_DTS
:= qcom-ipq4018-meshpoint-one
184 DEVICE_VENDOR
:= Crisis Innovation Lab
185 DEVICE_MODEL
:= MeshPoint.One
186 DEVICE_PACKAGES
:= kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
188 TARGET_DEVICES
+= cilab_meshpoint-one
190 define Device
/compex_wpj419
191 $(call Device
/FitImage
)
192 $(call Device
/UbiFit
)
193 DEVICE_VENDOR
:= Compex
194 DEVICE_MODEL
:= WPJ419
195 DEVICE_DTS
:= qcom-ipq4019-wpj419
196 DEVICE_DTS_CONFIG
:= config@
12
200 FILESYSTEMS
:= squashfs
202 TARGET_DEVICES
+= compex_wpj419
204 define Device
/compex_wpj428
205 $(call Device
/FitImage
)
206 DEVICE_VENDOR
:= Compex
207 DEVICE_MODEL
:= WPJ428
208 DEVICE_DTS
:= qcom-ipq4028-wpj428
209 DEVICE_DTS_CONFIG
:= config@
4
213 IMAGES
= sysupgrade.bin
214 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
215 DEVICE_PACKAGES
:= kmod-gpio-beeper
217 TARGET_DEVICES
+= compex_wpj428
219 define Device
/engenius_eap1300
220 $(call Device
/FitImage
)
221 DEVICE_VENDOR
:= EnGenius
222 DEVICE_MODEL
:= EAP1300
223 DEVICE_DTS_CONFIG
:= config@
4
224 BOARD_NAME
:= eap1300
225 DEVICE_DTS
:= qcom-ipq4018-eap1300
228 IMAGES
:= sysupgrade.bin
229 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
231 TARGET_DEVICES
+= engenius_eap1300
233 define Device
/engenius_ens620ext
234 $(call Device
/FitImage
)
235 DEVICE_VENDOR
:= EnGenius
236 DEVICE_MODEL
:= ENS620EXT
237 DEVICE_DTS
:= qcom-ipq4018-ens620ext
238 DEVICE_DTS_CONFIG
:= config@
4
241 BOARD_NAME
:= ENS620EXT
244 PRODUCT_ID_NEW
:= 0xA4
251 FILESYSTEMS
:= squashfs
252 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
253 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
254 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
255 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
257 TARGET_DEVICES
+= engenius_ens620ext
259 define Device
/glinet_gl-b1300
260 $(call Device
/FitImage
)
261 DEVICE_VENDOR
:= GL.iNet
262 DEVICE_MODEL
:= GL-B1300
263 BOARD_NAME
:= gl-b1300
264 DEVICE_DTS
:= qcom-ipq4029-gl-b1300
267 IMAGES
:= sysupgrade.bin
268 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
270 TARGET_DEVICES
+= glinet_gl-b1300
272 define Device
/linksys_ea6350v3
273 # The Linksys EA6350v3 has a uboot bootloader that does not
274 # support either booting lzma kernel images nor booting UBI
275 # partitions. This uboot, however, supports raw kernel images and
278 # As for the time of writing this, the device will boot the kernel
279 # from a fixed address with a fixed length of 3MiB. Also, the
280 # device has a hard-coded kernel command line that requieres the
281 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
282 # Oh... and the kernel partition overlaps with the rootfs
283 # partition (the same for alt_kernel and alt_rootfs).
285 # If you are planing re-partitioning the device, you may want to
286 # keep those details in mind:
287 # 1. The kernel adresses you should honor are 0x00000000 and
288 # 0x02800000 respectively.
289 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
290 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
291 # 4. The kernel command line from uboot is harcoded to boot with
292 # rootfs either in mtd11 or mtd13.
293 $(call Device
/FitzImage
)
294 DEVICE_VENDOR
:= Linksys
295 DEVICE_MODEL
:= EA6350
297 DEVICE_DTS
:= qcom-ipq4018-ea6350v3
303 IMAGES
:= factory.bin sysupgrade.bin
304 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
305 DEVICE_PACKAGES
:= uboot-envtools
307 TARGET_DEVICES
+= linksys_ea6350v3
309 define Device
/linksys_ea8300
310 $(call Device
/FitzImage
)
311 DEVICE_VENDOR
:= Linksys
312 DEVICE_MODEL
:= EA8300
313 DEVICE_DTS
:= qcom-ipq4019-linksys_ea8300
318 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
319 IMAGES
:= sysupgrade.bin factory.bin
320 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
321 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
323 TARGET_DEVICES
+= linksys_ea8300
325 define Device
/meraki_mr33
326 $(call Device
/FitImage
)
327 DEVICE_VENDOR
:= Cisco Meraki
329 DEVICE_DTS
:= qcom-ipq4029-mr33
332 IMAGES
= sysupgrade.bin
333 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
335 TARGET_DEVICES
+= meraki_mr33
337 define Device
/netgear_ex61x0v2
338 $(call Device
/DniImage
)
339 DEVICE_DTS_CONFIG
:= config@
4
340 NETGEAR_BOARD_ID
:= EX6150v2series
341 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
344 define Device
/netgear_ex6100v2
345 $(call Device
/netgear_ex61x0v2
)
346 DEVICE_VENDOR
:= Netgear
347 DEVICE_MODEL
:= EX6100
349 DEVICE_DTS
:= qcom-ipq4018-ex6100v2
351 TARGET_DEVICES
+= netgear_ex6100v2
353 define Device
/netgear_ex6150v2
354 $(call Device
/netgear_ex61x0v2
)
355 DEVICE_VENDOR
:= Netgear
356 DEVICE_MODEL
:= EX6150
358 DEVICE_DTS
:= qcom-ipq4018-ex6150v2
360 TARGET_DEVICES
+= netgear_ex6150v2
362 define Device
/openmesh_a42
363 $(call Device
/FitImageLzma
)
364 DEVICE_VENDOR
:= OpenMesh
366 DEVICE_DTS
:= qcom-ipq4018-a42
367 DEVICE_DTS_CONFIG
:= config@om.a42
369 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
371 IMAGES
= factory.bin sysupgrade.bin
372 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A42
373 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
374 DEVICE_PACKAGES
:= uboot-envtools
376 TARGET_DEVICES
+= openmesh_a42
378 define Device
/openmesh_a62
379 $(call Device
/FitImageLzma
)
380 DEVICE_VENDOR
:= OpenMesh
382 DEVICE_DTS
:= qcom-ipq4019-a62
383 DEVICE_DTS_CONFIG
:= config@om.a62
385 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
387 IMAGES
= factory.bin sysupgrade.bin
388 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
389 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
390 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
393 TARGET_DEVICES
+= openmesh_a62
395 define Device
/qcom_ap-dk01.1
-c1
396 DEVICE_VENDOR
:= Qualcomm Atheros
397 DEVICE_MODEL
:= AP-DK01.1
399 BOARD_NAME
:= ap-dk01.1
-c1
400 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
404 $(call Device
/FitImage
)
405 IMAGES
:= sysupgrade.bin
406 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
408 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
410 define Device
/qcom_ap-dk04.1
-c1
411 $(call Device
/FitImage
)
412 $(call Device
/UbiFit
)
413 DEVICE_VENDOR
:= Qualcomm Atheros
414 DEVICE_MODEL
:= AP-DK04.1
416 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
421 BOARD_NAME
:= ap-dk04.1
-c1
423 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
425 define Device
/qxwlan_e2600ac-c1
426 $(call Device
/FitImage
)
427 DEVICE_VENDOR
:= Qxwlan
428 DEVICE_MODEL
:= E2600AC
430 BOARD_NAME
:= e2600ac-c1
431 DEVICE_DTS
:= qcom-ipq4019-qxwlan-e2600ac-c1
434 IMAGES
:= sysupgrade.bin
435 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
436 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
438 TARGET_DEVICES
+= qxwlan_e2600ac-c1
440 define Device
/qxwlan_e2600ac-c2
441 $(call Device
/FitImage
)
442 $(call Device
/UbiFit
)
443 DEVICE_VENDOR
:= Qxwlan
444 DEVICE_MODEL
:= E2600AC
446 DEVICE_DTS
:= qcom-ipq4019-qxwlan-e2600ac-c2
450 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
452 TARGET_DEVICES
+= qxwlan_e2600ac-c2
454 define Device
/unielec_u4019-32m
455 $(call Device
/FitImage
)
456 DEVICE_VENDOR
:= Unielec
457 DEVICE_MODEL
:= U4019
458 DEVICE_VARIANT
:= 32M
459 BOARD_NAME
:= u4019-32m
460 DEVICE_DTS
:= qcom-ipq4019-unielec-u4019-32m
463 IMAGES
:= sysupgrade.bin
464 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
466 TARGET_DEVICES
+= unielec_u4019-32m
468 define Device
/zyxel_nbg6617
469 $(call Device
/FitImageLzma
)
470 DEVICE_VENDOR
:= ZyXEL
471 DEVICE_MODEL
:= NBG6617
472 DEVICE_DTS
:= qcom-ipq4018-nbg6617
473 ROOTFS_SIZE
:= 24960k
475 RAS_ROOTFS_SIZE
:= 19840k
476 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
477 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
478 IMAGES
:= sysupgrade.bin factory.bin
479 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
480 # at least as large as the one of the initial firmware image (not the current
481 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
482 # this minimum-size. However, the larger image can be flashed both ways.
483 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
484 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
485 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
487 TARGET_DEVICES
+= zyxel_nbg6617
489 define Device
/zyxel_wre6606
490 $(call Device
/FitImage
)
491 DEVICE_VENDOR
:= ZyXEL
492 DEVICE_MODEL
:= WRE6606
493 DEVICE_DTS_CONFIG
:= config@
4
494 DEVICE_DTS
:= qcom-ipq4018-wre6606
495 IMAGES
:= sysupgrade.bin
496 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
498 TARGET_DEVICES
+= zyxel_wre6606
500 $(eval
$(call BuildImage
))