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
/asus_map-ac2200
106 $(call Device
/FitImageLzma
)
107 DEVICE_VENDOR
:= ASUS
108 DEVICE_MODEL
:= Lyra
(MAP-AC2200
)
110 IMAGES
:= sysupgrade.bin
111 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct kmod-ath3k
113 TARGET_DEVICES
+= asus_map-ac2200
115 define Device
/asus_rt-ac58u
116 $(call Device
/FitImageLzma
)
117 DEVICE_VENDOR
:= ASUS
118 DEVICE_MODEL
:= RT-AC58U
123 IMAGE_SIZE
:= 20439364
124 FILESYSTEMS
:= squashfs
125 # Someone - in their infinite wisdom - decided to put the firmware
126 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
127 # Since u-boot works with strings we either need another fixup step
128 # to add a version... or we are very careful not to add '\0' into that
129 # string and call it a day.... Yeah, we do the latter!
130 UIMAGE_NAME
:=$(shell echo
-e
'\03\01\01\01RT-AC58U')
131 IMAGES
:= sysupgrade.bin
132 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
133 kmod-usb-ledtrig-usbport
135 TARGET_DEVICES
+= asus_rt-ac58u
137 define Device
/avm_fritzbox-4040
138 $(call Device
/FitImageLzma
)
140 DEVICE_MODEL
:= FRITZ
!Box
4040
142 BOARD_NAME
:= fritz4040
144 UBOOT_PATH
:= $(STAGING_DIR_IMAGE
)/uboot-fritz4040.bin
145 UBOOT_PARTITION_SIZE
:= 524288
146 IMAGES
= eva.bin sysupgrade.bin
147 IMAGE
/eva.bin
:= append-uboot | pad-to
$$$$(UBOOT_PARTITION_SIZE
) | append-kernel | append-rootfs | pad-rootfs
148 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
149 DEVICE_PACKAGES
:= fritz-tffs fritz-caldata
151 TARGET_DEVICES
+= avm_fritzbox-4040
153 define Device
/avm_fritzbox-7530
154 $(call Device
/FitImageLzma
)
156 DEVICE_MODEL
:= FRITZ
!Box
7530
158 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand
159 IMAGES
:= sysupgrade.bin
161 TARGET_DEVICES
+= avm_fritzbox-7530
163 define Device
/avm_fritzrepeater-1200
164 $(call Device
/FitImageLzma
)
166 DEVICE_MODEL
:= FRITZ
!Repeater
1200
168 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
169 IMAGES
:= sysupgrade.bin
171 TARGET_DEVICES
+= avm_fritzrepeater-1200
173 define Device
/avm_fritzrepeater-3000
174 $(call Device
/FitImageLzma
)
176 DEVICE_MODEL
:= FRITZ
!Repeater
3000
178 DEVICE_PACKAGES
:= ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
179 IMAGES
:= sysupgrade.bin
181 TARGET_DEVICES
+= avm_fritzrepeater-3000
183 define Device
/cilab_meshpoint-one
184 $(call Device
/8dev_jalapeno-common
)
185 DEVICE_VENDOR
:= Crisis Innovation Lab
186 DEVICE_MODEL
:= MeshPoint.One
187 DEVICE_PACKAGES
:= kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
189 TARGET_DEVICES
+= cilab_meshpoint-one
191 define Device
/compex_wpj419
192 $(call Device
/FitImage
)
193 $(call Device
/UbiFit
)
194 DEVICE_VENDOR
:= Compex
195 DEVICE_MODEL
:= WPJ419
197 DEVICE_DTS_CONFIG
:= config@
12
201 FILESYSTEMS
:= squashfs
203 TARGET_DEVICES
+= compex_wpj419
205 define Device
/compex_wpj428
206 $(call Device
/FitImage
)
207 DEVICE_VENDOR
:= Compex
208 DEVICE_MODEL
:= WPJ428
210 DEVICE_DTS_CONFIG
:= config@
4
214 IMAGES
= sysupgrade.bin
215 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
216 DEVICE_PACKAGES
:= kmod-gpio-beeper
218 TARGET_DEVICES
+= compex_wpj428
220 define Device
/engenius_eap1300
221 $(call Device
/FitImage
)
222 DEVICE_VENDOR
:= EnGenius
223 DEVICE_MODEL
:= EAP1300
224 DEVICE_DTS_CONFIG
:= config@
4
225 BOARD_NAME
:= eap1300
229 IMAGES
:= sysupgrade.bin
230 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
232 TARGET_DEVICES
+= engenius_eap1300
234 define Device
/engenius_ens620ext
235 $(call Device
/FitImage
)
236 DEVICE_VENDOR
:= EnGenius
237 DEVICE_MODEL
:= ENS620EXT
239 DEVICE_DTS_CONFIG
:= config@
4
242 BOARD_NAME
:= ENS620EXT
245 PRODUCT_ID_NEW
:= 0xA4
252 FILESYSTEMS
:= squashfs
253 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
254 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
255 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
256 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
258 TARGET_DEVICES
+= engenius_ens620ext
260 define Device
/ezviz_cs-w3-wd1200g-eup
261 $(call Device
/FitImage
)
262 DEVICE_VENDOR
:= EZVIZ
263 DEVICE_MODEL
:= CS-W3-WD1200G
264 DEVICE_VARIANT
:= EUP
265 DEVICE_DTS_CONFIG
:= config@
4
268 IMAGES
:= sysupgrade.bin
269 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | \
271 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
272 ipq-wifi-ezviz_cs-w3-wd1200g-eup
274 TARGET_DEVICES
+= ezviz_cs-w3-wd1200g-eup
276 define Device
/glinet_gl-b1300
277 $(call Device
/FitImage
)
278 DEVICE_VENDOR
:= GL.iNet
279 DEVICE_MODEL
:= GL-B1300
280 BOARD_NAME
:= gl-b1300
284 IMAGES
:= sysupgrade.bin
285 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
287 TARGET_DEVICES
+= glinet_gl-b1300
289 define Device
/linksys_ea6350v3
290 # The Linksys EA6350v3 has a uboot bootloader that does not
291 # support either booting lzma kernel images nor booting UBI
292 # partitions. This uboot, however, supports raw kernel images and
295 # As for the time of writing this, the device will boot the kernel
296 # from a fixed address with a fixed length of 3MiB. Also, the
297 # device has a hard-coded kernel command line that requieres the
298 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
299 # Oh... and the kernel partition overlaps with the rootfs
300 # partition (the same for alt_kernel and alt_rootfs).
302 # If you are planing re-partitioning the device, you may want to
303 # keep those details in mind:
304 # 1. The kernel adresses you should honor are 0x00000000 and
305 # 0x02800000 respectively.
306 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
307 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
308 # 4. The kernel command line from uboot is harcoded to boot with
309 # rootfs either in mtd11 or mtd13.
310 $(call Device
/FitzImage
)
311 DEVICE_VENDOR
:= Linksys
312 DEVICE_MODEL
:= EA6350
320 IMAGES
:= factory.bin sysupgrade.bin
321 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
322 DEVICE_PACKAGES
:= uboot-envtools
324 TARGET_DEVICES
+= linksys_ea6350v3
326 define Device
/linksys_ea8300
327 $(call Device
/FitzImage
)
328 DEVICE_VENDOR
:= Linksys
329 DEVICE_MODEL
:= EA8300
335 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
336 IMAGES
:= sysupgrade.bin factory.bin
337 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
338 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
340 TARGET_DEVICES
+= linksys_ea8300
342 define Device
/meraki_mr33
343 $(call Device
/FitImage
)
344 DEVICE_VENDOR
:= Cisco Meraki
349 IMAGES
= sysupgrade.bin
350 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
352 TARGET_DEVICES
+= meraki_mr33
354 define Device
/netgear_ex61x0v2
355 $(call Device
/DniImage
)
356 DEVICE_DTS_CONFIG
:= config@
4
357 NETGEAR_BOARD_ID
:= EX6150v2series
358 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
362 define Device
/netgear_ex6100v2
363 $(call Device
/netgear_ex61x0v2
)
364 DEVICE_VENDOR
:= Netgear
365 DEVICE_MODEL
:= EX6100
368 TARGET_DEVICES
+= netgear_ex6100v2
370 define Device
/netgear_ex6150v2
371 $(call Device
/netgear_ex61x0v2
)
372 DEVICE_VENDOR
:= Netgear
373 DEVICE_MODEL
:= EX6150
376 TARGET_DEVICES
+= netgear_ex6150v2
378 define Device
/openmesh_a42
379 $(call Device
/FitImageLzma
)
380 DEVICE_VENDOR
:= OpenMesh
383 DEVICE_DTS_CONFIG
:= config@om.a42
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
=A42
389 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
390 DEVICE_PACKAGES
:= uboot-envtools
392 TARGET_DEVICES
+= openmesh_a42
394 define Device
/openmesh_a62
395 $(call Device
/FitImageLzma
)
396 DEVICE_VENDOR
:= OpenMesh
399 DEVICE_DTS_CONFIG
:= config@om.a62
401 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
403 IMAGES
= factory.bin sysupgrade.bin
404 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
405 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
406 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
409 TARGET_DEVICES
+= openmesh_a62
411 define Device
/qcom_ap-dk01.1
-c1
412 DEVICE_VENDOR
:= Qualcomm Atheros
413 DEVICE_MODEL
:= AP-DK01.1
415 BOARD_NAME
:= ap-dk01.1
-c1
417 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
421 $(call Device
/FitImage
)
422 IMAGES
:= sysupgrade.bin
423 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
425 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
427 define Device
/qcom_ap-dk04.1
-c1
428 $(call Device
/FitImage
)
429 $(call Device
/UbiFit
)
430 DEVICE_VENDOR
:= Qualcomm Atheros
431 DEVICE_MODEL
:= AP-DK04.1
434 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
439 BOARD_NAME
:= ap-dk04.1
-c1
441 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
443 define Device
/qxwlan_e2600ac-c1
444 $(call Device
/FitImage
)
445 DEVICE_VENDOR
:= Qxwlan
446 DEVICE_MODEL
:= E2600AC
448 BOARD_NAME
:= e2600ac-c1
452 IMAGES
:= sysupgrade.bin
453 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
454 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
456 TARGET_DEVICES
+= qxwlan_e2600ac-c1
458 define Device
/qxwlan_e2600ac-c2
459 $(call Device
/FitImage
)
460 $(call Device
/UbiFit
)
461 DEVICE_VENDOR
:= Qxwlan
462 DEVICE_MODEL
:= E2600AC
468 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
470 TARGET_DEVICES
+= qxwlan_e2600ac-c2
472 define Device
/unielec_u4019-32m
473 $(call Device
/FitImage
)
474 DEVICE_VENDOR
:= Unielec
475 DEVICE_MODEL
:= U4019
476 DEVICE_VARIANT
:= 32M
477 BOARD_NAME
:= u4019-32m
481 IMAGES
:= sysupgrade.bin
482 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
484 TARGET_DEVICES
+= unielec_u4019-32m
486 define Device
/zyxel_nbg6617
487 $(call Device
/FitImageLzma
)
488 DEVICE_VENDOR
:= ZyXEL
489 DEVICE_MODEL
:= NBG6617
491 ROOTFS_SIZE
:= 24960k
493 RAS_ROOTFS_SIZE
:= 19840k
494 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
495 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
496 IMAGES
:= sysupgrade.bin factory.bin
497 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
498 # at least as large as the one of the initial firmware image (not the current
499 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
500 # this minimum-size. However, the larger image can be flashed both ways.
501 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
502 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
503 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
505 TARGET_DEVICES
+= zyxel_nbg6617
507 define Device
/zyxel_wre6606
508 $(call Device
/FitImage
)
509 DEVICE_VENDOR
:= ZyXEL
510 DEVICE_MODEL
:= WRE6606
511 DEVICE_DTS_CONFIG
:= config@
4
513 IMAGES
:= sysupgrade.bin
514 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
515 DEVICE_PACKAGES
:= -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
517 TARGET_DEVICES
+= zyxel_wre6606
519 $(eval
$(call BuildImage
))