ar71xx: add support for Teltonika RUT900
[openwrt/openwrt.git] / target / linux / ar71xx / image / generic.mk
1 DEVICE_VARS += DAP_SIGNATURE NETGEAR_BOARD_ID NETGEAR_HW_ID NETGEAR_KERNEL_MAGIC ROOTFS_SIZE SEAMA_SIGNATURE
2
3 define Build/alfa-network-rootfs-header
4 mkimage \
5 -A mips -O linux -T filesystem -C lzma -a 0 -e 0 \
6 -n 'RootfsImage' -d $@ $@.new
7 @mv $@.new $@
8 endef
9
10 define Build/append-md5sum-bin
11 $(STAGING_DIR_HOST)/bin/mkhash md5 $@ | sed 's/../\\\\x&/g' |\
12 xargs echo -ne >> $@
13 endef
14
15 define Build/append-string
16 echo -n $(1) >> $@
17 endef
18
19 define Build/mkbuffaloimg
20 $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
21 -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
22 -K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
23 -i $@ -o $@.new
24 mv $@.new $@
25 endef
26
27 define Build/mkwrggimg
28 $(STAGING_DIR_HOST)/bin/mkwrggimg -b \
29 -i $@ -o $@.imghdr -d /dev/mtdblock/1 \
30 -m $(BOARDNAME) -s $(DAP_SIGNATURE) \
31 -v OpenWrt -B $(REVISION)
32 mv $@.imghdr $@
33 endef
34
35 define Build/netgear-squashfs
36 rm -rf $@.fs $@.squashfs
37 mkdir -p $@.fs/image
38 cp $@ $@.fs/image/uImage
39 $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
40 $@.fs $@.squashfs \
41 -noappend -root-owned -be -b 65536 \
42 $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
43
44 dd if=/dev/zero bs=1k count=1 >> $@.squashfs
45 mkimage \
46 -A mips -O linux -T filesystem -C none \
47 -M $(NETGEAR_KERNEL_MAGIC) \
48 -a 0xbf070000 -e 0xbf070000 \
49 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
50 -d $@.squashfs $@
51 rm -rf $@.squashfs $@.fs
52 endef
53
54 define Build/netgear-uImage
55 $(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
56 endef
57
58 define Build/relocate-kernel
59 rm -rf $@.relocate
60 $(CP) ../../generic/image/relocate $@.relocate
61 $(MAKE) -j1 -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
62 ( \
63 dd if=$@.relocate/loader.bin bs=32 conv=sync && \
64 perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
65 cat "$@" \
66 ) > "$@.new"
67 mv "$@.new" "$@"
68 rm -rf $@.relocate
69 endef
70
71 define Build/seama
72 $(STAGING_DIR_HOST)/bin/seama -i $@ $(if $(1),$(1),-m "dev=/dev/mtdblock/1" -m "type=firmware")
73 mv $@.seama $@
74 endef
75
76 define Build/seama-seal
77 $(call Build/seama,-s $@.seama $(1))
78 endef
79
80 define Build/teltonika-fw-fake-checksum
81 # Teltonika U-Boot web based firmware upgrade/recovery routine compares
82 # 16 bytes from md5sum1[16] field in TP-Link v1 header (offset: 76 bytes
83 # from begin of the firmware file) with 16 bytes stored just before
84 # 0xdeadc0de marker. Values are only compared, MD5 sum is not verified.
85 let \
86 offs="$$(stat -c%s $@) - 20"; \
87 dd if=$@ bs=1 count=16 skip=76 |\
88 dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
89 endef
90
91 define Build/uImageHiWiFi
92 # Field ih_name needs to start with "tw150v1"
93 mkimage -A $(LINUX_KARCH) \
94 -O linux -T kernel \
95 -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
96 -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new
97 @mv $@.new $@
98 endef
99
100 define Build/wrgg-pad-rootfs
101 $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
102 endef
103
104
105 define Device/ap121f
106 DEVICE_TITLE := ALFA Network AP121F
107 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage -swconfig
108 BOARDNAME := AP121F
109 IMAGE_SIZE := 16064k
110 CONSOLE := ttyATH0,115200
111 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
112 SUPPORTED_DEVICES := ap121f
113 IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
114 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
115 endef
116 TARGET_DEVICES += ap121f
117
118 define Device/ap531b0
119 DEVICE_TITLE := Rockeetech AP531B0
120 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
121 BOARDNAME := AP531B0
122 IMAGE_SIZE := 16000k
123 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
124 endef
125 TARGET_DEVICES += ap531b0
126
127 define Device/ap90q
128 DEVICE_TITLE := YunCore AP90Q
129 BOARDNAME := AP90Q
130 IMAGE_SIZE := 16000k
131 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
132 endef
133 TARGET_DEVICES += ap90q
134
135 define Device/ap91-5g
136 DEVICE_TITLE := ALFA Network AP91-5G
137 DEVICE_PACKAGES := rssileds -swconfig
138 BOARDNAME := AP91-5G
139 IMAGE_SIZE := 7744k
140 KERNEL_SIZE := 1600k
141 ROOTFS_SIZE := 6144k
142 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),6144k(rootfs),1600k(kernel),64k(config)ro,64k(art)ro,7744k@0x50000(firmware)
143 IMAGES := sysupgrade.bin factory.bin
144 IMAGE/factory.bin := append-rootfs | pad-rootfs |\
145 alfa-network-rootfs-header | append-kernel | check-size $$$$(IMAGE_SIZE)
146 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs |\
147 pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
148 endef
149 TARGET_DEVICES += ap91-5g
150
151 define Device/arduino-yun
152 DEVICE_TITLE := Arduino Yun
153 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
154 BOARDNAME := Yun
155 IMAGE_SIZE := 15936k
156 CONSOLE = ttyATH0,250000
157 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro
158 endef
159 TARGET_DEVICES += arduino-yun
160
161 define Device/bsb
162 DEVICE_TITLE := Smart Electronics Black Swift board
163 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
164 BOARDNAME := BSB
165 IMAGE_SIZE := 16000k
166 CONSOLE := ttyATH0,115200
167 MTDPARTS := spi0.0:128k(u-boot)ro,64k(u-boot-env)ro,16128k(firmware),64k(art)ro
168 endef
169 TARGET_DEVICES += bsb
170
171 define Device/carambola2
172 DEVICE_TITLE := 8devices Carambola2
173 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
174 BOARDNAME := CARAMBOLA2
175 IMAGE_SIZE := 16000k
176 CONSOLE := ttyATH0,115200
177 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
178 endef
179 TARGET_DEVICES += carambola2
180
181 define Device/cf-e316n-v2
182 DEVICE_TITLE := COMFAST CF-E316N v2
183 BOARDNAME := CF-E316N-V2
184 IMAGE_SIZE := 16192k
185 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
186 endef
187 TARGET_DEVICES += cf-e316n-v2
188
189 define Device/cf-e320n-v2
190 $(Device/cf-e316n-v2)
191 DEVICE_TITLE := COMFAST CF-E320N v2
192 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
193 BOARDNAME := CF-E320N-V2
194 endef
195 TARGET_DEVICES += cf-e320n-v2
196
197 define Device/cf-e355ac
198 DEVICE_TITLE := COMFAST CF-E355AC
199 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
200 BOARDNAME := CF-E355AC
201 IMAGE_SIZE := 16192k
202 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
203 endef
204 TARGET_DEVICES += cf-e355ac
205
206 define Device/cf-e380ac-v1
207 DEVICE_TITLE := COMFAST CF-E380AC v1
208 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
209 BOARDNAME := CF-E380AC-V1
210 IMAGE_SIZE := 16128k
211 MTDPARTS := spi0.0:128k(u-boot)ro,64k(art)ro,16128k(firmware),64k(art-backup)ro
212 endef
213 TARGET_DEVICES += cf-e380ac-v1
214
215 define Device/cf-e380ac-v2
216 $(Device/cf-e380ac-v1)
217 DEVICE_TITLE := COMFAST CF-E380AC v2
218 BOARDNAME := CF-E380AC-V2
219 IMAGE_SIZE := 16000k
220 MTDPARTS := spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
221 endef
222 TARGET_DEVICES += cf-e380ac-v2
223
224 define Device/cf-e520n
225 DEVICE_TITLE := COMFAST CF-E520N
226 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
227 BOARDNAME := CF-E520N
228 IMAGE_SIZE := 8000k
229 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,8000k(firmware),64k(art-backup)ro
230 endef
231 TARGET_DEVICES += cf-e520n
232
233 define Device/cf-e530n
234 $(Device/cf-e520n)
235 DEVICE_TITLE := COMFAST CF-E530N
236 BOARDNAME := CF-E530N
237 endef
238 TARGET_DEVICES += cf-e530n
239
240 define Device/cpe505n
241 DEVICE_TITLE := P&W CPE505N
242 BOARDNAME := CPE505N
243 IMAGE_SIZE := 16000k
244 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
245 endef
246 TARGET_DEVICES += cpe505n
247
248 define Device/cpe830
249 $(Device/ap90q)
250 DEVICE_TITLE := YunCore CPE830
251 DEVICE_PACKAGES := rssileds
252 BOARDNAME := CPE830
253 endef
254 TARGET_DEVICES += cpe830
255
256 define Device/cpe870
257 DEVICE_TITLE := YunCore CPE870
258 DEVICE_PACKAGES := rssileds
259 BOARDNAME := CPE870
260 IMAGE_SIZE := 7936k
261 MTDPARTS := spi0.0:64k(u-boot)ro,64k(u-boot-env),7936k(firmware),64k(config)ro,64k(art)ro
262 endef
263 TARGET_DEVICES += cpe870
264
265 define Device/dragino2
266 BOARDNAME := DRAGINO2
267 CONSOLE := ttyATH0,115200
268 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
269 DEVICE_TITLE := Dragino 2 (MS14)
270 IMAGE_SIZE := 16000k
271 MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
272 endef
273 TARGET_DEVICES += dragino2
274
275 define Device/ew-dorin
276 DEVICE_TITLE := Embedded Wireless Dorin Platform
277 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea
278 BOARDNAME = EW-DORIN
279 CONSOLE := ttyATH0,115200
280 IMAGE_SIZE = 16000k
281 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
282 endef
283 TARGET_DEVICES += ew-dorin
284
285 define Device/ew-dorin-router
286 DEVICE_TITLE := Embedded Wireless Dorin Router Platform
287 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea
288 BOARDNAME = EW-DORIN-ROUTER
289 CONSOLE := ttyATH0,115200
290 IMAGE_SIZE = 16000k
291 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
292 endef
293 TARGET_DEVICES += ew-dorin-router
294
295 define Device/weio
296 DEVICE_TITLE := WeIO
297 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
298 BOARDNAME := WEIO
299 IMAGE_SIZE := 16000k
300 CONSOLE := ttyATH0,115200
301 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
302 endef
303 TARGET_DEVICES += weio
304
305 define Device/gl-ar150
306 DEVICE_TITLE := GL.iNet GL-AR150
307 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
308 BOARDNAME := GL-AR150
309 IMAGE_SIZE := 16000k
310 CONSOLE := ttyATH0,115200
311 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
312 endef
313 TARGET_DEVICES += gl-ar150
314
315 define Device/gl-ar300
316 DEVICE_TITLE := GL.iNet GL-AR300
317 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
318 BOARDNAME := GL-AR300
319 IMAGE_SIZE := 16000k
320 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
321 endef
322 TARGET_DEVICES += gl-ar300
323
324 define Device/gl-ar300m
325 DEVICE_TITLE := GL.iNet GL-AR300M
326 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
327 BOARDNAME := GL-AR300M
328 IMAGE_SIZE := 16000k
329 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
330 endef
331 TARGET_DEVICES += gl-ar300m
332
333 define Device/gl-domino
334 DEVICE_TITLE := GL.iNet Domino Pi
335 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
336 BOARDNAME := DOMINO
337 IMAGE_SIZE := 16000k
338 CONSOLE := ttyATH0,115200
339 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
340 endef
341 TARGET_DEVICES += gl-domino
342
343 define Device/gl-mifi
344 DEVICE_TITLE := GL.iNet GL-MiFi
345 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
346 BOARDNAME := GL-MIFI
347 IMAGE_SIZE := 16000k
348 CONSOLE := ttyATH0,115200
349 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
350 endef
351 TARGET_DEVICES += gl-mifi
352
353 define Device/gl-usb150
354 DEVICE_TITLE := GL.iNet GL-USB150
355 DEVICE_PACKAGES := -swconfig
356 BOARDNAME := GL-USB150
357 IMAGE_SIZE := 16000k
358 CONSOLE := ttyATH0,115200
359 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
360 SUPPORTED_DEVICES := gl-usb150
361 IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
362 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
363 endef
364 TARGET_DEVICES += gl-usb150
365
366 define Device/lima
367 DEVICE_TITLE := 8devices Lima
368 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
369 BOARDNAME := LIMA
370 IMAGE_SIZE := 15616k
371 MTDPARTS := spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,256k(art)ro,-(firmware)
372 endef
373 TARGET_DEVICES += lima
374
375 define Device/mr12
376 DEVICE_TITLE := Meraki MR12
377 DEVICE_PACKAGES := kmod-spi-gpio
378 BOARDNAME := MR12
379 ROOTFS_SIZE := 13440k
380 IMAGE_SIZE := 15680k
381 MTDPARTS := spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
382 IMAGE/kernel.bin := append-kernel
383 IMAGE/rootfs.bin := append-rootfs | pad-rootfs
384 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
385 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
386 endef
387 TARGET_DEVICES += mr12
388
389 define Device/mr16
390 $(Device/mr12)
391 DEVICE_TITLE := Meraki MR16
392 BOARDNAME := MR16
393 endef
394 TARGET_DEVICES += mr16
395
396 define Device/dr342
397 DEVICE_TITLE := Wallys DR342
398 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
399 BOARDNAME := DR342
400 IMAGE_SIZE := 16000k
401 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,16000k(firmware),64k(art)ro
402 endef
403 TARGET_DEVICES += dr342
404
405 define Device/dr344
406 DEVICE_TITLE := Wallys DR344
407 BOARDNAME := DR344
408 KERNEL_SIZE := 1408k
409 ROOTFS_SIZE := 6336k
410 IMAGE_SIZE := 7744k
411 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
412 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
413 endef
414
415 define Device/dr531
416 DEVICE_TITLE := Wallys DR531
417 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
418 BOARDNAME := DR531
419 IMAGE_SIZE := 7808k
420 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
421 endef
422 TARGET_DEVICES += dr531
423
424 define Device/wndr3700
425 DEVICE_TITLE := NETGEAR WNDR3700
426 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
427 BOARDNAME := WNDR3700
428 NETGEAR_KERNEL_MAGIC := 0x33373030
429 NETGEAR_BOARD_ID := WNDR3700
430 IMAGE_SIZE := 7680k
431 MTDPARTS := spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
432 IMAGES := sysupgrade.bin factory.img factory-NA.img
433 KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
434 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
435 IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
436 IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
437 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
438 endef
439 TARGET_DEVICES += wndr3700
440
441 define Device/wndr3700v2
442 $(Device/wndr3700)
443 DEVICE_TITLE := NETGEAR WNDR3700 v2
444 NETGEAR_BOARD_ID := WNDR3700v2
445 NETGEAR_KERNEL_MAGIC := 0x33373031
446 NETGEAR_HW_ID := 29763654+16+64
447 IMAGE_SIZE := 15872k
448 MTDPARTS := spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
449 IMAGES := sysupgrade.bin factory.img
450 endef
451 TARGET_DEVICES += wndr3700v2
452
453 define Device/wndr3800
454 $(Device/wndr3700v2)
455 DEVICE_TITLE := NETGEAR WNDR3800
456 NETGEAR_BOARD_ID := WNDR3800
457 NETGEAR_HW_ID := 29763654+16+128
458 endef
459 TARGET_DEVICES += wndr3800
460
461 define Device/wndr3800ch
462 $(Device/wndr3800)
463 DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
464 NETGEAR_BOARD_ID := WNDR3800CH
465 endef
466 TARGET_DEVICES += wndr3800ch
467
468 define Device/wndrmac
469 $(Device/wndr3700v2)
470 DEVICE_TITLE := NETGEAR WNDRMAC
471 NETGEAR_BOARD_ID := WNDRMAC
472 endef
473 TARGET_DEVICES += wndrmac
474
475 define Device/wndrmacv2
476 $(Device/wndr3800)
477 DEVICE_TITLE := NETGEAR WNDRMAC v2
478 NETGEAR_BOARD_ID := WNDRMACv2
479 endef
480 TARGET_DEVICES += wndrmacv2
481
482 define Device/cap324
483 DEVICE_TITLE := PowerCloud CAP324 Cloud AP
484 BOARDNAME := CAP324
485 DEVICE_PROFILE := CAP324
486 IMAGE_SIZE := 15296k
487 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
488 endef
489 TARGET_DEVICES += cap324
490
491 define Device/cap324-nocloud
492 DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
493 BOARDNAME := CAP324
494 DEVICE_PROFILE := CAP324
495 IMAGE_SIZE := 16000k
496 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
497 endef
498 TARGET_DEVICES += cap324-nocloud
499
500 define Device/cr3000
501 DEVICE_TITLE := PowerCloud CR3000 Cloud Router
502 BOARDNAME := CR3000
503 DEVICE_PROFILE := CR3000
504 IMAGE_SIZE := 7104k
505 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
506 endef
507 TARGET_DEVICES += cr3000
508
509 define Device/cr3000-nocloud
510 DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
511 BOARDNAME := CR3000
512 DEVICE_PROFILE := CR3000
513 IMAGE_SIZE := 7808k
514 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
515 endef
516 TARGET_DEVICES += cr3000-nocloud
517
518 define Device/cr5000
519 DEVICE_TITLE := PowerCloud CR5000 Cloud Router
520 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
521 BOARDNAME := CR5000
522 DEVICE_PROFILE := CR5000
523 IMAGE_SIZE := 7104k
524 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
525 endef
526 TARGET_DEVICES += cr5000
527
528 define Device/cr5000-nocloud
529 DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
530 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
531 BOARDNAME := CR5000
532 DEVICE_PROFILE := CR5000
533 IMAGE_SIZE := 7808k
534 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
535 endef
536 TARGET_DEVICES += cr5000-nocloud
537
538 define Device/pqi-air-pen
539 DEVICE_TITLE := PQI Air Pen
540 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
541 BOARDNAME := PQI-AIR-PEN
542 IMAGE_SIZE := 7744k
543 CONSOLE := ttyATH0,115200
544 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
545 endef
546 TARGET_DEVICES += pqi-air-pen
547
548 define Device/antminer-s1
549 $(Device/tplink-8mlzma)
550 DEVICE_TITLE := Antminer-S1
551 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
552 BOARDNAME := ANTMINER-S1
553 DEVICE_PROFILE := ANTMINERS1
554 TPLINK_HWID := 0x04440101
555 CONSOLE := ttyATH0,115200
556 endef
557 TARGET_DEVICES += antminer-s1
558
559 define Device/antminer-s3
560 $(Device/tplink-8mlzma)
561 DEVICE_TITLE := Antminer-S3
562 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
563 BOARDNAME := ANTMINER-S3
564 DEVICE_PROFILE := ANTMINERS3
565 TPLINK_HWID := 0x04440301
566 CONSOLE := ttyATH0,115200
567 endef
568 TARGET_DEVICES += antminer-s3
569
570 define Device/antrouter-r1
571 $(Device/tplink-8mlzma)
572 DEVICE_TITLE := Antrouter-R1
573 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
574 BOARDNAME := ANTROUTER-R1
575 DEVICE_PROFILE := ANTROUTERR1
576 TPLINK_HWID := 0x44440101
577 CONSOLE := ttyATH0,115200
578 endef
579 TARGET_DEVICES += antrouter-r1
580
581 define Device/el-m150
582 $(Device/tplink-8mlzma)
583 DEVICE_TITLE := EasyLink EL-M150
584 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
585 BOARDNAME := EL-M150
586 DEVICE_PROFILE := ELM150
587 TPLINK_HWID := 0x01500101
588 CONSOLE := ttyATH0,115200
589 endef
590 TARGET_DEVICES += el-m150
591
592 define Device/el-mini
593 $(Device/tplink-8mlzma)
594 DEVICE_TITLE := EasyLink EL-MINI
595 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
596 BOARDNAME := EL-MINI
597 DEVICE_PROFILE := ELMINI
598 TPLINK_HWID := 0x01530001
599 CONSOLE := ttyATH0,115200
600 endef
601 TARGET_DEVICES += el-mini
602
603 define Device/gl-inet-6408A-v1
604 $(Device/tplink-8mlzma)
605 DEVICE_TITLE := GL.iNet 6408
606 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
607 BOARDNAME := GL-INET
608 DEVICE_PROFILE := GLINET
609 TPLINK_HWID := 0x08000001
610 CONSOLE := ttyATH0,115200
611 endef
612 TARGET_DEVICES += gl-inet-6408A-v1
613
614 define Device/gl-inet-6416A-v1
615 $(Device/tplink-16mlzma)
616 DEVICE_TITLE := GL.iNet 6416
617 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
618 BOARDNAME := GL-INET
619 DEVICE_PROFILE := GLINET
620 TPLINK_HWID := 0x08000001
621 CONSOLE := ttyATH0,115200
622 endef
623 TARGET_DEVICES += gl-inet-6416A-v1
624
625 define Device/jwap230
626 DEVICE_TITLE := jjPlus JWAP230
627 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
628 BOARDNAME := JWAP230
629 IMAGE_SIZE := 16000k
630 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
631 endef
632 TARGET_DEVICES += jwap230
633
634 define Device/r602n
635 DEVICE_TITLE := P&W R602N
636 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
637 BOARDNAME := R602N
638 IMAGE_SIZE := 16000k
639 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
640 endef
641 TARGET_DEVICES += r602n
642
643 define Device/rut900
644 DEVICE_TITLE := Teltonika RUT900
645 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -uboot-envtools
646 BOARDNAME := RUT900
647 SUPPORTED_DEVICES := rut900
648 IMAGE_SIZE := 15552k
649 MTDPARTS := spi0.0:128k(u-boot)ro,64k(config)ro,64k(art)ro,15552k(firmware),576k(event-log)ro
650 TPLINK_HWID := 0x35000001
651 TPLINK_HWREV := 0x1
652 TPLINK_HEADER_VERSION := 1
653 KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
654 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma
655 IMAGES := sysupgrade.bin factory.bin
656 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
657 pad-rootfs | teltonika-fw-fake-checksum | append-string master |\
658 append-md5sum-bin | check-size $$$$(IMAGE_SIZE)
659 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
660 append-rootfs | pad-rootfs | append-metadata |\
661 check-size $$$$(IMAGE_SIZE)
662 endef
663 TARGET_DEVICES += rut900
664
665 define Device/mc-mac1200r
666 $(Device/tplink-8mlzma)
667 DEVICE_TITLE := Mercury MAC1200R
668 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
669 BOARDNAME := MC-MAC1200R
670 DEVICE_PROFILE := MAC1200R
671 TPLINK_HWID := 0x12000001
672 endef
673 TARGET_DEVICES += mc-mac1200r
674
675 define Device/minibox-v1
676 $(Device/tplink-16mlzma)
677 DEVICE_TITLE := Gainstrong MiniBox V1.0
678 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
679 BOARDNAME := MINIBOX-V1
680 DEVICE_PROFILE := MINIBOXV1
681 TPLINK_HWID := 0x3C000201
682 CONSOLE := ttyATH0,115200
683 endef
684 TARGET_DEVICES += minibox-v1
685
686 define Device/omy-g1
687 $(Device/tplink-16mlzma)
688 DEVICE_TITLE := OMYlink OMY-G1
689 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
690 BOARDNAME := OMY-G1
691 DEVICE_PROFILE := OMYG1
692 TPLINK_HWID := 0x06660101
693 endef
694 TARGET_DEVICES += omy-g1
695
696 define Device/omy-x1
697 $(Device/tplink-8mlzma)
698 DEVICE_TITLE := OMYlink OMY-X1
699 BOARDNAME := OMY-X1
700 DEVICE_PROFILE := OMYX1
701 TPLINK_HWID := 0x06660201
702 endef
703 TARGET_DEVICES += omy-x1
704
705 define Device/onion-omega
706 $(Device/tplink-16mlzma)
707 DEVICE_TITLE := Onion Omega
708 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-i2c-core kmod-i2c-gpio-custom kmod-spi-bitbang kmod-spi-dev kmod-spi-gpio kmod-spi-gpio-custom kmod-usb-serial
709 BOARDNAME := ONION-OMEGA
710 DEVICE_PROFILE := OMEGA
711 TPLINK_HWID := 0x04700001
712 CONSOLE := ttyATH0,115200
713 endef
714 TARGET_DEVICES += onion-omega
715
716 define Device/sc1750
717 DEVICE_TITLE := Abicom SC1750
718 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
719 BOARDNAME := SC1750
720 IMAGE_SIZE := 15744k
721 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
722 endef
723 TARGET_DEVICES += sc1750
724
725 define Device/sc300m
726 DEVICE_TITLE := Abicom SC300M
727 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
728 BOARDNAME := SC300M
729 IMAGE_SIZE := 15744k
730 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
731 endef
732 TARGET_DEVICES += sc300m
733
734 define Device/sc450
735 DEVICE_TITLE := Abicom SC450
736 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
737 BOARDNAME := SC450
738 IMAGE_SIZE := 15744k
739 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
740 endef
741 TARGET_DEVICES += sc450
742
743 define Device/smart-300
744 $(Device/tplink-8mlzma)
745 DEVICE_TITLE := NC-LINK SMART-300
746 BOARDNAME := SMART-300
747 DEVICE_PROFILE := SMART-300
748 TPLINK_HWID := 0x93410001
749 endef
750 TARGET_DEVICES += smart-300
751
752 define Device/som9331
753 $(Device/tplink-8mlzma)
754 DEVICE_TITLE := OpenEmbed SOM9331
755 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-i2c-core kmod-i2c-gpio-custom kmod-spi-bitbang kmod-spi-dev kmod-spi-gpio kmod-spi-gpio-custom kmod-usb-serial
756 BOARDNAME := SOM9331
757 DEVICE_PROFILE := SOM9331
758 TPLINK_HWID := 0x04800054
759 CONSOLE := ttyATH0,115200
760 endef
761 TARGET_DEVICES += som9331
762
763 define Device/sr3200
764 DEVICE_TITLE := YunCore SR3200
765 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
766 BOARDNAME := SR3200
767 IMAGE_SIZE := 16000k
768 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
769 endef
770 TARGET_DEVICES += sr3200
771
772 define Device/xd3200
773 $(Device/sr3200)
774 DEVICE_TITLE := YunCore XD3200
775 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
776 BOARDNAME := XD3200
777 endef
778 TARGET_DEVICES += xd3200
779
780 define Device/tellstick-znet-lite
781 $(Device/tplink-16mlzma)
782 DEVICE_TITLE := TellStick ZNet Lite
783 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
784 BOARDNAME := TELLSTICK-ZNET-LITE
785 DEVICE_PROFILE := TELLSTICKZNETLITE
786 TPLINK_HWID := 0x00726001
787 CONSOLE := ttyATH0,115200
788 endef
789 TARGET_DEVICES += tellstick-znet-lite
790
791 define Device/oolite
792 $(Device/tplink-16mlzma)
793 DEVICE_TITLE := Gainstrong OOLITE
794 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
795 BOARDNAME := GS-OOLITE
796 DEVICE_PROFILE := OOLITE
797 TPLINK_HWID := 0x3C000101
798 CONSOLE := ttyATH0,115200
799 endef
800 TARGET_DEVICES += oolite
801
802 define Device/n5q
803 DEVICE_TITLE := ALFA Network N5Q
804 DEVICE_PACKAGES := rssileds -swconfig
805 BOARDNAME := N5Q
806 SUPPORTED_DEVICES := n5q
807 IMAGE_SIZE := 15872k
808 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
809 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
810 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
811 endef
812 TARGET_DEVICES += n5q
813
814 define Device/NBG6616
815 DEVICE_TITLE := ZyXEL NBG6616
816 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
817 BOARDNAME := NBG6616
818 KERNEL_SIZE := 2048k
819 IMAGE_SIZE := 15323k
820 MTDPARTS := spi0.0:192k(u-boot)ro,64k(env)ro,64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware)
821 CMDLINE += mem=128M
822 IMAGES := sysupgrade.bin
823 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
824 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
825 # We cannot currently build a factory image. It is the sysupgrade image
826 # prefixed with a header (which is actually written into the MTD device).
827 # The header is 2kiB and is filled with 0xff. The format seems to be:
828 # 2 bytes: 0x0000
829 # 2 bytes: checksum of the data partition (big endian)
830 # 4 bytes: length of the contained image file (big endian)
831 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
832 # 2 bytes: 0x0000
833 # 2 bytes: checksum over the header partition (big endian)
834 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
835 # rest: 0xff padding
836 #
837 # The checksums are calculated by adding up all bytes and if a 16bit
838 # overflow occurs, one is added and the sum is masked to 16 bit:
839 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
840 # Should the file have an odd number of bytes then the byte len-0x800 is
841 # used additionally.
842 # The checksum for the header is calcualted over the first 2048 bytes with
843 # the firmware checksum as the placeholder during calculation.
844 #
845 # The header is padded with 0xff to the erase block size of the device.
846 endef
847 TARGET_DEVICES += NBG6616
848
849 define Device/c-55
850 DEVICE_TITLE := AirTight Networks C-55
851 DEVICE_PACKAGES := kmod-ath9k
852 BOARDNAME := C-55
853 KERNEL_SIZE := 2048k
854 IMAGE_SIZE := 15872k
855 MTDPARTS := spi0.0:256k(u-boot)ro,128k(u-boot-env)ro,2048k(kernel),13824k(rootfs),13824k(opt)ro,2624k(failsafe)ro,64k(art)ro,15872k@0x60000(firmware)
856 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
857 endef
858 TARGET_DEVICES += c-55
859
860 define Device/hiwifi-hc6361
861 DEVICE_TITLE := HiWiFi HC6361
862 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
863 kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
864 BOARDNAME := HiWiFi-HC6361
865 DEVICE_PROFILE := HIWIFI_HC6361
866 IMAGE_SIZE := 16128k
867 KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
868 CONSOLE := ttyATH0,115200
869 MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
870 endef
871 TARGET_DEVICES += hiwifi-hc6361
872
873 define Device/seama
874 LOADER_TYPE := bin
875 BLOCKSIZE := 64k
876 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
877 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
878 KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
879 IMAGES := sysupgrade.bin factory.bin
880
881 # 64 bytes offset:
882 # - 28 bytes seama_header
883 # - 36 bytes of META data (4-bytes aligned)
884 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
885 IMAGE/sysupgrade.bin := \
886 $$(IMAGE/default) | seama | pad-rootfs | \
887 check-size $$$$(IMAGE_SIZE)
888 IMAGE/factory.bin := \
889 $$(IMAGE/default) | seama | pad-rootfs | \
890 seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
891 check-size $$$$(IMAGE_SIZE)
892 SEAMA_SIGNATURE :=
893 endef
894
895 define Device/dir-869-a1
896 $(Device/seama)
897 DEVICE_TITLE := D-Link DIR-869 rev. A1
898 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
899 BOARDNAME := DIR-869-A1
900 IMAGE_SIZE := 15872k
901 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
902 SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
903 IMAGE/factory.bin := \
904 $$(IMAGE/default) | pad-rootfs -x 64 | \
905 seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
906 check-size $$$$(IMAGE_SIZE)
907 endef
908 TARGET_DEVICES += dir-869-a1
909
910 define Device/mynet-n600
911 $(Device/seama)
912 DEVICE_TITLE := Western Digital My Net N600
913 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
914 BOARDNAME := MYNET-N600
915 IMAGE_SIZE := 15808k
916 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
917 SEAMA_SIGNATURE := wrgnd16_wd_db600
918 endef
919 TARGET_DEVICES += mynet-n600
920
921 define Device/mynet-n750
922 $(Device/seama)
923 DEVICE_TITLE := Western Digital My Net N750
924 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
925 BOARDNAME := MYNET-N750
926 IMAGE_SIZE := 15808k
927 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
928 SEAMA_SIGNATURE := wrgnd13_wd_av
929 endef
930 TARGET_DEVICES += mynet-n750
931
932 define Device/qihoo-c301
933 $(Device/seama)
934 DEVICE_TITLE := Qihoo C301
935 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
936 BOARDNAME := QIHOO-C301
937 IMAGE_SIZE := 15744k
938 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(devdata),64k(devconf),15744k(firmware),64k(warm_start),64k(action_image_config),64k(radiocfg)ro;spi0.1:15360k(upgrade2),1024k(privatedata)
939 SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
940 endef
941 TARGET_DEVICES += qihoo-c301
942
943 define Device/dap-2695-a1
944 DEVICE_TITLE := D-Link DAP-2695 rev. A1
945 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k
946 BOARDNAME := DAP-2695-A1
947 IMAGES := factory.img sysupgrade.bin
948 IMAGE_SIZE := 15360k
949 IMAGE/factory.img := append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
950 IMAGE/sysupgrade.bin := append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
951 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
952 KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
953 MTDPARTS := spi0.0:256k(bootloader)ro,64k(bdcfg)ro,64k(rgdb)ro,64k(langpack)ro,15360k(firmware),448k(captival)ro,64k(certificate)ro,64k(radiocfg)ro
954 DAP_SIGNATURE := wapac02_dkbs_dap2695
955 endef
956 TARGET_DEVICES += dap-2695-a1
957
958 define Device/bhr-4grv2
959 DEVICE_TITLE := Buffalo BHR-4GRV2
960 BOARDNAME := BHR-4GRV2
961 ROOTFS_SIZE := 14528k
962 KERNEL_SIZE := 1472k
963 IMAGE_SIZE := 16000k
964 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
965 IMAGES := sysupgrade.bin factory.bin
966 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
967 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
968 endef
969 TARGET_DEVICES += bhr-4grv2
970
971 define Device/wpj-16m
972 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
973 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
974 IMAGE_SIZE := 16128k
975 endef
976
977 define Device/wpj342
978 $(Device/wpj-16m)
979 DEVICE_TITLE := Compex WPJ342 (16MB flash)
980 BOARDNAME := WPJ342
981 endef
982 TARGET_DEVICES += wpj342
983
984 define Device/wpj344
985 $(Device/wpj-16m)
986 DEVICE_TITLE := Compex WPJ344 (16MB flash)
987 BOARDNAME := WPJ344
988 SUPPORTED_DEVICES := wpj344
989 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
990 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
991 endef
992 TARGET_DEVICES += wpj344
993
994 define Device/wpj531
995 $(Device/wpj-16m)
996 DEVICE_TITLE := Compex WPJ531 (16MB flash)
997 BOARDNAME := WPJ531
998 endef
999 TARGET_DEVICES += wpj531
1000
1001 define Device/wpj558
1002 $(Device/wpj-16m)
1003 DEVICE_TITLE := Compex WPJ558 (16MB flash)
1004 BOARDNAME := WPJ558
1005 SUPPORTED_DEVICES := wpj558
1006 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1007 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1008 endef
1009 TARGET_DEVICES += wpj558
1010
1011 define Device/wpj563
1012 $(Device/wpj-16m)
1013 DEVICE_TITLE := Compex WPJ563 (16MB flash)
1014 BOARDNAME := WPJ563
1015 endef
1016 TARGET_DEVICES += wpj563
1017
1018 define Device/wrtnode2q
1019 DEVICE_TITLE := WRTnode2Q
1020 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
1021 BOARDNAME := WRTNODE2Q
1022 IMAGE_SIZE := 16064k
1023 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,16064k(firmware),16384k@0x0(fullflash)
1024 endef
1025 TARGET_DEVICES += wrtnode2q
1026
1027 define Device/zbt-we1526
1028 DEVICE_TITLE := Zbtlink ZBT-WE1526
1029 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1030 BOARDNAME := ZBT-WE1526
1031 IMAGE_SIZE := 16000k
1032 KERNEL_SIZE := 1472k
1033 ROOTFS_SIZE := 14528k
1034 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
1035 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
1036 endef
1037 TARGET_DEVICES += zbt-we1526
1038
1039 define Device/fritz300e
1040 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
1041 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig -uboot-envtools
1042 BOARDNAME := FRITZ300E
1043 SUPPORTED_DEVICES := fritz300e
1044 IMAGE_SIZE := 15232k
1045 KERNEL := kernel-bin | patch-cmdline | lzma | eva-image
1046 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
1047 append-squashfs-fakeroot-be | pad-to 256 | \
1048 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1049 endef
1050 TARGET_DEVICES += fritz300e