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
/asus_map-ac2200
95 $(call Device
/FitImageLzma
)
97 DEVICE_MODEL
:= Lyra
(MAP-AC2200
)
98 DEVICE_DTS
:= qcom-ipq4019-map-ac2200
99 IMAGES
:= sysupgrade.bin
100 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct kmod-ath3k
102 TARGET_DEVICES
+= asus_map-ac2200
104 define Device
/asus_rt-ac58u
105 $(call Device
/FitImageLzma
)
106 DEVICE_VENDOR
:= ASUS
107 DEVICE_MODEL
:= RT-AC58U
108 DEVICE_DTS
:= qcom-ipq4018-rt-ac58u
112 IMAGE_SIZE
:= 20439364
113 FILESYSTEMS
:= squashfs
114 # Someone - in their infinite wisdom - decided to put the firmware
115 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
116 # Since u-boot works with strings we either need another fixup step
117 # to add a version... or we are very careful not to add '\0' into that
118 # string and call it a day.... Yeah, we do the latter!
119 UIMAGE_NAME
:=$(shell echo
-e
'\03\01\01\01RT-AC58U')
120 IMAGES
:= sysupgrade.bin
121 DEVICE_PACKAGES
:= kmod-usb-ledtrig-usbport
123 TARGET_DEVICES
+= asus_rt-ac58u
125 define Device
/avm_fritzbox-4040
126 $(call Device
/FitImageLzma
)
128 DEVICE_MODEL
:= FRITZ
!Box
4040
129 DEVICE_DTS
:= qcom-ipq4018-fritz4040
130 BOARD_NAME
:= fritz4040
132 UBOOT_PATH
:= $(STAGING_DIR_IMAGE
)/uboot-fritz4040.bin
133 UBOOT_PARTITION_SIZE
:= 524288
134 IMAGES
= eva.bin sysupgrade.bin
135 IMAGE
/eva.bin
:= append-uboot | pad-to
$$$$(UBOOT_PARTITION_SIZE
) | append-kernel | append-rootfs | pad-rootfs
136 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
137 DEVICE_PACKAGES
:= fritz-tffs fritz-caldata
139 TARGET_DEVICES
+= avm_fritzbox-4040
141 define Device
/avm_fritzbox-7530
142 $(call Device
/FitImageLzma
)
144 DEVICE_MODEL
:= FRITZ
!Box
7530
145 DEVICE_DTS
:= qcom-ipq4019-fritzbox-7530
146 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand
147 IMAGES
:= sysupgrade.bin
149 TARGET_DEVICES
+= avm_fritzbox-7530
151 define Device
/avm_fritzrepeater-1200
152 $(call Device
/FitImageLzma
)
154 DEVICE_MODEL
:= FRITZ
!Repeater
1200
155 DEVICE_DTS
:= qcom-ipq4019-fritzrepeater-1200
156 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand ipq-wifi-avm_fritzrepeater-1200
157 IMAGES
:= sysupgrade.bin
159 TARGET_DEVICES
+= avm_fritzrepeater-1200
161 define Device
/avm_fritzrepeater-3000
162 $(call Device
/FitImageLzma
)
164 DEVICE_MODEL
:= FRITZ
!Repeater
3000
165 DEVICE_DTS
:= qcom-ipq4019-fritzrepeater-3000
166 DEVICE_PACKAGES
:= ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
167 IMAGES
:= sysupgrade.bin
169 TARGET_DEVICES
+= avm_fritzrepeater-3000
171 define Device
/cilab_meshpoint-one
172 $(call Device
/8dev_jalapeno-common
)
173 DEVICE_DTS
:= qcom-ipq4018-meshpoint-one
174 DEVICE_VENDOR
:= Crisis Innovation Lab
175 DEVICE_MODEL
:= MeshPoint.One
176 DEVICE_PACKAGES
:= kmod-i2c-gpio kmod-iio-bmp280-i2c kmod-hwmon-ina2xx kmod-rtc-pcf2127
178 TARGET_DEVICES
+= cilab_meshpoint-one
180 define Device
/compex_wpj419
181 $(call Device
/FitImage
)
182 $(call Device
/UbiFit
)
183 DEVICE_VENDOR
:= Compex
184 DEVICE_MODEL
:= WPJ419
185 DEVICE_DTS
:= qcom-ipq4019-wpj419
186 DEVICE_DTS_CONFIG
:= config@
12
190 FILESYSTEMS
:= squashfs
192 TARGET_DEVICES
+= compex_wpj419
194 define Device
/compex_wpj428
195 $(call Device
/FitImage
)
196 DEVICE_VENDOR
:= Compex
197 DEVICE_MODEL
:= WPJ428
198 DEVICE_DTS
:= qcom-ipq4028-wpj428
199 DEVICE_DTS_CONFIG
:= config@
4
203 IMAGES
= sysupgrade.bin
204 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
205 DEVICE_PACKAGES
:= kmod-gpio-beeper
207 TARGET_DEVICES
+= compex_wpj428
209 define Device
/engenius_eap1300
210 $(call Device
/FitImage
)
211 DEVICE_VENDOR
:= EnGenius
212 DEVICE_MODEL
:= EAP1300
213 DEVICE_DTS_CONFIG
:= config@
4
214 BOARD_NAME
:= eap1300
215 DEVICE_DTS
:= qcom-ipq4018-eap1300
218 IMAGES
:= sysupgrade.bin
219 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
221 TARGET_DEVICES
+= engenius_eap1300
223 define Device
/engenius_ens620ext
224 $(call Device
/FitImage
)
225 DEVICE_VENDOR
:= EnGenius
226 DEVICE_MODEL
:= ENS620EXT
227 DEVICE_DTS
:= qcom-ipq4018-ens620ext
228 DEVICE_DTS_CONFIG
:= config@
4
231 BOARD_NAME
:= ENS620EXT
234 PRODUCT_ID_NEW
:= 0xA4
241 FILESYSTEMS
:= squashfs
242 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
243 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
244 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
245 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
247 TARGET_DEVICES
+= engenius_ens620ext
249 define Device
/glinet_gl-b1300
250 $(call Device
/FitImage
)
251 DEVICE_VENDOR
:= GL.iNet
252 DEVICE_MODEL
:= GL-B1300
253 BOARD_NAME
:= gl-b1300
254 DEVICE_DTS
:= qcom-ipq4029-gl-b1300
257 IMAGES
:= sysupgrade.bin
258 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
260 TARGET_DEVICES
+= glinet_gl-b1300
262 define Device
/linksys_ea6350v3
263 # The Linksys EA6350v3 has a uboot bootloader that does not
264 # support either booting lzma kernel images nor booting UBI
265 # partitions. This uboot, however, supports raw kernel images and
268 # As for the time of writing this, the device will boot the kernel
269 # from a fixed address with a fixed length of 3MiB. Also, the
270 # device has a hard-coded kernel command line that requieres the
271 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
272 # Oh... and the kernel partition overlaps with the rootfs
273 # partition (the same for alt_kernel and alt_rootfs).
275 # If you are planing re-partitioning the device, you may want to
276 # keep those details in mind:
277 # 1. The kernel adresses you should honor are 0x00000000 and
278 # 0x02800000 respectively.
279 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
280 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
281 # 4. The kernel command line from uboot is harcoded to boot with
282 # rootfs either in mtd11 or mtd13.
283 $(call Device
/FitzImage
)
284 DEVICE_VENDOR
:= Linksys
285 DEVICE_MODEL
:= EA6350
287 DEVICE_DTS
:= qcom-ipq4018-ea6350v3
293 IMAGES
:= factory.bin sysupgrade.bin
294 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
295 DEVICE_PACKAGES
:= uboot-envtools
297 TARGET_DEVICES
+= linksys_ea6350v3
299 define Device
/linksys_ea8300
300 $(call Device
/FitzImage
)
301 DEVICE_VENDOR
:= Linksys
302 DEVICE_MODEL
:= EA8300
303 DEVICE_DTS
:= qcom-ipq4019-linksys_ea8300
308 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
309 IMAGES
:= sysupgrade.bin factory.bin
310 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
311 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
313 TARGET_DEVICES
+= linksys_ea8300
315 define Device
/meraki_mr33
316 $(call Device
/FitImage
)
317 DEVICE_VENDOR
:= Cisco Meraki
319 DEVICE_DTS
:= qcom-ipq4029-mr33
322 IMAGES
= sysupgrade.bin
323 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
325 TARGET_DEVICES
+= meraki_mr33
327 define Device
/netgear_ex61x0v2
328 $(call Device
/DniImage
)
329 DEVICE_DTS_CONFIG
:= config@
4
330 NETGEAR_BOARD_ID
:= EX6150v2series
331 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
334 define Device
/netgear_ex6100v2
335 $(call Device
/netgear_ex61x0v2
)
336 DEVICE_VENDOR
:= Netgear
337 DEVICE_MODEL
:= EX6100
339 DEVICE_DTS
:= qcom-ipq4018-ex6100v2
341 TARGET_DEVICES
+= netgear_ex6100v2
343 define Device
/netgear_ex6150v2
344 $(call Device
/netgear_ex61x0v2
)
345 DEVICE_VENDOR
:= Netgear
346 DEVICE_MODEL
:= EX6150
348 DEVICE_DTS
:= qcom-ipq4018-ex6150v2
350 TARGET_DEVICES
+= netgear_ex6150v2
352 define Device
/openmesh_a42
353 $(call Device
/FitImageLzma
)
354 DEVICE_VENDOR
:= OpenMesh
356 DEVICE_DTS
:= qcom-ipq4018-a42
357 DEVICE_DTS_CONFIG
:= config@om.a42
359 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
361 IMAGES
= factory.bin sysupgrade.bin
362 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A42
363 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
364 DEVICE_PACKAGES
:= uboot-envtools
366 TARGET_DEVICES
+= openmesh_a42
368 define Device
/openmesh_a62
369 $(call Device
/FitImageLzma
)
370 DEVICE_VENDOR
:= OpenMesh
372 DEVICE_DTS
:= qcom-ipq4019-a62
373 DEVICE_DTS_CONFIG
:= config@om.a62
375 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
377 IMAGES
= factory.bin sysupgrade.bin
378 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
379 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
380 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
383 TARGET_DEVICES
+= openmesh_a62
385 define Device
/qcom_ap-dk01.1
-c1
386 DEVICE_VENDOR
:= Qualcomm Atheros
387 DEVICE_MODEL
:= AP-DK01.1
389 BOARD_NAME
:= ap-dk01.1
-c1
390 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
394 $(call Device
/FitImage
)
395 IMAGES
:= sysupgrade.bin
396 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
398 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
400 define Device
/qcom_ap-dk04.1
-c1
401 $(call Device
/FitImage
)
402 $(call Device
/UbiFit
)
403 DEVICE_VENDOR
:= Qualcomm Atheros
404 DEVICE_MODEL
:= AP-DK04.1
406 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
411 BOARD_NAME
:= ap-dk04.1
-c1
413 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
415 define Device
/qxwlan_e2600ac-c1
416 $(call Device
/FitImage
)
417 DEVICE_VENDOR
:= Qxwlan
418 DEVICE_MODEL
:= E2600AC
420 BOARD_NAME
:= e2600ac-c1
421 DEVICE_DTS
:= qcom-ipq4019-qxwlan-e2600ac-c1
424 IMAGES
:= sysupgrade.bin
425 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
426 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
428 TARGET_DEVICES
+= qxwlan_e2600ac-c1
430 define Device
/qxwlan_e2600ac-c2
431 $(call Device
/FitImage
)
432 $(call Device
/UbiFit
)
433 DEVICE_VENDOR
:= Qxwlan
434 DEVICE_MODEL
:= E2600AC
436 DEVICE_DTS
:= qcom-ipq4019-qxwlan-e2600ac-c2
440 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
442 TARGET_DEVICES
+= qxwlan_e2600ac-c2
444 define Device
/unielec_u4019-32m
445 $(call Device
/FitImage
)
446 DEVICE_VENDOR
:= Unielec
447 DEVICE_MODEL
:= U4019
448 DEVICE_VARIANT
:= 32M
449 BOARD_NAME
:= u4019-32m
450 DEVICE_DTS
:= qcom-ipq4019-unielec-u4019-32m
453 IMAGES
:= sysupgrade.bin
454 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
456 TARGET_DEVICES
+= unielec_u4019-32m
458 define Device
/zyxel_nbg6617
459 $(call Device
/FitImageLzma
)
460 DEVICE_VENDOR
:= ZyXEL
461 DEVICE_MODEL
:= NBG6617
462 DEVICE_DTS
:= qcom-ipq4018-nbg6617
463 ROOTFS_SIZE
:= 24960k
465 RAS_ROOTFS_SIZE
:= 19840k
466 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
467 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
468 IMAGES
:= sysupgrade.bin factory.bin
469 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
470 # at least as large as the one of the initial firmware image (not the current
471 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
472 # this minimum-size. However, the larger image can be flashed both ways.
473 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
474 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
475 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
477 TARGET_DEVICES
+= zyxel_nbg6617
479 define Device
/zyxel_wre6606
480 $(call Device
/FitImage
)
481 DEVICE_VENDOR
:= ZyXEL
482 DEVICE_MODEL
:= WRE6606
483 DEVICE_DTS_CONFIG
:= config@
4
484 DEVICE_DTS
:= qcom-ipq4018-wre6606
485 IMAGES
:= sysupgrade.bin
486 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
488 TARGET_DEVICES
+= zyxel_wre6606
490 $(eval
$(call BuildImage
))