65a7eb79c0a17a2e2d05462eeaafc6189a2a9a52
[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/r36a
635 DEVICE_TITLE := ALFA Network R36A
636 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport -swconfig
637 BOARDNAME := R36A
638 SUPPORTED_DEVICES := r36a
639 IMAGE_SIZE := 15872k
640 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
641 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
642 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
643 endef
644 TARGET_DEVICES += r36a
645
646 define Device/r602n
647 DEVICE_TITLE := P&W R602N
648 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
649 BOARDNAME := R602N
650 IMAGE_SIZE := 16000k
651 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
652 endef
653 TARGET_DEVICES += r602n
654
655 define Device/rut900
656 DEVICE_TITLE := Teltonika RUT900
657 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -uboot-envtools
658 BOARDNAME := RUT900
659 SUPPORTED_DEVICES := rut900
660 IMAGE_SIZE := 15552k
661 MTDPARTS := spi0.0:128k(u-boot)ro,64k(config)ro,64k(art)ro,15552k(firmware),576k(event-log)ro
662 TPLINK_HWID := 0x35000001
663 TPLINK_HWREV := 0x1
664 TPLINK_HEADER_VERSION := 1
665 KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
666 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma
667 IMAGES := sysupgrade.bin factory.bin
668 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
669 pad-rootfs | teltonika-fw-fake-checksum | append-string master |\
670 append-md5sum-bin | check-size $$$$(IMAGE_SIZE)
671 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
672 append-rootfs | pad-rootfs | append-metadata |\
673 check-size $$$$(IMAGE_SIZE)
674 endef
675 TARGET_DEVICES += rut900
676
677 define Device/mc-mac1200r
678 $(Device/tplink-8mlzma)
679 DEVICE_TITLE := Mercury MAC1200R
680 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
681 BOARDNAME := MC-MAC1200R
682 DEVICE_PROFILE := MAC1200R
683 TPLINK_HWID := 0x12000001
684 endef
685 TARGET_DEVICES += mc-mac1200r
686
687 define Device/minibox-v1
688 $(Device/tplink-16mlzma)
689 DEVICE_TITLE := Gainstrong MiniBox V1.0
690 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
691 BOARDNAME := MINIBOX-V1
692 DEVICE_PROFILE := MINIBOXV1
693 TPLINK_HWID := 0x3C000201
694 CONSOLE := ttyATH0,115200
695 endef
696 TARGET_DEVICES += minibox-v1
697
698 define Device/omy-g1
699 $(Device/tplink-16mlzma)
700 DEVICE_TITLE := OMYlink OMY-G1
701 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
702 BOARDNAME := OMY-G1
703 DEVICE_PROFILE := OMYG1
704 TPLINK_HWID := 0x06660101
705 endef
706 TARGET_DEVICES += omy-g1
707
708 define Device/omy-x1
709 $(Device/tplink-8mlzma)
710 DEVICE_TITLE := OMYlink OMY-X1
711 BOARDNAME := OMY-X1
712 DEVICE_PROFILE := OMYX1
713 TPLINK_HWID := 0x06660201
714 endef
715 TARGET_DEVICES += omy-x1
716
717 define Device/onion-omega
718 $(Device/tplink-16mlzma)
719 DEVICE_TITLE := Onion Omega
720 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
721 BOARDNAME := ONION-OMEGA
722 DEVICE_PROFILE := OMEGA
723 TPLINK_HWID := 0x04700001
724 CONSOLE := ttyATH0,115200
725 endef
726 TARGET_DEVICES += onion-omega
727
728 define Device/sc1750
729 DEVICE_TITLE := Abicom SC1750
730 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
731 BOARDNAME := SC1750
732 IMAGE_SIZE := 15744k
733 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
734 endef
735 TARGET_DEVICES += sc1750
736
737 define Device/sc300m
738 DEVICE_TITLE := Abicom SC300M
739 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
740 BOARDNAME := SC300M
741 IMAGE_SIZE := 15744k
742 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
743 endef
744 TARGET_DEVICES += sc300m
745
746 define Device/sc450
747 DEVICE_TITLE := Abicom SC450
748 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
749 BOARDNAME := SC450
750 IMAGE_SIZE := 15744k
751 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
752 endef
753 TARGET_DEVICES += sc450
754
755 define Device/smart-300
756 $(Device/tplink-8mlzma)
757 DEVICE_TITLE := NC-LINK SMART-300
758 BOARDNAME := SMART-300
759 DEVICE_PROFILE := SMART-300
760 TPLINK_HWID := 0x93410001
761 endef
762 TARGET_DEVICES += smart-300
763
764 define Device/som9331
765 $(Device/tplink-8mlzma)
766 DEVICE_TITLE := OpenEmbed SOM9331
767 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
768 BOARDNAME := SOM9331
769 DEVICE_PROFILE := SOM9331
770 TPLINK_HWID := 0x04800054
771 CONSOLE := ttyATH0,115200
772 endef
773 TARGET_DEVICES += som9331
774
775 define Device/sr3200
776 DEVICE_TITLE := YunCore SR3200
777 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
778 BOARDNAME := SR3200
779 IMAGE_SIZE := 16000k
780 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
781 endef
782 TARGET_DEVICES += sr3200
783
784 define Device/xd3200
785 $(Device/sr3200)
786 DEVICE_TITLE := YunCore XD3200
787 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
788 BOARDNAME := XD3200
789 endef
790 TARGET_DEVICES += xd3200
791
792 define Device/tellstick-znet-lite
793 $(Device/tplink-16mlzma)
794 DEVICE_TITLE := TellStick ZNet Lite
795 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
796 BOARDNAME := TELLSTICK-ZNET-LITE
797 DEVICE_PROFILE := TELLSTICKZNETLITE
798 TPLINK_HWID := 0x00726001
799 CONSOLE := ttyATH0,115200
800 endef
801 TARGET_DEVICES += tellstick-znet-lite
802
803 define Device/oolite
804 $(Device/tplink-16mlzma)
805 DEVICE_TITLE := Gainstrong OOLITE
806 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
807 BOARDNAME := GS-OOLITE
808 DEVICE_PROFILE := OOLITE
809 TPLINK_HWID := 0x3C000101
810 CONSOLE := ttyATH0,115200
811 endef
812 TARGET_DEVICES += oolite
813
814 define Device/n5q
815 DEVICE_TITLE := ALFA Network N5Q
816 DEVICE_PACKAGES := rssileds -swconfig
817 BOARDNAME := N5Q
818 SUPPORTED_DEVICES := n5q
819 IMAGE_SIZE := 15872k
820 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
821 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
822 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
823 endef
824 TARGET_DEVICES += n5q
825
826 define Device/NBG6616
827 DEVICE_TITLE := ZyXEL NBG6616
828 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
829 BOARDNAME := NBG6616
830 KERNEL_SIZE := 2048k
831 IMAGE_SIZE := 15323k
832 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)
833 CMDLINE += mem=128M
834 IMAGES := sysupgrade.bin
835 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
836 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
837 # We cannot currently build a factory image. It is the sysupgrade image
838 # prefixed with a header (which is actually written into the MTD device).
839 # The header is 2kiB and is filled with 0xff. The format seems to be:
840 # 2 bytes: 0x0000
841 # 2 bytes: checksum of the data partition (big endian)
842 # 4 bytes: length of the contained image file (big endian)
843 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
844 # 2 bytes: 0x0000
845 # 2 bytes: checksum over the header partition (big endian)
846 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
847 # rest: 0xff padding
848 #
849 # The checksums are calculated by adding up all bytes and if a 16bit
850 # overflow occurs, one is added and the sum is masked to 16 bit:
851 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
852 # Should the file have an odd number of bytes then the byte len-0x800 is
853 # used additionally.
854 # The checksum for the header is calcualted over the first 2048 bytes with
855 # the firmware checksum as the placeholder during calculation.
856 #
857 # The header is padded with 0xff to the erase block size of the device.
858 endef
859 TARGET_DEVICES += NBG6616
860
861 define Device/c-55
862 DEVICE_TITLE := AirTight Networks C-55
863 DEVICE_PACKAGES := kmod-ath9k
864 BOARDNAME := C-55
865 KERNEL_SIZE := 2048k
866 IMAGE_SIZE := 15872k
867 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)
868 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
869 endef
870 TARGET_DEVICES += c-55
871
872 define Device/hiwifi-hc6361
873 DEVICE_TITLE := HiWiFi HC6361
874 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
875 kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
876 BOARDNAME := HiWiFi-HC6361
877 DEVICE_PROFILE := HIWIFI_HC6361
878 IMAGE_SIZE := 16128k
879 KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
880 CONSOLE := ttyATH0,115200
881 MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
882 endef
883 TARGET_DEVICES += hiwifi-hc6361
884
885 define Device/seama
886 LOADER_TYPE := bin
887 BLOCKSIZE := 64k
888 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
889 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
890 KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
891 IMAGES := sysupgrade.bin factory.bin
892
893 # 64 bytes offset:
894 # - 28 bytes seama_header
895 # - 36 bytes of META data (4-bytes aligned)
896 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
897 IMAGE/sysupgrade.bin := \
898 $$(IMAGE/default) | seama | pad-rootfs | \
899 check-size $$$$(IMAGE_SIZE)
900 IMAGE/factory.bin := \
901 $$(IMAGE/default) | seama | pad-rootfs | \
902 seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
903 check-size $$$$(IMAGE_SIZE)
904 SEAMA_SIGNATURE :=
905 endef
906
907 define Device/dir-869-a1
908 $(Device/seama)
909 DEVICE_TITLE := D-Link DIR-869 rev. A1
910 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
911 BOARDNAME := DIR-869-A1
912 IMAGE_SIZE := 15872k
913 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
914 SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
915 IMAGE/factory.bin := \
916 $$(IMAGE/default) | pad-rootfs -x 64 | \
917 seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
918 check-size $$$$(IMAGE_SIZE)
919 endef
920 TARGET_DEVICES += dir-869-a1
921
922 define Device/mynet-n600
923 $(Device/seama)
924 DEVICE_TITLE := Western Digital My Net N600
925 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
926 BOARDNAME := MYNET-N600
927 IMAGE_SIZE := 15808k
928 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
929 SEAMA_SIGNATURE := wrgnd16_wd_db600
930 endef
931 TARGET_DEVICES += mynet-n600
932
933 define Device/mynet-n750
934 $(Device/seama)
935 DEVICE_TITLE := Western Digital My Net N750
936 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
937 BOARDNAME := MYNET-N750
938 IMAGE_SIZE := 15808k
939 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
940 SEAMA_SIGNATURE := wrgnd13_wd_av
941 endef
942 TARGET_DEVICES += mynet-n750
943
944 define Device/qihoo-c301
945 $(Device/seama)
946 DEVICE_TITLE := Qihoo C301
947 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
948 BOARDNAME := QIHOO-C301
949 IMAGE_SIZE := 15744k
950 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)
951 SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
952 endef
953 TARGET_DEVICES += qihoo-c301
954
955 define Device/dap-2695-a1
956 DEVICE_TITLE := D-Link DAP-2695 rev. A1
957 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k
958 BOARDNAME := DAP-2695-A1
959 IMAGES := factory.img sysupgrade.bin
960 IMAGE_SIZE := 15360k
961 IMAGE/factory.img := append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
962 IMAGE/sysupgrade.bin := append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
963 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
964 KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
965 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
966 DAP_SIGNATURE := wapac02_dkbs_dap2695
967 endef
968 TARGET_DEVICES += dap-2695-a1
969
970 define Device/bhr-4grv2
971 DEVICE_TITLE := Buffalo BHR-4GRV2
972 BOARDNAME := BHR-4GRV2
973 ROOTFS_SIZE := 14528k
974 KERNEL_SIZE := 1472k
975 IMAGE_SIZE := 16000k
976 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
977 IMAGES := sysupgrade.bin factory.bin
978 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
979 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
980 endef
981 TARGET_DEVICES += bhr-4grv2
982
983 define Device/wlr8100
984 DEVICE_TITLE := Sitecom WLR-8100
985 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb3 \
986 kmod-ath10k ath10k-firmware-qca988x
987 BOARDNAME := WLR8100
988 IMAGE_SIZE := 15424k
989 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,15424k(firmware),256k(manufacture)ro,64k(backup)ro,320k(storage)ro,64k(art)ro
990 endef
991 TARGET_DEVICES += wlr8100
992
993 define Device/wpj-16m
994 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
995 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
996 IMAGE_SIZE := 16128k
997 endef
998
999 define Device/wpj342
1000 $(Device/wpj-16m)
1001 DEVICE_TITLE := Compex WPJ342 (16MB flash)
1002 BOARDNAME := WPJ342
1003 endef
1004 TARGET_DEVICES += wpj342
1005
1006 define Device/wpj344
1007 $(Device/wpj-16m)
1008 DEVICE_TITLE := Compex WPJ344 (16MB flash)
1009 BOARDNAME := WPJ344
1010 SUPPORTED_DEVICES := wpj344
1011 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1012 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1013 endef
1014 TARGET_DEVICES += wpj344
1015
1016 define Device/wpj531
1017 $(Device/wpj-16m)
1018 DEVICE_TITLE := Compex WPJ531 (16MB flash)
1019 BOARDNAME := WPJ531
1020 endef
1021 TARGET_DEVICES += wpj531
1022
1023 define Device/wpj558
1024 $(Device/wpj-16m)
1025 DEVICE_TITLE := Compex WPJ558 (16MB flash)
1026 BOARDNAME := WPJ558
1027 SUPPORTED_DEVICES := wpj558
1028 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1029 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1030 endef
1031 TARGET_DEVICES += wpj558
1032
1033 define Device/wpj563
1034 $(Device/wpj-16m)
1035 DEVICE_TITLE := Compex WPJ563 (16MB flash)
1036 BOARDNAME := WPJ563
1037 endef
1038 TARGET_DEVICES += wpj563
1039
1040 define Device/wrtnode2q
1041 DEVICE_TITLE := WRTnode2Q
1042 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
1043 BOARDNAME := WRTNODE2Q
1044 IMAGE_SIZE := 16064k
1045 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,16064k(firmware),16384k@0x0(fullflash)
1046 endef
1047 TARGET_DEVICES += wrtnode2q
1048
1049 define Device/zbt-we1526
1050 DEVICE_TITLE := Zbtlink ZBT-WE1526
1051 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1052 BOARDNAME := ZBT-WE1526
1053 IMAGE_SIZE := 16000k
1054 KERNEL_SIZE := 1472k
1055 ROOTFS_SIZE := 14528k
1056 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
1057 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
1058 endef
1059 TARGET_DEVICES += zbt-we1526
1060
1061 define Device/fritz300e
1062 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
1063 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig -uboot-envtools
1064 BOARDNAME := FRITZ300E
1065 SUPPORTED_DEVICES := fritz300e
1066 IMAGE_SIZE := 15232k
1067 KERNEL := kernel-bin | patch-cmdline | lzma | eva-image
1068 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
1069 append-squashfs-fakeroot-be | pad-to 256 | \
1070 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1071 endef
1072 TARGET_DEVICES += fritz300e