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
64 $(call Device
/FitImage
)
66 DEVICE_VENDOR
:= 8devices
67 DEVICE_MODEL
:= Jalapeno
68 DEVICE_DTS
:= qcom-ipq4018-jalapeno
72 TARGET_DEVICES
+= 8dev_jalapeno
74 define Device
/alfa-network_ap120c-ac
75 $(call Device
/FitImage
)
77 DEVICE_VENDOR
:= ALFA Network
78 DEVICE_MODEL
:= AP120C-AC
79 DEVICE_DTS
:= qcom-ipq4018-ap120c-ac
80 DEVICE_PACKAGES
:= kmod-usb-acm \
81 kmod-tpm-i2c-atmel uboot-envtools
85 IMAGES
:= nand-factory.bin nand-sysupgrade.bin
86 IMAGE
/nand-factory.bin
:= append-ubi | qsdk-ipq-factory-nand
88 TARGET_DEVICES
+= alfa-network_ap120c-ac
90 define Device
/asus_map-ac2200
91 $(call Device
/FitImageLzma
)
93 DEVICE_MODEL
:= Lyra
(MAP-AC2200
)
94 DEVICE_DTS
:= qcom-ipq4019-map-ac2200
95 IMAGES
:= sysupgrade.bin
96 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct kmod-ath3k
98 TARGET_DEVICES
+= asus_map-ac2200
100 define Device
/asus_rt-ac58u
101 $(call Device
/FitImageLzma
)
102 DEVICE_VENDOR
:= ASUS
103 DEVICE_MODEL
:= RT-AC58U
104 DEVICE_DTS
:= qcom-ipq4018-rt-ac58u
108 IMAGE_SIZE
:= 20439364
109 FILESYSTEMS
:= squashfs
110 # Someone - in their infinite wisdom - decided to put the firmware
111 # version in front of the image name \03\00\00\04 => Version 3.0.0.4
112 # Since u-boot works with strings we either need another fixup step
113 # to add a version... or we are very careful not to add '\0' into that
114 # string and call it a day.... Yeah, we do the latter!
115 UIMAGE_NAME
:=$(shell echo
-e
'\03\01\01\01RT-AC58U')
116 IMAGES
:= sysupgrade.bin
117 DEVICE_PACKAGES
:= kmod-usb-ledtrig-usbport
119 TARGET_DEVICES
+= asus_rt-ac58u
121 define Device
/avm_fritzbox-4040
122 $(call Device
/FitImageLzma
)
124 DEVICE_MODEL
:= FRITZ
!Box
4040
125 DEVICE_DTS
:= qcom-ipq4018-fritz4040
126 BOARD_NAME
:= fritz4040
127 IMAGE_SIZE
:= 29753344
128 UBOOT_PATH
:= $(STAGING_DIR_IMAGE
)/uboot-fritz4040.bin
129 UBOOT_PARTITION_SIZE
:= 524288
130 IMAGES
= eva.bin sysupgrade.bin
131 IMAGE
/eva.bin
:= append-uboot | pad-to
$$$$(UBOOT_PARTITION_SIZE
) | append-kernel | append-rootfs | pad-rootfs
132 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
133 DEVICE_PACKAGES
:= fritz-tffs fritz-caldata
135 TARGET_DEVICES
+= avm_fritzbox-4040
137 define Device
/avm_fritzbox-7530
138 $(call Device
/FitImageLzma
)
140 DEVICE_MODEL
:= FRITZ
!Box
7530
141 DEVICE_DTS
:= qcom-ipq4019-fritzbox-7530
142 DEVICE_PACKAGES
:= fritz-caldata fritz-tffs-nand
143 IMAGES
:= sysupgrade.bin
145 TARGET_DEVICES
+= avm_fritzbox-7530
147 define Device
/avm_fritzrepeater-3000
148 $(call Device
/FitImageLzma
)
150 DEVICE_MODEL
:= FRITZ
!Repeater
3000
151 DEVICE_DTS
:= qcom-ipq4019-fritzrepeater-3000
152 DEVICE_PACKAGES
:= ath10k-firmware-qca9984-ct fritz-caldata fritz-tffs-nand
153 IMAGES
:= sysupgrade.bin
155 TARGET_DEVICES
+= avm_fritzrepeater-3000
157 define Device
/compex_wpj428
158 $(call Device
/FitImage
)
159 DEVICE_VENDOR
:= Compex
160 DEVICE_MODEL
:= WPJ428
161 DEVICE_DTS
:= qcom-ipq4028-wpj428
162 DEVICE_DTS_CONFIG
:= config@
4
166 IMAGES
= sysupgrade.bin
167 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
168 DEVICE_PACKAGES
:= kmod-gpio-beeper
170 TARGET_DEVICES
+= compex_wpj428
172 define Device
/engenius_eap1300
173 $(call Device
/FitImage
)
174 DEVICE_VENDOR
:= EnGenius
175 DEVICE_MODEL
:= EAP1300
176 DEVICE_DTS_CONFIG
:= config@
4
177 BOARD_NAME
:= eap1300
178 DEVICE_DTS
:= qcom-ipq4018-eap1300
181 IMAGES
:= sysupgrade.bin
182 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
184 TARGET_DEVICES
+= engenius_eap1300
186 define Device
/engenius_ens620ext
187 $(call Device
/FitImage
)
188 DEVICE_VENDOR
:= EnGenius
189 DEVICE_MODEL
:= ENS620EXT
190 DEVICE_DTS
:= qcom-ipq4018-ens620ext
191 DEVICE_DTS_CONFIG
:= config@
4
194 BOARD_NAME
:= ENS620EXT
197 PRODUCT_ID_NEW
:= 0xA4
202 IMAGE_SIZE
:= 21823488
204 FILESYSTEMS
:= squashfs
205 IMAGES
:= sysupgrade.bin factory_30.bin factory_35.bin
206 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | append-metadata
207 IMAGE
/factory_30.bin
:= append-kernel | pad-to
$$$$(KERNEL_SIZE
) | append-rootfs | pad-rootfs | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID
) $$$$(FW_VER
)
208 IMAGE
/factory_35.bin
:= qsdk-ipq-factory-nor | check-size
$$$$(IMAGE_SIZE
) | SenaoFW
$$$$(PRODUCT_ID_NEW
) $$$$(FW_VER_NEW
)
210 TARGET_DEVICES
+= engenius_ens620ext
212 define Device
/glinet_gl-b1300
213 $(call Device
/FitImage
)
214 DEVICE_VENDOR
:= GL.iNet
215 DEVICE_MODEL
:= GL-B1300
216 BOARD_NAME
:= gl-b1300
217 DEVICE_DTS
:= qcom-ipq4029-gl-b1300
220 IMAGES
:= sysupgrade.bin
221 IMAGE
/sysupgrade.bin
:= append-kernel |append-rootfs | pad-rootfs | append-metadata
223 TARGET_DEVICES
+= glinet_gl-b1300
225 define Device
/linksys_ea6350v3
226 # The Linksys EA6350v3 has a uboot bootloader that does not
227 # support either booting lzma kernel images nor booting UBI
228 # partitions. This uboot, however, supports raw kernel images and
231 # As for the time of writing this, the device will boot the kernel
232 # from a fixed address with a fixed length of 3MiB. Also, the
233 # device has a hard-coded kernel command line that requieres the
234 # rootfs and alt_rootfs to be in mtd11 and mtd13 respectively.
235 # Oh... and the kernel partition overlaps with the rootfs
236 # partition (the same for alt_kernel and alt_rootfs).
238 # If you are planing re-partitioning the device, you may want to
239 # keep those details in mind:
240 # 1. The kernel adresses you should honor are 0x00000000 and
241 # 0x02800000 respectively.
242 # 2. The kernel size (plus the dtb) cannot exceed 3.00MiB in size.
243 # 3. You can use 'zImage', but not a raw 'Image' packed with lzma.
244 # 4. The kernel command line from uboot is harcoded to boot with
245 # rootfs either in mtd11 or mtd13.
246 $(call Device
/FitzImage
)
247 DEVICE_VENDOR
:= Linksys
248 DEVICE_MODEL
:= EA6350
250 DEVICE_DTS
:= qcom-ipq4018-ea6350v3
253 KERNEL_SIZE
:= 3145728
254 IMAGE_SIZE
:= 38797312
256 IMAGES
:= factory.bin sysupgrade.bin
257 IMAGE
/factory.bin
:= append-kernel | append-uImage-fakehdr filesystem | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA6350v3
258 DEVICE_PACKAGES
:= uboot-envtools
260 TARGET_DEVICES
+= linksys_ea6350v3
262 define Device
/linksys_ea8300
263 $(call Device
/FitzImage
)
264 DEVICE_VENDOR
:= Linksys
265 DEVICE_MODEL
:= EA8300
266 DEVICE_DTS
:= qcom-ipq4019-linksys_ea8300
271 UBINIZE_OPTS
:= -E
5 # EOD marks to "hide" factory sig at EOF
272 IMAGES
:= sysupgrade.bin factory.bin
273 IMAGE
/factory.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-ubi | linksys-image type
=EA8300
274 DEVICE_PACKAGES
:= uboot-envtools ath10k-firmware-qca9888-ct ipq-wifi-linksys_ea8300 kmod-usb-ledtrig-usbport
276 TARGET_DEVICES
+= linksys_ea8300
278 define Device
/meraki_mr33
279 $(call Device
/FitImage
)
280 DEVICE_VENDOR
:= Cisco Meraki
282 DEVICE_DTS
:= qcom-ipq4029-mr33
285 IMAGES
= sysupgrade.bin
286 DEVICE_PACKAGES
:= -swconfig ath10k-firmware-qca9887-ct
288 TARGET_DEVICES
+= meraki_mr33
290 define Device
/netgear_ex61x0v2
291 $(call Device
/DniImage
)
292 DEVICE_DTS_CONFIG
:= config@
4
293 NETGEAR_BOARD_ID
:= EX6150v2series
294 NETGEAR_HW_ID
:= 29765285+16+0+128+2x2
297 define Device
/netgear_ex6100v2
298 $(call Device
/netgear_ex61x0v2
)
299 DEVICE_VENDOR
:= Netgear
300 DEVICE_MODEL
:= EX6100
302 DEVICE_DTS
:= qcom-ipq4018-ex6100v2
304 TARGET_DEVICES
+= netgear_ex6100v2
306 define Device
/netgear_ex6150v2
307 $(call Device
/netgear_ex61x0v2
)
308 DEVICE_VENDOR
:= Netgear
309 DEVICE_MODEL
:= EX6150
311 DEVICE_DTS
:= qcom-ipq4018-ex6150v2
313 TARGET_DEVICES
+= netgear_ex6150v2
315 define Device
/openmesh_a42
316 $(call Device
/FitImageLzma
)
317 DEVICE_VENDOR
:= OpenMesh
319 DEVICE_DTS
:= qcom-ipq4018-a42
320 DEVICE_DTS_CONFIG
:= config@om.a42
322 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
324 IMAGES
= factory.bin sysupgrade.bin
325 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A42
326 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
327 DEVICE_PACKAGES
:= uboot-envtools
329 TARGET_DEVICES
+= openmesh_a42
331 define Device
/openmesh_a62
332 $(call Device
/FitImageLzma
)
333 DEVICE_VENDOR
:= OpenMesh
335 DEVICE_DTS
:= qcom-ipq4019-a62
336 DEVICE_DTS_CONFIG
:= config@om.a62
338 KERNEL
= kernel-bin | lzma | fit lzma
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb | pad-to
$$(BLOCKSIZE
)
340 IMAGES
= factory.bin sysupgrade.bin
341 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | openmesh-image ce_type
=A62
342 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | sysupgrade-tar rootfs
=$$$$@ | append-metadata
343 DEVICE_PACKAGES
:= ath10k-firmware-qca9888-ct uboot-envtools
346 TARGET_DEVICES
+= openmesh_a62
348 define Device
/qcom_ap-dk01.1
-c1
349 DEVICE_VENDOR
:= Qualcomm Atheros
350 DEVICE_MODEL
:= AP-DK01.1
352 BOARD_NAME
:= ap-dk01.1
-c1
353 DEVICE_DTS
:= qcom-ipq4019-ap.dk01.1
-c1
357 $(call Device
/FitImage
)
358 IMAGES
:= sysupgrade.bin
359 IMAGE
/sysupgrade.bin
:= append-kernel | pad-to
$$$${KERNEL_SIZE} | append-rootfs | pad-rootfs | append-metadata
361 TARGET_DEVICES
+= qcom_ap-dk01.1
-c1
363 define Device
/qcom_ap-dk04.1
-c1
364 $(call Device
/FitImage
)
365 $(call Device
/UbiFit
)
366 DEVICE_VENDOR
:= Qualcomm Atheros
367 DEVICE_MODEL
:= AP-DK04.1
369 DEVICE_DTS
:= qcom-ipq4019-ap.dk04.1
-c1
374 BOARD_NAME
:= ap-dk04.1
-c1
376 TARGET_DEVICES
+= qcom_ap-dk04.1
-c1
378 define Device
/qxwlan_e2600ac-c1
379 $(call Device
/FitImage
)
380 DEVICE_VENDOR
:= Qxwlan
381 DEVICE_MODEL
:= E2600AC
383 BOARD_NAME
:= e2600ac-c1
384 DEVICE_DTS
:= qcom-ipq4019-qxwlan-e2600ac-c1
387 IMAGES
:= sysupgrade.bin
388 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
389 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
391 TARGET_DEVICES
+= qxwlan_e2600ac-c1
393 define Device
/qxwlan_e2600ac-c2
394 $(call Device
/FitImage
)
395 $(call Device
/UbiFit
)
396 DEVICE_VENDOR
:= Qxwlan
397 DEVICE_MODEL
:= E2600AC
399 DEVICE_DTS
:= qcom-ipq4019-qxwlan-e2600ac-c2
403 DEVICE_PACKAGES
:= ipq-wifi-qxwlan_e2600ac
405 TARGET_DEVICES
+= qxwlan_e2600ac-c2
407 define Device
/zyxel_nbg6617
408 $(call Device
/FitImageLzma
)
409 DEVICE_VENDOR
:= ZyXEL
410 DEVICE_MODEL
:= NBG6617
411 DEVICE_DTS
:= qcom-ipq4018-nbg6617
412 ROOTFS_SIZE
:= 24960k
414 RAS_ROOTFS_SIZE
:= 19840k
415 RAS_VERSION
:= "$(VERSION_DIST) $(REVISION)"
416 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
417 IMAGES
:= sysupgrade.bin factory.bin
418 # The ZyXEL firmware allows flashing thru the web-gui only when the rootfs is
419 # at least as large as the one of the initial firmware image (not the current
420 # one on the device). This only applies to the Web-UI, the bootlaoder ignores
421 # this minimum-size. However, the larger image can be flashed both ways.
422 IMAGE
/factory.bin
:= append-rootfs | pad-rootfs | pad-to
64k | check-size
$$$$(ROOTFS_SIZE
) | zyxel-ras-image separate-kernel
423 IMAGE
/sysupgrade.bin
/squashfs
:= append-rootfs | pad-rootfs | check-size
$$$$(ROOTFS_SIZE
) | sysupgrade-tar rootfs
=$$$$@ | append-metadata
424 DEVICE_PACKAGES
:= uboot-envtools kmod-usb-ledtrig-usbport
426 TARGET_DEVICES
+= zyxel_nbg6617
428 define Device
/zyxel_wre6606
429 $(call Device
/FitImage
)
430 DEVICE_VENDOR
:= ZyXEL
431 DEVICE_MODEL
:= WRE6606
432 DEVICE_DTS_CONFIG
:= config@
4
433 DEVICE_DTS
:= qcom-ipq4018-wre6606
434 IMAGES
:= sysupgrade.bin
435 IMAGE
/sysupgrade.bin
:= append-kernel | append-rootfs | pad-rootfs | append-metadata
437 TARGET_DEVICES
+= zyxel_wre6606
439 $(eval
$(call BuildImage
))