ar71xx: add support for YunCore T830
[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 $(VERSION_DIST) -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 $(VERSION_DIST) 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)) $(VERSION_DIST) 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 DEVICE_PACKAGES := -swconfig -uboot-envtools
184 BOARDNAME := CF-E316N-V2
185 IMAGE_SIZE := 16192k
186 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
187 endef
188 TARGET_DEVICES += cf-e316n-v2
189
190 define Device/cf-e320n-v2
191 $(Device/cf-e316n-v2)
192 DEVICE_TITLE := COMFAST CF-E320N v2
193 DEVICE_PACKAGES += kmod-usb-core kmod-usb2
194 BOARDNAME := CF-E320N-V2
195 endef
196 TARGET_DEVICES += cf-e320n-v2
197
198 define Device/cf-e355ac-v1
199 DEVICE_TITLE := COMFAST CF-E355AC v1
200 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x \
201 -swconfig -uboot-envtools
202 BOARDNAME := CF-E355AC-V1
203 IMAGE_SIZE := 16192k
204 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
205 endef
206 TARGET_DEVICES += cf-e355ac-v1
207
208 define Device/cf-e355ac-v2
209 $(Device/cf-e355ac-v1)
210 DEVICE_TITLE := COMFAST CF-E355AC v2
211 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9888 \
212 -swconfig -uboot-envtools
213 BOARDNAME := CF-E355AC-V2
214 endef
215 TARGET_DEVICES += cf-e355ac-v2
216
217 define Device/cf-e375ac
218 DEVICE_TITLE := COMFAST CF-E375AC
219 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9888 \
220 -uboot-envtools
221 BOARDNAME := CF-E375AC
222 IMAGE_SIZE := 16000k
223 MTDPARTS := spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
224 endef
225 TARGET_DEVICES += cf-e375ac
226
227 define Device/cf-e380ac-v1
228 DEVICE_TITLE := COMFAST CF-E380AC v1
229 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x \
230 -swconfig -uboot-envtools
231 BOARDNAME := CF-E380AC-V1
232 IMAGE_SIZE := 16128k
233 MTDPARTS := spi0.0:128k(u-boot)ro,64k(art)ro,16128k(firmware),64k(art-backup)ro
234 endef
235 TARGET_DEVICES += cf-e380ac-v1
236
237 define Device/cf-e380ac-v2
238 $(Device/cf-e380ac-v1)
239 DEVICE_TITLE := COMFAST CF-E380AC v2
240 BOARDNAME := CF-E380AC-V2
241 IMAGE_SIZE := 16000k
242 MTDPARTS := spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
243 endef
244 TARGET_DEVICES += cf-e380ac-v2
245
246 define Device/cf-e385ac
247 DEVICE_TITLE := COMFAST CF-E385AC
248 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9984 \
249 -uboot-envtools
250 BOARDNAME := CF-E385AC
251 IMAGE_SIZE := 16000k
252 MTDPARTS := spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
253 endef
254 TARGET_DEVICES += cf-e385ac
255
256 define Device/cf-e520n
257 DEVICE_TITLE := COMFAST CF-E520N
258 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig -uboot-envtools
259 BOARDNAME := CF-E520N
260 IMAGE_SIZE := 8000k
261 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,8000k(firmware),64k(art-backup)ro
262 endef
263 TARGET_DEVICES += cf-e520n
264
265 define Device/cf-e530n
266 $(Device/cf-e520n)
267 DEVICE_TITLE := COMFAST CF-E530N
268 BOARDNAME := CF-E530N
269 endef
270 TARGET_DEVICES += cf-e530n
271
272 define Device/cpe505n
273 DEVICE_TITLE := P&W CPE505N
274 BOARDNAME := CPE505N
275 IMAGE_SIZE := 16000k
276 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
277 endef
278 TARGET_DEVICES += cpe505n
279
280 define Device/cpe830
281 $(Device/ap90q)
282 DEVICE_TITLE := YunCore CPE830
283 DEVICE_PACKAGES := rssileds
284 BOARDNAME := CPE830
285 endef
286 TARGET_DEVICES += cpe830
287
288 define Device/cpe870
289 DEVICE_TITLE := YunCore CPE870
290 DEVICE_PACKAGES := rssileds
291 BOARDNAME := CPE870
292 IMAGE_SIZE := 7936k
293 MTDPARTS := spi0.0:64k(u-boot)ro,64k(u-boot-env),7936k(firmware),64k(config)ro,64k(art)ro
294 endef
295 TARGET_DEVICES += cpe870
296
297 define Device/dragino2
298 BOARDNAME := DRAGINO2
299 CONSOLE := ttyATH0,115200
300 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
301 DEVICE_TITLE := Dragino 2 (MS14)
302 IMAGE_SIZE := 16000k
303 MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
304 endef
305 TARGET_DEVICES += dragino2
306
307 define Device/e1700ac-v2-16M
308 DEVICE_TITLE := WHQX E1700AC v2 (16MB flash)
309 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x kmod-usb-core \
310 kmod-usb2 kmod-usb-ledtrig-usbport
311 BOARDNAME := E1700AC-V2
312 SUPPORTED_DEVICES := e1700ac-v2
313 IMAGE_SIZE := 15936k
314 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(pri-data)ro,64k(art)ro,-(firmware)
315 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
316 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
317 endef
318 TARGET_DEVICES += e1700ac-v2-16M
319
320 define Device/e1700ac-v2-8M
321 $(Device/e1700ac-v2-16M)
322 DEVICE_TITLE := WHQX E1700AC v2 (8MB flash)
323 IMAGE_SIZE := 7744k
324 endef
325 TARGET_DEVICES += e1700ac-v2-8M
326
327 define Device/e600g-v2-16M
328 DEVICE_TITLE := WHQX E600G v2 (16MB flash)
329 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
330 BOARDNAME := E600G-V2
331 SUPPORTED_DEVICES := e600g-v2
332 IMAGE_SIZE := 15936k
333 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(pri-data)ro,64k(art)ro,-(firmware)
334 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
335 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
336 endef
337 TARGET_DEVICES += e600g-v2-16M
338
339 define Device/e600g-v2-8M
340 $(Device/e600g-v2-16M)
341 DEVICE_TITLE := WHQX E600G v2 (8MB flash)
342 IMAGE_SIZE := 7744k
343 endef
344 TARGET_DEVICES += e600g-v2-8M
345
346 define Device/e600gac-v2-16M
347 DEVICE_TITLE := WHQX E600GAC v2 (16MB flash)
348 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887 kmod-usb-core \
349 kmod-usb2 -swconfig
350 BOARDNAME := E600GAC-V2
351 SUPPORTED_DEVICES := e600gac-v2
352 IMAGE_SIZE := 15936k
353 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(pri-data)ro,64k(art)ro,-(firmware)
354 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
355 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
356 endef
357 TARGET_DEVICES += e600gac-v2-16M
358
359 define Device/e600gac-v2-8M
360 $(Device/e600gac-v2-16M)
361 DEVICE_TITLE := WHQX E600GAC v2 (8MB flash)
362 IMAGE_SIZE := 7744k
363 endef
364 TARGET_DEVICES += e600gac-v2-8M
365
366 define Device/ew-balin
367 DEVICE_TITLE := Embedded Wireless Balin Platform
368 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea
369 BOARDNAME := EW-BALIN
370 IMAGE_SIZE := 16000k
371 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
372 endef
373 TARGET_DEVICES += ew-balin
374
375 define Device/ew-dorin
376 $(Device/ew-balin)
377 DEVICE_TITLE := Embedded Wireless Dorin Platform
378 BOARDNAME := EW-DORIN
379 CONSOLE := ttyATH0,115200
380 endef
381 TARGET_DEVICES += ew-dorin
382
383 define Device/ew-dorin-router
384 $(Device/ew-dorin)
385 DEVICE_TITLE := Embedded Wireless Dorin Router Platform
386 BOARDNAME := EW-DORIN-ROUTER
387 endef
388 TARGET_DEVICES += ew-dorin-router
389
390 define Device/rme-eg200
391 DEVICE_TITLE := eTactica EG-200
392 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-oneshot \
393 kmod-usb-serial kmod-usb-serial-ftdi \
394 kmod-usb-storage \
395 kmod-fs-ext4
396 BOARDNAME := RME-EG200
397 IMAGE_SIZE := 16000k
398 CONSOLE := ttyATH0,115200
399 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
400 endef
401 TARGET_DEVICES += rme-eg200
402
403 define Device/weio
404 DEVICE_TITLE := WeIO
405 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
406 BOARDNAME := WEIO
407 IMAGE_SIZE := 16000k
408 CONSOLE := ttyATH0,115200
409 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
410 endef
411 TARGET_DEVICES += weio
412
413 define Device/gl-ar150
414 DEVICE_TITLE := GL.iNet GL-AR150
415 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
416 BOARDNAME := GL-AR150
417 IMAGE_SIZE := 16000k
418 CONSOLE := ttyATH0,115200
419 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
420 endef
421 TARGET_DEVICES += gl-ar150
422
423 define Device/gl-ar300
424 DEVICE_TITLE := GL.iNet GL-AR300
425 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
426 BOARDNAME := GL-AR300
427 IMAGE_SIZE := 16000k
428 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
429 endef
430 TARGET_DEVICES += gl-ar300
431
432 define Device/gl-ar300m
433 DEVICE_TITLE := GL.iNet GL-AR300M
434 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
435 BOARDNAME := GL-AR300M
436 IMAGE_SIZE := 16000k
437 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
438 endef
439 TARGET_DEVICES += gl-ar300m
440
441 define Device/gl-ar750
442 DEVICE_TITLE := GL.iNet GL-AR750
443 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887 kmod-usb-core \
444 kmod-usb2 kmod-usb-storage
445 BOARDNAME := GL-AR750
446 SUPPORTED_DEVICES := gl-ar750
447 IMAGE_SIZE := 16000k
448 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
449 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
450 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
451 endef
452 TARGET_DEVICES += gl-ar750
453
454 define Device/gl-domino
455 DEVICE_TITLE := GL.iNet Domino Pi
456 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
457 BOARDNAME := DOMINO
458 IMAGE_SIZE := 16000k
459 CONSOLE := ttyATH0,115200
460 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
461 endef
462 TARGET_DEVICES += gl-domino
463
464 define Device/gl-mifi
465 DEVICE_TITLE := GL.iNet GL-MiFi
466 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
467 BOARDNAME := GL-MIFI
468 IMAGE_SIZE := 16000k
469 CONSOLE := ttyATH0,115200
470 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
471 endef
472 TARGET_DEVICES += gl-mifi
473
474 define Device/gl-usb150
475 DEVICE_TITLE := GL.iNet GL-USB150
476 DEVICE_PACKAGES := -swconfig
477 BOARDNAME := GL-USB150
478 IMAGE_SIZE := 16000k
479 CONSOLE := ttyATH0,115200
480 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
481 SUPPORTED_DEVICES := gl-usb150
482 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
483 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
484 endef
485 TARGET_DEVICES += gl-usb150
486
487 define Device/lima
488 DEVICE_TITLE := 8devices Lima
489 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
490 BOARDNAME := LIMA
491 IMAGE_SIZE := 15616k
492 MTDPARTS := spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,256k(art)ro,-(firmware)
493 endef
494 TARGET_DEVICES += lima
495
496 define Device/mr12
497 DEVICE_TITLE := Meraki MR12
498 DEVICE_PACKAGES := kmod-spi-gpio
499 BOARDNAME := MR12
500 ROOTFS_SIZE := 13440k
501 IMAGE_SIZE := 15680k
502 MTDPARTS := spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
503 IMAGE/kernel.bin := append-kernel
504 IMAGE/rootfs.bin := append-rootfs | pad-rootfs
505 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
506 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
507 endef
508 TARGET_DEVICES += mr12
509
510 define Device/mr16
511 $(Device/mr12)
512 DEVICE_TITLE := Meraki MR16
513 BOARDNAME := MR16
514 endef
515 TARGET_DEVICES += mr16
516
517 define Device/dr342
518 DEVICE_TITLE := Wallys DR342
519 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
520 BOARDNAME := DR342
521 IMAGE_SIZE := 16000k
522 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,16000k(firmware),64k(art)ro
523 endef
524 TARGET_DEVICES += dr342
525
526 define Device/dr344
527 DEVICE_TITLE := Wallys DR344
528 BOARDNAME := DR344
529 KERNEL_SIZE := 1408k
530 ROOTFS_SIZE := 6336k
531 IMAGE_SIZE := 7744k
532 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
533 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
534 endef
535
536 define Device/dr531
537 DEVICE_TITLE := Wallys DR531
538 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
539 BOARDNAME := DR531
540 IMAGE_SIZE := 7808k
541 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
542 endef
543 TARGET_DEVICES += dr531
544
545 define Device/wndr3700
546 DEVICE_TITLE := NETGEAR WNDR3700
547 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
548 BOARDNAME := WNDR3700
549 NETGEAR_KERNEL_MAGIC := 0x33373030
550 NETGEAR_BOARD_ID := WNDR3700
551 IMAGE_SIZE := 7680k
552 MTDPARTS := spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
553 IMAGES := sysupgrade.bin factory.img factory-NA.img
554 KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
555 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
556 IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
557 IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
558 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
559 endef
560 TARGET_DEVICES += wndr3700
561
562 define Device/wndr3700v2
563 $(Device/wndr3700)
564 DEVICE_TITLE := NETGEAR WNDR3700 v2
565 NETGEAR_BOARD_ID := WNDR3700v2
566 NETGEAR_KERNEL_MAGIC := 0x33373031
567 NETGEAR_HW_ID := 29763654+16+64
568 IMAGE_SIZE := 15872k
569 MTDPARTS := spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
570 IMAGES := sysupgrade.bin factory.img
571 endef
572 TARGET_DEVICES += wndr3700v2
573
574 define Device/wndr3800
575 $(Device/wndr3700v2)
576 DEVICE_TITLE := NETGEAR WNDR3800
577 NETGEAR_BOARD_ID := WNDR3800
578 NETGEAR_HW_ID := 29763654+16+128
579 endef
580 TARGET_DEVICES += wndr3800
581
582 define Device/wndr3800ch
583 $(Device/wndr3800)
584 DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
585 NETGEAR_BOARD_ID := WNDR3800CH
586 endef
587 TARGET_DEVICES += wndr3800ch
588
589 define Device/wndrmac
590 $(Device/wndr3700v2)
591 DEVICE_TITLE := NETGEAR WNDRMAC
592 NETGEAR_BOARD_ID := WNDRMAC
593 endef
594 TARGET_DEVICES += wndrmac
595
596 define Device/wndrmacv2
597 $(Device/wndr3800)
598 DEVICE_TITLE := NETGEAR WNDRMAC v2
599 NETGEAR_BOARD_ID := WNDRMACv2
600 endef
601 TARGET_DEVICES += wndrmacv2
602
603 define Device/cap324
604 DEVICE_TITLE := PowerCloud CAP324 Cloud AP
605 BOARDNAME := CAP324
606 DEVICE_PROFILE := CAP324
607 IMAGE_SIZE := 15296k
608 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
609 endef
610 TARGET_DEVICES += cap324
611
612 define Device/cap324-nocloud
613 DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
614 BOARDNAME := CAP324
615 DEVICE_PROFILE := CAP324
616 IMAGE_SIZE := 16000k
617 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
618 endef
619 TARGET_DEVICES += cap324-nocloud
620
621 define Device/cr3000
622 DEVICE_TITLE := PowerCloud CR3000 Cloud Router
623 BOARDNAME := CR3000
624 DEVICE_PROFILE := CR3000
625 IMAGE_SIZE := 7104k
626 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
627 endef
628 TARGET_DEVICES += cr3000
629
630 define Device/cr3000-nocloud
631 DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
632 BOARDNAME := CR3000
633 DEVICE_PROFILE := CR3000
634 IMAGE_SIZE := 7808k
635 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
636 endef
637 TARGET_DEVICES += cr3000-nocloud
638
639 define Device/cr5000
640 DEVICE_TITLE := PowerCloud CR5000 Cloud Router
641 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
642 BOARDNAME := CR5000
643 DEVICE_PROFILE := CR5000
644 IMAGE_SIZE := 7104k
645 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
646 endef
647 TARGET_DEVICES += cr5000
648
649 define Device/cr5000-nocloud
650 DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
651 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
652 BOARDNAME := CR5000
653 DEVICE_PROFILE := CR5000
654 IMAGE_SIZE := 7808k
655 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
656 endef
657 TARGET_DEVICES += cr5000-nocloud
658
659 define Device/pqi-air-pen
660 DEVICE_TITLE := PQI Air Pen
661 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
662 BOARDNAME := PQI-AIR-PEN
663 IMAGE_SIZE := 7744k
664 CONSOLE := ttyATH0,115200
665 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
666 endef
667 TARGET_DEVICES += pqi-air-pen
668
669 define Device/antminer-s1
670 $(Device/tplink-8mlzma)
671 DEVICE_TITLE := Antminer-S1
672 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
673 BOARDNAME := ANTMINER-S1
674 DEVICE_PROFILE := ANTMINERS1
675 TPLINK_HWID := 0x04440101
676 CONSOLE := ttyATH0,115200
677 endef
678 TARGET_DEVICES += antminer-s1
679
680 define Device/antminer-s3
681 $(Device/tplink-8mlzma)
682 DEVICE_TITLE := Antminer-S3
683 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
684 BOARDNAME := ANTMINER-S3
685 DEVICE_PROFILE := ANTMINERS3
686 TPLINK_HWID := 0x04440301
687 CONSOLE := ttyATH0,115200
688 endef
689 TARGET_DEVICES += antminer-s3
690
691 define Device/antrouter-r1
692 $(Device/tplink-8mlzma)
693 DEVICE_TITLE := Antrouter-R1
694 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
695 BOARDNAME := ANTROUTER-R1
696 DEVICE_PROFILE := ANTROUTERR1
697 TPLINK_HWID := 0x44440101
698 CONSOLE := ttyATH0,115200
699 endef
700 TARGET_DEVICES += antrouter-r1
701
702 define Device/el-m150
703 $(Device/tplink-8mlzma)
704 DEVICE_TITLE := EasyLink EL-M150
705 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
706 BOARDNAME := EL-M150
707 DEVICE_PROFILE := ELM150
708 TPLINK_HWID := 0x01500101
709 CONSOLE := ttyATH0,115200
710 endef
711 TARGET_DEVICES += el-m150
712
713 define Device/el-mini
714 $(Device/tplink-8mlzma)
715 DEVICE_TITLE := EasyLink EL-MINI
716 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
717 BOARDNAME := EL-MINI
718 DEVICE_PROFILE := ELMINI
719 TPLINK_HWID := 0x01530001
720 CONSOLE := ttyATH0,115200
721 endef
722 TARGET_DEVICES += el-mini
723
724 define Device/gl-inet-6408A-v1
725 $(Device/tplink-8mlzma)
726 DEVICE_TITLE := GL.iNet 6408
727 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
728 BOARDNAME := GL-INET
729 DEVICE_PROFILE := GLINET
730 TPLINK_HWID := 0x08000001
731 CONSOLE := ttyATH0,115200
732 endef
733 TARGET_DEVICES += gl-inet-6408A-v1
734
735 define Device/gl-inet-6416A-v1
736 $(Device/tplink-16mlzma)
737 DEVICE_TITLE := GL.iNet 6416
738 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
739 BOARDNAME := GL-INET
740 DEVICE_PROFILE := GLINET
741 TPLINK_HWID := 0x08000001
742 CONSOLE := ttyATH0,115200
743 endef
744 TARGET_DEVICES += gl-inet-6416A-v1
745
746 define Device/jwap230
747 DEVICE_TITLE := jjPlus JWAP230
748 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
749 BOARDNAME := JWAP230
750 IMAGE_SIZE := 16000k
751 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
752 endef
753 TARGET_DEVICES += jwap230
754
755 define Device/r36a
756 DEVICE_TITLE := ALFA Network R36A
757 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport -swconfig
758 BOARDNAME := R36A
759 SUPPORTED_DEVICES := r36a
760 IMAGE_SIZE := 15872k
761 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
762 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
763 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
764 endef
765 TARGET_DEVICES += r36a
766
767 define Device/r602n
768 DEVICE_TITLE := P&W R602N
769 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
770 BOARDNAME := R602N
771 IMAGE_SIZE := 16000k
772 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
773 endef
774 TARGET_DEVICES += r602n
775
776 define Device/rut900
777 DEVICE_TITLE := Teltonika RUT900
778 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -uboot-envtools
779 BOARDNAME := RUT900
780 SUPPORTED_DEVICES := rut900
781 IMAGE_SIZE := 15552k
782 MTDPARTS := spi0.0:128k(u-boot)ro,64k(config)ro,64k(art)ro,15552k(firmware),576k(event-log)ro
783 TPLINK_HWID := 0x35000001
784 TPLINK_HWREV := 0x1
785 TPLINK_HEADER_VERSION := 1
786 KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
787 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma
788 IMAGES := sysupgrade.bin factory.bin
789 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
790 pad-rootfs | teltonika-fw-fake-checksum | append-string master |\
791 append-md5sum-bin | check-size $$$$(IMAGE_SIZE)
792 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
793 append-rootfs | pad-rootfs | append-metadata |\
794 check-size $$$$(IMAGE_SIZE)
795 endef
796 TARGET_DEVICES += rut900
797
798 define Device/mc-mac1200r
799 $(Device/tplink-8mlzma)
800 DEVICE_TITLE := Mercury MAC1200R
801 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
802 BOARDNAME := MC-MAC1200R
803 DEVICE_PROFILE := MAC1200R
804 TPLINK_HWID := 0x12000001
805 endef
806 TARGET_DEVICES += mc-mac1200r
807
808 define Device/minibox-v1
809 $(Device/tplink-16mlzma)
810 DEVICE_TITLE := Gainstrong MiniBox V1.0
811 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
812 BOARDNAME := MINIBOX-V1
813 DEVICE_PROFILE := MINIBOXV1
814 TPLINK_HWID := 0x3C000201
815 CONSOLE := ttyATH0,115200
816 endef
817 TARGET_DEVICES += minibox-v1
818
819 define Device/omy-g1
820 $(Device/tplink-16mlzma)
821 DEVICE_TITLE := OMYlink OMY-G1
822 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
823 BOARDNAME := OMY-G1
824 DEVICE_PROFILE := OMYG1
825 TPLINK_HWID := 0x06660101
826 endef
827 TARGET_DEVICES += omy-g1
828
829 define Device/omy-x1
830 $(Device/tplink-8mlzma)
831 DEVICE_TITLE := OMYlink OMY-X1
832 BOARDNAME := OMY-X1
833 DEVICE_PROFILE := OMYX1
834 TPLINK_HWID := 0x06660201
835 endef
836 TARGET_DEVICES += omy-x1
837
838 define Device/onion-omega
839 $(Device/tplink-16mlzma)
840 DEVICE_TITLE := Onion Omega
841 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
842 BOARDNAME := ONION-OMEGA
843 DEVICE_PROFILE := OMEGA
844 TPLINK_HWID := 0x04700001
845 CONSOLE := ttyATH0,115200
846 endef
847 TARGET_DEVICES += onion-omega
848
849 define Device/sc1750
850 DEVICE_TITLE := Abicom SC1750
851 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
852 BOARDNAME := SC1750
853 IMAGE_SIZE := 15744k
854 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
855 endef
856 TARGET_DEVICES += sc1750
857
858 define Device/sc300m
859 DEVICE_TITLE := Abicom SC300M
860 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
861 BOARDNAME := SC300M
862 IMAGE_SIZE := 15744k
863 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
864 endef
865 TARGET_DEVICES += sc300m
866
867 define Device/sc450
868 DEVICE_TITLE := Abicom SC450
869 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
870 BOARDNAME := SC450
871 IMAGE_SIZE := 15744k
872 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
873 endef
874 TARGET_DEVICES += sc450
875
876 define Device/smart-300
877 $(Device/tplink-8mlzma)
878 DEVICE_TITLE := NC-LINK SMART-300
879 BOARDNAME := SMART-300
880 DEVICE_PROFILE := SMART-300
881 TPLINK_HWID := 0x93410001
882 endef
883 TARGET_DEVICES += smart-300
884
885 define Device/som9331
886 $(Device/tplink-8mlzma)
887 DEVICE_TITLE := OpenEmbed SOM9331
888 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
889 BOARDNAME := SOM9331
890 DEVICE_PROFILE := SOM9331
891 TPLINK_HWID := 0x04800054
892 CONSOLE := ttyATH0,115200
893 endef
894 TARGET_DEVICES += som9331
895
896 define Device/sr3200
897 DEVICE_TITLE := YunCore SR3200
898 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
899 BOARDNAME := SR3200
900 IMAGE_SIZE := 16000k
901 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
902 endef
903 TARGET_DEVICES += sr3200
904
905 define Device/xd3200
906 $(Device/sr3200)
907 DEVICE_TITLE := YunCore XD3200
908 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
909 BOARDNAME := XD3200
910 endef
911 TARGET_DEVICES += xd3200
912
913 define Device/t830
914 DEVICE_TITLE := YunCore T830
915 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
916 BOARDNAME := T830
917 IMAGE_SIZE := 16000k
918 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
919 SUPPORTED_DEVICES := t830
920 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
921 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
922 endef
923 TARGET_DEVICES += t830
924
925 define Device/tellstick-znet-lite
926 $(Device/tplink-16mlzma)
927 DEVICE_TITLE := TellStick ZNet Lite
928 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
929 BOARDNAME := TELLSTICK-ZNET-LITE
930 DEVICE_PROFILE := TELLSTICKZNETLITE
931 TPLINK_HWID := 0x00726001
932 CONSOLE := ttyATH0,115200
933 endef
934 TARGET_DEVICES += tellstick-znet-lite
935
936 define Device/oolite
937 $(Device/tplink-16mlzma)
938 DEVICE_TITLE := Gainstrong OOLITE
939 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
940 BOARDNAME := GS-OOLITE
941 DEVICE_PROFILE := OOLITE
942 TPLINK_HWID := 0x3C000101
943 CONSOLE := ttyATH0,115200
944 endef
945 TARGET_DEVICES += oolite
946
947 define Device/n5q
948 DEVICE_TITLE := ALFA Network N5Q
949 DEVICE_PACKAGES := rssileds -swconfig
950 BOARDNAME := N5Q
951 SUPPORTED_DEVICES := n5q
952 IMAGE_SIZE := 15872k
953 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
954 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
955 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
956 endef
957 TARGET_DEVICES += n5q
958
959 define Device/NBG6616
960 DEVICE_TITLE := ZyXEL NBG6616
961 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
962 BOARDNAME := NBG6616
963 KERNEL_SIZE := 2048k
964 IMAGE_SIZE := 15323k
965 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)
966 CMDLINE += mem=128M
967 IMAGES := sysupgrade.bin
968 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
969 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
970 # We cannot currently build a factory image. It is the sysupgrade image
971 # prefixed with a header (which is actually written into the MTD device).
972 # The header is 2kiB and is filled with 0xff. The format seems to be:
973 # 2 bytes: 0x0000
974 # 2 bytes: checksum of the data partition (big endian)
975 # 4 bytes: length of the contained image file (big endian)
976 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
977 # 2 bytes: 0x0000
978 # 2 bytes: checksum over the header partition (big endian)
979 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
980 # rest: 0xff padding
981 #
982 # The checksums are calculated by adding up all bytes and if a 16bit
983 # overflow occurs, one is added and the sum is masked to 16 bit:
984 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
985 # Should the file have an odd number of bytes then the byte len-0x800 is
986 # used additionally.
987 # The checksum for the header is calcualted over the first 2048 bytes with
988 # the firmware checksum as the placeholder during calculation.
989 #
990 # The header is padded with 0xff to the erase block size of the device.
991 endef
992 TARGET_DEVICES += NBG6616
993
994 define Device/c-55
995 DEVICE_TITLE := AirTight Networks C-55
996 DEVICE_PACKAGES := kmod-ath9k
997 BOARDNAME := C-55
998 KERNEL_SIZE := 2048k
999 IMAGE_SIZE := 15872k
1000 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)
1001 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
1002 endef
1003 TARGET_DEVICES += c-55
1004
1005 define Device/hiwifi-hc6361
1006 DEVICE_TITLE := HiWiFi HC6361
1007 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
1008 kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
1009 BOARDNAME := HiWiFi-HC6361
1010 DEVICE_PROFILE := HIWIFI_HC6361
1011 IMAGE_SIZE := 16128k
1012 KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
1013 CONSOLE := ttyATH0,115200
1014 MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
1015 endef
1016 TARGET_DEVICES += hiwifi-hc6361
1017
1018 define Device/seama
1019 LOADER_TYPE := bin
1020 BLOCKSIZE := 64k
1021 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
1022 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
1023 KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
1024 IMAGES := sysupgrade.bin factory.bin
1025
1026 # 64 bytes offset:
1027 # - 28 bytes seama_header
1028 # - 36 bytes of META data (4-bytes aligned)
1029 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
1030 IMAGE/sysupgrade.bin := \
1031 $$(IMAGE/default) | seama | pad-rootfs | \
1032 check-size $$$$(IMAGE_SIZE)
1033 IMAGE/factory.bin := \
1034 $$(IMAGE/default) | seama | pad-rootfs | \
1035 seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
1036 check-size $$$$(IMAGE_SIZE)
1037 SEAMA_SIGNATURE :=
1038 endef
1039
1040 define Device/dir-869-a1
1041 $(Device/seama)
1042 DEVICE_TITLE := D-Link DIR-869 rev. A1
1043 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
1044 BOARDNAME := DIR-869-A1
1045 IMAGE_SIZE := 15872k
1046 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
1047 SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
1048 IMAGE/factory.bin := \
1049 $$(IMAGE/default) | pad-rootfs -x 64 | \
1050 seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
1051 check-size $$$$(IMAGE_SIZE)
1052 endef
1053 TARGET_DEVICES += dir-869-a1
1054
1055 define Device/mynet-n600
1056 $(Device/seama)
1057 DEVICE_TITLE := Western Digital My Net N600
1058 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1059 BOARDNAME := MYNET-N600
1060 IMAGE_SIZE := 15808k
1061 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
1062 SEAMA_SIGNATURE := wrgnd16_wd_db600
1063 endef
1064 TARGET_DEVICES += mynet-n600
1065
1066 define Device/mynet-n750
1067 $(Device/seama)
1068 DEVICE_TITLE := Western Digital My Net N750
1069 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1070 BOARDNAME := MYNET-N750
1071 IMAGE_SIZE := 15808k
1072 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
1073 SEAMA_SIGNATURE := wrgnd13_wd_av
1074 endef
1075 TARGET_DEVICES += mynet-n750
1076
1077 define Device/qihoo-c301
1078 $(Device/seama)
1079 DEVICE_TITLE := Qihoo C301
1080 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
1081 BOARDNAME := QIHOO-C301
1082 IMAGE_SIZE := 15744k
1083 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)
1084 SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
1085 endef
1086 TARGET_DEVICES += qihoo-c301
1087
1088 define Device/dap-2695-a1
1089 DEVICE_TITLE := D-Link DAP-2695 rev. A1
1090 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k
1091 BOARDNAME := DAP-2695-A1
1092 IMAGES := factory.img sysupgrade.bin
1093 IMAGE_SIZE := 15360k
1094 IMAGE/factory.img := append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
1095 IMAGE/sysupgrade.bin := append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
1096 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
1097 KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
1098 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
1099 DAP_SIGNATURE := wapac02_dkbs_dap2695
1100 endef
1101 TARGET_DEVICES += dap-2695-a1
1102
1103 define Device/bhr-4grv2
1104 DEVICE_TITLE := Buffalo BHR-4GRV2
1105 BOARDNAME := BHR-4GRV2
1106 ROOTFS_SIZE := 14528k
1107 KERNEL_SIZE := 1472k
1108 IMAGE_SIZE := 16000k
1109 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
1110 IMAGES := sysupgrade.bin factory.bin
1111 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
1112 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
1113 endef
1114 TARGET_DEVICES += bhr-4grv2
1115
1116 define Device/wam250
1117 DEVICE_TITLE := Samsung WAM250
1118 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
1119 BOARDNAME := WAM250
1120 IMAGE_SIZE := 15872k
1121 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),128k(nvram)ro,15872k(firmware),64k(art)ro
1122 SUPPORTED_DEVICES := wam250
1123 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
1124 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1125 endef
1126 TARGET_DEVICES += wam250
1127
1128 define Device/wlr8100
1129 DEVICE_TITLE := Sitecom WLR-8100
1130 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb3 \
1131 kmod-ath10k ath10k-firmware-qca988x
1132 BOARDNAME := WLR8100
1133 IMAGE_SIZE := 15424k
1134 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
1135 endef
1136 TARGET_DEVICES += wlr8100
1137
1138 define Device/wpj-16m
1139 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
1140 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
1141 IMAGE_SIZE := 16128k
1142 endef
1143
1144 define Device/wpj342
1145 $(Device/wpj-16m)
1146 DEVICE_TITLE := Compex WPJ342 (16MB flash)
1147 BOARDNAME := WPJ342
1148 endef
1149 TARGET_DEVICES += wpj342
1150
1151 define Device/wpj344
1152 $(Device/wpj-16m)
1153 DEVICE_TITLE := Compex WPJ344 (16MB flash)
1154 BOARDNAME := WPJ344
1155 SUPPORTED_DEVICES := wpj344
1156 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1157 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1158 endef
1159 TARGET_DEVICES += wpj344
1160
1161 define Device/wpj531
1162 $(Device/wpj-16m)
1163 DEVICE_TITLE := Compex WPJ531 (16MB flash)
1164 BOARDNAME := WPJ531
1165 endef
1166 TARGET_DEVICES += wpj531
1167
1168 define Device/wpj558
1169 $(Device/wpj-16m)
1170 DEVICE_TITLE := Compex WPJ558 (16MB flash)
1171 BOARDNAME := WPJ558
1172 SUPPORTED_DEVICES := wpj558
1173 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1174 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1175 endef
1176 TARGET_DEVICES += wpj558
1177
1178 define Device/wpj563
1179 $(Device/wpj-16m)
1180 DEVICE_TITLE := Compex WPJ563 (16MB flash)
1181 BOARDNAME := WPJ563
1182 endef
1183 TARGET_DEVICES += wpj563
1184
1185 define Device/wrtnode2q
1186 DEVICE_TITLE := WRTnode2Q
1187 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
1188 BOARDNAME := WRTNODE2Q
1189 IMAGE_SIZE := 16064k
1190 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,16064k(firmware),16384k@0x0(fullflash)
1191 endef
1192 TARGET_DEVICES += wrtnode2q
1193
1194 define Device/zbt-we1526
1195 DEVICE_TITLE := Zbtlink ZBT-WE1526
1196 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1197 BOARDNAME := ZBT-WE1526
1198 IMAGE_SIZE := 16000k
1199 KERNEL_SIZE := 1472k
1200 ROOTFS_SIZE := 14528k
1201 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
1202 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
1203 endef
1204 TARGET_DEVICES += zbt-we1526
1205
1206 define Device/fritz300e
1207 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
1208 DEVICE_PACKAGES := fritz-tffs rssileds -swconfig -uboot-envtools
1209 BOARDNAME := FRITZ300E
1210 SUPPORTED_DEVICES := fritz300e
1211 IMAGE_SIZE := 15232k
1212 KERNEL := kernel-bin | patch-cmdline | lzma | eva-image
1213 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
1214 append-squashfs-fakeroot-be | pad-to 256 | \
1215 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1216 endef
1217 TARGET_DEVICES += fritz300e