ar71xx: Fix build for dap-1330-a1 board
[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/mkdapimg2
36 $(STAGING_DIR_HOST)/bin/mkdapimg2 \
37 -i $@ -o $@.new \
38 -s $(DAP_SIGNATURE) \
39 -v $(VERSION_DIST)-$(firstword $(subst +, ,$(firstword $(subst -, ,$(REVISION))))) \
40 -r Default \
41 $(if $(1),-k $(1))
42 mv $@.new $@
43 endef
44
45 define Build/netgear-squashfs
46 rm -rf $@.fs $@.squashfs
47 mkdir -p $@.fs/image
48 cp $@ $@.fs/image/uImage
49 $(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
50 $@.fs $@.squashfs \
51 -noappend -root-owned -be -b 65536 \
52 $(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
53
54 dd if=/dev/zero bs=1k count=1 >> $@.squashfs
55 mkimage \
56 -A mips -O linux -T filesystem -C none \
57 -M $(NETGEAR_KERNEL_MAGIC) \
58 -a 0xbf070000 -e 0xbf070000 \
59 -n 'MIPS $(VERSION_DIST) Linux-$(LINUX_VERSION)' \
60 -d $@.squashfs $@
61 rm -rf $@.squashfs $@.fs
62 endef
63
64 define Build/netgear-uImage
65 $(call Build/uImage,$(1) -M $(NETGEAR_KERNEL_MAGIC))
66 endef
67
68 define Build/relocate-kernel
69 rm -rf $@.relocate
70 $(CP) ../../generic/image/relocate $@.relocate
71 $(MAKE) -j1 -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
72 ( \
73 dd if=$@.relocate/loader.bin bs=32 conv=sync && \
74 perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
75 cat "$@" \
76 ) > "$@.new"
77 mv "$@.new" "$@"
78 rm -rf $@.relocate
79 endef
80
81 define Build/seama
82 $(STAGING_DIR_HOST)/bin/seama -i $@ $(if $(1),$(1),-m "dev=/dev/mtdblock/1" -m "type=firmware")
83 mv $@.seama $@
84 endef
85
86 define Build/seama-seal
87 $(call Build/seama,-s $@.seama $(1))
88 endef
89
90 define Build/teltonika-fw-fake-checksum
91 # Teltonika U-Boot web based firmware upgrade/recovery routine compares
92 # 16 bytes from md5sum1[16] field in TP-Link v1 header (offset: 76 bytes
93 # from begin of the firmware file) with 16 bytes stored just before
94 # 0xdeadc0de marker. Values are only compared, MD5 sum is not verified.
95 let \
96 offs="$$(stat -c%s $@) - 20"; \
97 dd if=$@ bs=1 count=16 skip=76 |\
98 dd of=$@ bs=1 count=16 seek=$$offs conv=notrunc
99 endef
100
101 define Build/uImageHiWiFi
102 # Field ih_name needs to start with "tw150v1"
103 mkimage -A $(LINUX_KARCH) \
104 -O linux -T kernel \
105 -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
106 -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $@ $@.new
107 @mv $@.new $@
108 endef
109
110 define Build/wrgg-pad-rootfs
111 $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
112 endef
113
114
115 define Device/ap121f
116 DEVICE_TITLE := ALFA Network AP121F
117 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage -swconfig
118 BOARDNAME := AP121F
119 IMAGE_SIZE := 16064k
120 CONSOLE := ttyATH0,115200
121 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
122 SUPPORTED_DEVICES := ap121f
123 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
124 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
125 endef
126 TARGET_DEVICES += ap121f
127
128 define Device/ap531b0
129 DEVICE_TITLE := Rockeetech AP531B0
130 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
131 BOARDNAME := AP531B0
132 IMAGE_SIZE := 16000k
133 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
134 endef
135 TARGET_DEVICES += ap531b0
136
137 define Device/ap90q
138 DEVICE_TITLE := YunCore AP80Q/AP90Q
139 BOARDNAME := AP90Q
140 IMAGE_SIZE := 16000k
141 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
142 endef
143 TARGET_DEVICES += ap90q
144
145 define Device/ap91-5g
146 DEVICE_TITLE := ALFA Network AP91-5G
147 DEVICE_PACKAGES := rssileds -swconfig
148 BOARDNAME := AP91-5G
149 IMAGE_SIZE := 7744k
150 KERNEL_SIZE := 1600k
151 ROOTFS_SIZE := 6144k
152 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),6144k(rootfs),1600k(kernel),64k(config)ro,64k(art)ro,7744k@0x50000(firmware)
153 IMAGES := sysupgrade.bin factory.bin
154 IMAGE/factory.bin := append-rootfs | pad-rootfs |\
155 alfa-network-rootfs-header | append-kernel | check-size $$$$(IMAGE_SIZE)
156 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs |\
157 pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
158 endef
159 TARGET_DEVICES += ap91-5g
160
161 define Device/arduino-yun
162 DEVICE_TITLE := Arduino Yun
163 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
164 BOARDNAME := Yun
165 IMAGE_SIZE := 15936k
166 CONSOLE := ttyATH0,250000
167 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro
168 endef
169 TARGET_DEVICES += arduino-yun
170
171 define Device/bsb
172 DEVICE_TITLE := Smart Electronics Black Swift board
173 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
174 BOARDNAME := BSB
175 IMAGE_SIZE := 16000k
176 CONSOLE := ttyATH0,115200
177 MTDPARTS := spi0.0:128k(u-boot)ro,64k(u-boot-env)ro,16128k(firmware),64k(art)ro
178 endef
179 TARGET_DEVICES += bsb
180
181 define Device/carambola2
182 DEVICE_TITLE := 8devices Carambola2
183 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
184 BOARDNAME := CARAMBOLA2
185 IMAGE_SIZE := 16000k
186 CONSOLE := ttyATH0,115200
187 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
188 endef
189 TARGET_DEVICES += carambola2
190
191 define Device/cf-e316n-v2
192 DEVICE_TITLE := COMFAST CF-E316N v2
193 DEVICE_PACKAGES := -swconfig -uboot-envtools
194 BOARDNAME := CF-E316N-V2
195 IMAGE_SIZE := 16192k
196 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
197 endef
198 TARGET_DEVICES += cf-e316n-v2
199
200 define Device/cf-e320n-v2
201 $(Device/cf-e316n-v2)
202 DEVICE_TITLE := COMFAST CF-E320N v2
203 DEVICE_PACKAGES += kmod-usb-core kmod-usb2
204 BOARDNAME := CF-E320N-V2
205 endef
206 TARGET_DEVICES += cf-e320n-v2
207
208 define Device/cf-e355ac-v1
209 DEVICE_TITLE := COMFAST CF-E355AC v1
210 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x \
211 -swconfig -uboot-envtools
212 BOARDNAME := CF-E355AC-V1
213 IMAGE_SIZE := 16192k
214 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
215 endef
216 TARGET_DEVICES += cf-e355ac-v1
217
218 define Device/cf-e355ac-v2
219 $(Device/cf-e355ac-v1)
220 DEVICE_TITLE := COMFAST CF-E355AC v2
221 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9888 \
222 -swconfig -uboot-envtools
223 BOARDNAME := CF-E355AC-V2
224 endef
225 TARGET_DEVICES += cf-e355ac-v2
226
227 define Device/cf-e375ac
228 DEVICE_TITLE := COMFAST CF-E375AC
229 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9888 \
230 -uboot-envtools
231 BOARDNAME := CF-E375AC
232 IMAGE_SIZE := 16000k
233 MTDPARTS := spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
234 endef
235 TARGET_DEVICES += cf-e375ac
236
237 define Device/cf-e380ac-v1
238 DEVICE_TITLE := COMFAST CF-E380AC v1
239 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x \
240 -swconfig -uboot-envtools
241 BOARDNAME := CF-E380AC-V1
242 IMAGE_SIZE := 16128k
243 MTDPARTS := spi0.0:128k(u-boot)ro,64k(art)ro,16128k(firmware),64k(art-backup)ro
244 endef
245 TARGET_DEVICES += cf-e380ac-v1
246
247 define Device/cf-e380ac-v2
248 $(Device/cf-e380ac-v1)
249 DEVICE_TITLE := COMFAST CF-E380AC v2
250 BOARDNAME := CF-E380AC-V2
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-e380ac-v2
255
256 define Device/cf-e385ac
257 DEVICE_TITLE := COMFAST CF-E385AC
258 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9984 \
259 -uboot-envtools
260 BOARDNAME := CF-E385AC
261 IMAGE_SIZE := 16000k
262 MTDPARTS := spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
263 endef
264 TARGET_DEVICES += cf-e385ac
265
266 define Device/cf-e520n
267 DEVICE_TITLE := COMFAST CF-E520N
268 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig -uboot-envtools
269 BOARDNAME := CF-E520N
270 IMAGE_SIZE := 8000k
271 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,8000k(firmware),64k(art-backup)ro
272 endef
273 TARGET_DEVICES += cf-e520n
274
275 define Device/cf-e530n
276 $(Device/cf-e520n)
277 DEVICE_TITLE := COMFAST CF-E530N
278 BOARDNAME := CF-E530N
279 endef
280 TARGET_DEVICES += cf-e530n
281
282 define Device/cpe505n
283 DEVICE_TITLE := P&W CPE505N
284 BOARDNAME := CPE505N
285 IMAGE_SIZE := 16000k
286 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
287 endef
288 TARGET_DEVICES += cpe505n
289
290 define Device/cpe830
291 $(Device/ap90q)
292 DEVICE_TITLE := YunCore CPE830
293 DEVICE_PACKAGES := rssileds
294 BOARDNAME := CPE830
295 endef
296 TARGET_DEVICES += cpe830
297
298 define Device/cpe870
299 DEVICE_TITLE := YunCore CPE870
300 DEVICE_PACKAGES := rssileds
301 BOARDNAME := CPE870
302 IMAGE_SIZE := 7936k
303 MTDPARTS := spi0.0:64k(u-boot)ro,64k(u-boot-env),7936k(firmware),64k(config)ro,64k(art)ro
304 endef
305 TARGET_DEVICES += cpe870
306
307 define Device/dragino2
308 BOARDNAME := DRAGINO2
309 CONSOLE := ttyATH0,115200
310 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
311 DEVICE_TITLE := Dragino 2 (MS14)
312 IMAGE_SIZE := 16000k
313 MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
314 endef
315 TARGET_DEVICES += dragino2
316
317 define Device/e1700ac-v2-16M
318 DEVICE_TITLE := Qxwlan E1700AC v2 (16MB flash)
319 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x kmod-usb-core \
320 kmod-usb2 kmod-usb-ledtrig-usbport
321 BOARDNAME := E1700AC-V2
322 SUPPORTED_DEVICES := e1700ac-v2
323 IMAGE_SIZE := 15936k
324 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(pri-data)ro,64k(art)ro,-(firmware)
325 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
326 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
327 endef
328 TARGET_DEVICES += e1700ac-v2-16M
329
330 define Device/e1700ac-v2-8M
331 $(Device/e1700ac-v2-16M)
332 DEVICE_TITLE := Qxwlan E1700AC v2 (8MB flash)
333 IMAGE_SIZE := 7744k
334 endef
335 TARGET_DEVICES += e1700ac-v2-8M
336
337 define Device/e600g-v2-16M
338 DEVICE_TITLE := Qxwlan E600G v2 (16MB flash)
339 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
340 BOARDNAME := E600G-V2
341 SUPPORTED_DEVICES := e600g-v2
342 IMAGE_SIZE := 15936k
343 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(pri-data)ro,64k(art)ro,-(firmware)
344 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
345 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
346 endef
347 TARGET_DEVICES += e600g-v2-16M
348
349 define Device/e600g-v2-8M
350 $(Device/e600g-v2-16M)
351 DEVICE_TITLE := Qxwlan E600G v2 (8MB flash)
352 IMAGE_SIZE := 7744k
353 endef
354 TARGET_DEVICES += e600g-v2-8M
355
356 define Device/e600gac-v2-16M
357 DEVICE_TITLE := Qxwlan E600GAC v2 (16MB flash)
358 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887 kmod-usb-core \
359 kmod-usb2 -swconfig
360 BOARDNAME := E600GAC-V2
361 SUPPORTED_DEVICES := e600gac-v2
362 IMAGE_SIZE := 15936k
363 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(pri-data)ro,64k(art)ro,-(firmware)
364 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
365 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
366 endef
367 TARGET_DEVICES += e600gac-v2-16M
368
369 define Device/e600gac-v2-8M
370 $(Device/e600gac-v2-16M)
371 DEVICE_TITLE := Qxwlan E600GAC v2 (8MB flash)
372 IMAGE_SIZE := 7744k
373 endef
374 TARGET_DEVICES += e600gac-v2-8M
375
376 define Device/ew-balin
377 DEVICE_TITLE := Embedded Wireless Balin Platform
378 DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea
379 BOARDNAME := EW-BALIN
380 IMAGE_SIZE := 16000k
381 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
382 endef
383 TARGET_DEVICES += ew-balin
384
385 define Device/ew-dorin
386 $(Device/ew-balin)
387 DEVICE_TITLE := Embedded Wireless Dorin Platform
388 BOARDNAME := EW-DORIN
389 CONSOLE := ttyATH0,115200
390 endef
391 TARGET_DEVICES += ew-dorin
392
393 define Device/ew-dorin-router
394 $(Device/ew-dorin)
395 DEVICE_TITLE := Embedded Wireless Dorin Router Platform
396 BOARDNAME := EW-DORIN-ROUTER
397 endef
398 TARGET_DEVICES += ew-dorin-router
399
400 define Device/rme-eg200
401 DEVICE_TITLE := eTactica EG-200
402 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ledtrig-oneshot \
403 kmod-usb-serial kmod-usb-serial-ftdi \
404 kmod-usb-storage \
405 kmod-fs-ext4
406 BOARDNAME := RME-EG200
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 += rme-eg200
412
413 define Device/weio
414 DEVICE_TITLE := WeIO
415 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
416 BOARDNAME := WEIO
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 += weio
422
423 define Device/gl-ar150
424 DEVICE_TITLE := GL.iNet GL-AR150
425 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
426 BOARDNAME := GL-AR150
427 IMAGE_SIZE := 16000k
428 CONSOLE := ttyATH0,115200
429 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
430 endef
431 TARGET_DEVICES += gl-ar150
432
433 define Device/gl-ar300
434 DEVICE_TITLE := GL.iNet GL-AR300
435 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
436 BOARDNAME := GL-AR300
437 IMAGE_SIZE := 16000k
438 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
439 endef
440 TARGET_DEVICES += gl-ar300
441
442 define Device/gl-ar300m
443 DEVICE_TITLE := GL.iNet GL-AR300M
444 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
445 BOARDNAME := GL-AR300M
446 IMAGE_SIZE := 16000k
447 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
448 endef
449 TARGET_DEVICES += gl-ar300m
450
451 define Device/gl-ar750
452 DEVICE_TITLE := GL.iNet GL-AR750
453 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887 kmod-usb-core \
454 kmod-usb2 kmod-usb-storage
455 BOARDNAME := GL-AR750
456 SUPPORTED_DEVICES := gl-ar750
457 IMAGE_SIZE := 16000k
458 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
459 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
460 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
461 endef
462 TARGET_DEVICES += gl-ar750
463
464 define Device/gl-domino
465 DEVICE_TITLE := GL.iNet Domino Pi
466 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
467 BOARDNAME := DOMINO
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-domino
473
474 define Device/gl-mifi
475 DEVICE_TITLE := GL.iNet GL-MiFi
476 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
477 BOARDNAME := GL-MIFI
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 endef
482 TARGET_DEVICES += gl-mifi
483
484 define Device/gl-usb150
485 DEVICE_TITLE := GL.iNet GL-USB150
486 DEVICE_PACKAGES := -swconfig
487 BOARDNAME := GL-USB150
488 IMAGE_SIZE := 16000k
489 CONSOLE := ttyATH0,115200
490 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
491 SUPPORTED_DEVICES := gl-usb150
492 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
493 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
494 endef
495 TARGET_DEVICES += gl-usb150
496
497 define Device/lan-turtle
498 $(Device/tplink-16mlzma)
499 DEVICE_TITLE := Hak5 LAN Turtle
500 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
501 -kmod-ath9k -swconfig -uboot-envtools -wpad-mini
502 BOARDNAME := LAN-TURTLE
503 DEVICE_PROFILE := LANTURTLE
504 TPLINK_HWID := 0x5348334c
505 CONSOLE := ttyATH0,115200
506 IMAGES := sysupgrade.bin
507 endef
508 TARGET_DEVICES += lan-turtle
509
510 define Device/lima
511 DEVICE_TITLE := 8devices Lima
512 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
513 BOARDNAME := LIMA
514 IMAGE_SIZE := 15616k
515 MTDPARTS := spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,256k(art)ro,-(firmware)
516 endef
517 TARGET_DEVICES += lima
518
519 define Device/mr12
520 DEVICE_TITLE := Meraki MR12
521 DEVICE_PACKAGES := kmod-spi-gpio
522 BOARDNAME := MR12
523 ROOTFS_SIZE := 13440k
524 IMAGE_SIZE := 15680k
525 MTDPARTS := spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
526 IMAGE/kernel.bin := append-kernel
527 IMAGE/rootfs.bin := append-rootfs | pad-rootfs
528 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
529 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
530 endef
531 TARGET_DEVICES += mr12
532
533 define Device/mr16
534 $(Device/mr12)
535 DEVICE_TITLE := Meraki MR16
536 BOARDNAME := MR16
537 endef
538 TARGET_DEVICES += mr16
539
540 define Device/dr342
541 DEVICE_TITLE := Wallys DR342
542 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
543 BOARDNAME := DR342
544 IMAGE_SIZE := 16000k
545 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,16000k(firmware),64k(art)ro
546 endef
547 TARGET_DEVICES += dr342
548
549 define Device/dr344
550 DEVICE_TITLE := Wallys DR344
551 BOARDNAME := DR344
552 KERNEL_SIZE := 1408k
553 ROOTFS_SIZE := 6336k
554 IMAGE_SIZE := 7744k
555 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
556 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
557 endef
558
559 define Device/dr531
560 DEVICE_TITLE := Wallys DR531
561 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
562 BOARDNAME := DR531
563 IMAGE_SIZE := 7808k
564 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
565 endef
566 TARGET_DEVICES += dr531
567
568 define Device/wndr3700
569 DEVICE_TITLE := NETGEAR WNDR3700
570 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
571 BOARDNAME := WNDR3700
572 NETGEAR_KERNEL_MAGIC := 0x33373030
573 NETGEAR_BOARD_ID := WNDR3700
574 IMAGE_SIZE := 7680k
575 MTDPARTS := spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
576 IMAGES := sysupgrade.bin factory.img factory-NA.img
577 KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
578 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
579 IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
580 IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
581 IMAGE/factory-NA.img := $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
582 endef
583 TARGET_DEVICES += wndr3700
584
585 define Device/wndr3700v2
586 $(Device/wndr3700)
587 DEVICE_TITLE := NETGEAR WNDR3700 v2
588 NETGEAR_BOARD_ID := WNDR3700v2
589 NETGEAR_KERNEL_MAGIC := 0x33373031
590 NETGEAR_HW_ID := 29763654+16+64
591 IMAGE_SIZE := 15872k
592 MTDPARTS := spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
593 IMAGES := sysupgrade.bin factory.img
594 endef
595 TARGET_DEVICES += wndr3700v2
596
597 define Device/wndr3800
598 $(Device/wndr3700v2)
599 DEVICE_TITLE := NETGEAR WNDR3800
600 NETGEAR_BOARD_ID := WNDR3800
601 NETGEAR_HW_ID := 29763654+16+128
602 endef
603 TARGET_DEVICES += wndr3800
604
605 define Device/wndr3800ch
606 $(Device/wndr3800)
607 DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
608 NETGEAR_BOARD_ID := WNDR3800CH
609 endef
610 TARGET_DEVICES += wndr3800ch
611
612 define Device/wndrmac
613 $(Device/wndr3700v2)
614 DEVICE_TITLE := NETGEAR WNDRMAC
615 NETGEAR_BOARD_ID := WNDRMAC
616 endef
617 TARGET_DEVICES += wndrmac
618
619 define Device/wndrmacv2
620 $(Device/wndr3800)
621 DEVICE_TITLE := NETGEAR WNDRMAC v2
622 NETGEAR_BOARD_ID := WNDRMACv2
623 endef
624 TARGET_DEVICES += wndrmacv2
625
626 define Device/cap324
627 DEVICE_TITLE := PowerCloud CAP324 Cloud AP
628 BOARDNAME := CAP324
629 DEVICE_PROFILE := CAP324
630 IMAGE_SIZE := 15296k
631 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
632 endef
633 TARGET_DEVICES += cap324
634
635 define Device/cap324-nocloud
636 DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
637 BOARDNAME := CAP324
638 DEVICE_PROFILE := CAP324
639 IMAGE_SIZE := 16000k
640 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
641 endef
642 TARGET_DEVICES += cap324-nocloud
643
644 define Device/cr3000
645 DEVICE_TITLE := PowerCloud CR3000 Cloud Router
646 BOARDNAME := CR3000
647 DEVICE_PROFILE := CR3000
648 IMAGE_SIZE := 7104k
649 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
650 endef
651 TARGET_DEVICES += cr3000
652
653 define Device/cr3000-nocloud
654 DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
655 BOARDNAME := CR3000
656 DEVICE_PROFILE := CR3000
657 IMAGE_SIZE := 7808k
658 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
659 endef
660 TARGET_DEVICES += cr3000-nocloud
661
662 define Device/cr5000
663 DEVICE_TITLE := PowerCloud CR5000 Cloud Router
664 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
665 BOARDNAME := CR5000
666 DEVICE_PROFILE := CR5000
667 IMAGE_SIZE := 7104k
668 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
669 endef
670 TARGET_DEVICES += cr5000
671
672 define Device/cr5000-nocloud
673 DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
674 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-core
675 BOARDNAME := CR5000
676 DEVICE_PROFILE := CR5000
677 IMAGE_SIZE := 7808k
678 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
679 endef
680 TARGET_DEVICES += cr5000-nocloud
681
682 define Device/packet-squirrel
683 $(Device/tplink-16mlzma)
684 DEVICE_TITLE := Hak5 Packet Squirrel
685 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 \
686 -kmod-ath9k -swconfig -uboot-envtools -wpad-mini
687 BOARDNAME := PACKET-SQUIRREL
688 DEVICE_PROFILE := PACKETSQUIRREL
689 TPLINK_HWID := 0x5351524c
690 CONSOLE := ttyATH0,115200
691 IMAGES := sysupgrade.bin
692 endef
693 TARGET_DEVICES += packet-squirrel
694
695 define Device/pqi-air-pen
696 DEVICE_TITLE := PQI Air Pen
697 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
698 BOARDNAME := PQI-AIR-PEN
699 IMAGE_SIZE := 7744k
700 CONSOLE := ttyATH0,115200
701 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
702 endef
703 TARGET_DEVICES += pqi-air-pen
704
705 define Device/antminer-s1
706 $(Device/tplink-8mlzma)
707 DEVICE_TITLE := Antminer-S1
708 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
709 BOARDNAME := ANTMINER-S1
710 DEVICE_PROFILE := ANTMINERS1
711 TPLINK_HWID := 0x04440101
712 CONSOLE := ttyATH0,115200
713 endef
714 TARGET_DEVICES += antminer-s1
715
716 define Device/antminer-s3
717 $(Device/tplink-8mlzma)
718 DEVICE_TITLE := Antminer-S3
719 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
720 BOARDNAME := ANTMINER-S3
721 DEVICE_PROFILE := ANTMINERS3
722 TPLINK_HWID := 0x04440301
723 CONSOLE := ttyATH0,115200
724 endef
725 TARGET_DEVICES += antminer-s3
726
727 define Device/antrouter-r1
728 $(Device/tplink-8mlzma)
729 DEVICE_TITLE := Antrouter-R1
730 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
731 BOARDNAME := ANTROUTER-R1
732 DEVICE_PROFILE := ANTROUTERR1
733 TPLINK_HWID := 0x44440101
734 CONSOLE := ttyATH0,115200
735 endef
736 TARGET_DEVICES += antrouter-r1
737
738 define Device/el-m150
739 $(Device/tplink-8mlzma)
740 DEVICE_TITLE := EasyLink EL-M150
741 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
742 BOARDNAME := EL-M150
743 DEVICE_PROFILE := ELM150
744 TPLINK_HWID := 0x01500101
745 CONSOLE := ttyATH0,115200
746 endef
747 TARGET_DEVICES += el-m150
748
749 define Device/el-mini
750 $(Device/tplink-8mlzma)
751 DEVICE_TITLE := EasyLink EL-MINI
752 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
753 BOARDNAME := EL-MINI
754 DEVICE_PROFILE := ELMINI
755 TPLINK_HWID := 0x01530001
756 CONSOLE := ttyATH0,115200
757 endef
758 TARGET_DEVICES += el-mini
759
760 define Device/gl-inet-6408A-v1
761 $(Device/tplink-8mlzma)
762 DEVICE_TITLE := GL.iNet 6408
763 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
764 BOARDNAME := GL-INET
765 DEVICE_PROFILE := GLINET
766 TPLINK_HWID := 0x08000001
767 CONSOLE := ttyATH0,115200
768 endef
769 TARGET_DEVICES += gl-inet-6408A-v1
770
771 define Device/gl-inet-6416A-v1
772 $(Device/tplink-16mlzma)
773 DEVICE_TITLE := GL.iNet 6416
774 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
775 BOARDNAME := GL-INET
776 DEVICE_PROFILE := GLINET
777 TPLINK_HWID := 0x08000001
778 CONSOLE := ttyATH0,115200
779 endef
780 TARGET_DEVICES += gl-inet-6416A-v1
781
782 define Device/jwap230
783 DEVICE_TITLE := jjPlus JWAP230
784 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
785 BOARDNAME := JWAP230
786 IMAGE_SIZE := 16000k
787 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
788 endef
789 TARGET_DEVICES += jwap230
790
791 define Device/r36a
792 DEVICE_TITLE := ALFA Network R36A
793 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport -swconfig
794 BOARDNAME := R36A
795 SUPPORTED_DEVICES := r36a
796 IMAGE_SIZE := 15872k
797 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
798 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
799 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
800 endef
801 TARGET_DEVICES += r36a
802
803 define Device/r602n
804 DEVICE_TITLE := P&W R602N
805 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
806 BOARDNAME := R602N
807 IMAGE_SIZE := 16000k
808 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
809 endef
810 TARGET_DEVICES += r602n
811
812 define Device/rut900
813 DEVICE_TITLE := Teltonika RUT900
814 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -uboot-envtools
815 BOARDNAME := RUT900
816 SUPPORTED_DEVICES := rut900
817 IMAGE_SIZE := 15552k
818 MTDPARTS := spi0.0:128k(u-boot)ro,64k(config)ro,64k(art)ro,15552k(firmware),576k(event-log)ro
819 TPLINK_HWID := 0x35000001
820 TPLINK_HWREV := 0x1
821 TPLINK_HEADER_VERSION := 1
822 KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
823 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma
824 IMAGES := sysupgrade.bin factory.bin
825 IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs |\
826 pad-rootfs | teltonika-fw-fake-checksum | append-string master |\
827 append-md5sum-bin | check-size $$$$(IMAGE_SIZE)
828 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
829 append-rootfs | pad-rootfs | append-metadata |\
830 check-size $$$$(IMAGE_SIZE)
831 endef
832 TARGET_DEVICES += rut900
833
834 define Device/mc-mac1200r
835 $(Device/tplink-8mlzma)
836 DEVICE_TITLE := Mercury MAC1200R
837 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
838 BOARDNAME := MC-MAC1200R
839 DEVICE_PROFILE := MAC1200R
840 TPLINK_HWID := 0x12000001
841 endef
842 TARGET_DEVICES += mc-mac1200r
843
844 define Device/minibox-v1
845 $(Device/tplink-16mlzma)
846 DEVICE_TITLE := GainStrong MiniBox V1.0
847 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
848 BOARDNAME := MINIBOX-V1
849 DEVICE_PROFILE := MINIBOXV1
850 TPLINK_HWID := 0x3C000201
851 CONSOLE := ttyATH0,115200
852 IMAGES := sysupgrade.bin
853 endef
854 TARGET_DEVICES += minibox-v1
855
856 define Device/oolite-v1
857 $(Device/minibox-v1)
858 DEVICE_TITLE := GainStrong Oolite V1.0
859 BOARDNAME := OOLITE-V1
860 DEVICE_PROFILE := OOLITEV1
861 TPLINK_HWID := 0x3C000101
862 endef
863 TARGET_DEVICES += oolite-v1
864
865 define Device/oolite-v5.2
866 $(Device/tplink-16mlzma)
867 DEVICE_TITLE := GainStrong Oolite V5.2
868 DEVICE_PACKAGES := ath10k-firmware-qca9887 kmod-ath10k kmod-usb-core kmod-usb2
869 BOARDNAME := OOLITE-V5-2
870 DEVICE_PROFILE := OOLITEV52
871 TPLINK_HWID := 0x3C00010B
872 IMAGES := sysupgrade.bin
873 endef
874 TARGET_DEVICES += oolite-v5.2
875
876 define Device/oolite-v5.2-dev
877 $(Device/oolite-v5.2)
878 DEVICE_TITLE := GainStrong Oolite V5.2-Dev (development board)
879 BOARDNAME := OOLITE-V5-2-DEV
880 DEVICE_PROFILE := OOLITEV52DEV
881 endef
882 TARGET_DEVICES += oolite-v5.2-dev
883
884 define Device/omy-g1
885 $(Device/tplink-16mlzma)
886 DEVICE_TITLE := OMYlink OMY-G1
887 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
888 BOARDNAME := OMY-G1
889 DEVICE_PROFILE := OMYG1
890 TPLINK_HWID := 0x06660101
891 endef
892 TARGET_DEVICES += omy-g1
893
894 define Device/omy-x1
895 $(Device/tplink-8mlzma)
896 DEVICE_TITLE := OMYlink OMY-X1
897 BOARDNAME := OMY-X1
898 DEVICE_PROFILE := OMYX1
899 TPLINK_HWID := 0x06660201
900 endef
901 TARGET_DEVICES += omy-x1
902
903 define Device/onion-omega
904 $(Device/tplink-16mlzma)
905 DEVICE_TITLE := Onion Omega
906 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
907 BOARDNAME := ONION-OMEGA
908 DEVICE_PROFILE := OMEGA
909 TPLINK_HWID := 0x04700001
910 CONSOLE := ttyATH0,115200
911 endef
912 TARGET_DEVICES += onion-omega
913
914 define Device/sc1750
915 DEVICE_TITLE := Abicom SC1750
916 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
917 BOARDNAME := SC1750
918 IMAGE_SIZE := 15744k
919 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
920 endef
921 TARGET_DEVICES += sc1750
922
923 define Device/sc300m
924 DEVICE_TITLE := Abicom SC300M
925 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
926 BOARDNAME := SC300M
927 IMAGE_SIZE := 15744k
928 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
929 endef
930 TARGET_DEVICES += sc300m
931
932 define Device/sc450
933 DEVICE_TITLE := Abicom SC450
934 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
935 BOARDNAME := SC450
936 IMAGE_SIZE := 15744k
937 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
938 endef
939 TARGET_DEVICES += sc450
940
941 define Device/smart-300
942 $(Device/tplink-8mlzma)
943 DEVICE_TITLE := NC-LINK SMART-300
944 BOARDNAME := SMART-300
945 DEVICE_PROFILE := SMART-300
946 TPLINK_HWID := 0x93410001
947 endef
948 TARGET_DEVICES += smart-300
949
950 define Device/som9331
951 $(Device/tplink-8mlzma)
952 DEVICE_TITLE := OpenEmbed SOM9331
953 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
954 BOARDNAME := SOM9331
955 DEVICE_PROFILE := SOM9331
956 TPLINK_HWID := 0x04800054
957 CONSOLE := ttyATH0,115200
958 endef
959 TARGET_DEVICES += som9331
960
961 define Device/sr3200
962 DEVICE_TITLE := YunCore SR3200
963 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
964 BOARDNAME := SR3200
965 IMAGE_SIZE := 16000k
966 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
967 endef
968 TARGET_DEVICES += sr3200
969
970 define Device/xd3200
971 $(Device/sr3200)
972 DEVICE_TITLE := YunCore XD3200
973 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
974 BOARDNAME := XD3200
975 endef
976 TARGET_DEVICES += xd3200
977
978 define Device/t830
979 DEVICE_TITLE := YunCore T830
980 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
981 BOARDNAME := T830
982 IMAGE_SIZE := 16000k
983 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
984 SUPPORTED_DEVICES := t830
985 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
986 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
987 endef
988 TARGET_DEVICES += t830
989
990 define Device/tellstick-znet-lite
991 $(Device/tplink-16mlzma)
992 DEVICE_TITLE := TellStick ZNet Lite
993 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
994 BOARDNAME := TELLSTICK-ZNET-LITE
995 DEVICE_PROFILE := TELLSTICKZNETLITE
996 TPLINK_HWID := 0x00726001
997 CONSOLE := ttyATH0,115200
998 endef
999 TARGET_DEVICES += tellstick-znet-lite
1000
1001 define Device/n5q
1002 DEVICE_TITLE := ALFA Network N5Q
1003 DEVICE_PACKAGES := rssileds -swconfig
1004 BOARDNAME := N5Q
1005 SUPPORTED_DEVICES := n5q
1006 IMAGE_SIZE := 15872k
1007 MTDPARTS := spi0.0:384k(u-boot)ro,64k(u-boot-env),64k(art)ro,-(firmware)
1008 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1009 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1010 endef
1011 TARGET_DEVICES += n5q
1012
1013 define Device/NBG6616
1014 DEVICE_TITLE := ZyXEL NBG6616
1015 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
1016 BOARDNAME := NBG6616
1017 KERNEL_SIZE := 2048k
1018 IMAGE_SIZE := 15323k
1019 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)
1020 CMDLINE += mem=128M
1021 IMAGES := sysupgrade.bin
1022 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
1023 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
1024 # We cannot currently build a factory image. It is the sysupgrade image
1025 # prefixed with a header (which is actually written into the MTD device).
1026 # The header is 2kiB and is filled with 0xff. The format seems to be:
1027 # 2 bytes: 0x0000
1028 # 2 bytes: checksum of the data partition (big endian)
1029 # 4 bytes: length of the contained image file (big endian)
1030 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
1031 # 2 bytes: 0x0000
1032 # 2 bytes: checksum over the header partition (big endian)
1033 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
1034 # rest: 0xff padding
1035 #
1036 # The checksums are calculated by adding up all bytes and if a 16bit
1037 # overflow occurs, one is added and the sum is masked to 16 bit:
1038 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
1039 # Should the file have an odd number of bytes then the byte len-0x800 is
1040 # used additionally.
1041 # The checksum for the header is calcualted over the first 2048 bytes with
1042 # the firmware checksum as the placeholder during calculation.
1043 #
1044 # The header is padded with 0xff to the erase block size of the device.
1045 endef
1046 TARGET_DEVICES += NBG6616
1047
1048 define Device/c-55
1049 DEVICE_TITLE := AirTight Networks C-55
1050 DEVICE_PACKAGES := kmod-ath9k
1051 BOARDNAME := C-55
1052 KERNEL_SIZE := 2048k
1053 IMAGE_SIZE := 15872k
1054 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)
1055 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
1056 endef
1057 TARGET_DEVICES += c-55
1058
1059 define Device/hiwifi-hc6361
1060 DEVICE_TITLE := HiWiFi HC6361
1061 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
1062 kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
1063 BOARDNAME := HiWiFi-HC6361
1064 DEVICE_PROFILE := HIWIFI_HC6361
1065 IMAGE_SIZE := 16128k
1066 KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
1067 CONSOLE := ttyATH0,115200
1068 MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
1069 endef
1070 TARGET_DEVICES += hiwifi-hc6361
1071
1072 define Device/seama
1073 LOADER_TYPE := bin
1074 BLOCKSIZE := 64k
1075 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
1076 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
1077 KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
1078 IMAGES := sysupgrade.bin factory.bin
1079
1080 # 64 bytes offset:
1081 # - 28 bytes seama_header
1082 # - 36 bytes of META data (4-bytes aligned)
1083 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
1084 IMAGE/sysupgrade.bin := \
1085 $$(IMAGE/default) | seama | pad-rootfs | \
1086 check-size $$$$(IMAGE_SIZE)
1087 IMAGE/factory.bin := \
1088 $$(IMAGE/default) | seama | pad-rootfs | \
1089 seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
1090 check-size $$$$(IMAGE_SIZE)
1091 SEAMA_SIGNATURE :=
1092 endef
1093
1094 define Device/dir-869-a1
1095 $(Device/seama)
1096 DEVICE_TITLE := D-Link DIR-869 rev. A1
1097 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
1098 BOARDNAME := DIR-869-A1
1099 IMAGE_SIZE := 15872k
1100 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
1101 SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
1102 IMAGE/factory.bin := \
1103 $$(IMAGE/default) | pad-rootfs -x 64 | \
1104 seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
1105 check-size $$$$(IMAGE_SIZE)
1106 endef
1107 TARGET_DEVICES += dir-869-a1
1108
1109 define Device/mynet-n600
1110 $(Device/seama)
1111 DEVICE_TITLE := Western Digital My Net N600
1112 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1113 BOARDNAME := MYNET-N600
1114 IMAGE_SIZE := 15808k
1115 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
1116 SEAMA_SIGNATURE := wrgnd16_wd_db600
1117 endef
1118 TARGET_DEVICES += mynet-n600
1119
1120 define Device/mynet-n750
1121 $(Device/seama)
1122 DEVICE_TITLE := Western Digital My Net N750
1123 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1124 BOARDNAME := MYNET-N750
1125 IMAGE_SIZE := 15808k
1126 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
1127 SEAMA_SIGNATURE := wrgnd13_wd_av
1128 endef
1129 TARGET_DEVICES += mynet-n750
1130
1131 define Device/qihoo-c301
1132 $(Device/seama)
1133 DEVICE_TITLE := Qihoo C301
1134 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
1135 BOARDNAME := QIHOO-C301
1136 IMAGE_SIZE := 15744k
1137 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)
1138 SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
1139 endef
1140 TARGET_DEVICES += qihoo-c301
1141
1142 define Device/dap-1330-a1
1143 DEVICE_TITLE := D-Link DAP-1330 rev. A1
1144 DEVICE_PACKAGES := rssileds
1145 BOARDNAME := DAP-1330-A1
1146 IMAGES := factory.img sysupgrade.bin
1147 IMAGE_SIZE := 7936k
1148 IMAGE/factory.img := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkdapimg2 917504
1149 MTDPARTS := spi0.0:64k(u-boot)ro,64k(art)ro,64k(mp)ro,64k(config)ro,7936k(firmware)
1150 DAP_SIGNATURE := HONEYBEE-FIRMWARE-DAP-1330
1151 endef
1152 TARGET_DEVICES += dap-1330-a1
1153
1154 define Device/dap-2695-a1
1155 DEVICE_TITLE := D-Link DAP-2695 rev. A1
1156 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k
1157 BOARDNAME := DAP-2695-A1
1158 IMAGES := factory.img sysupgrade.bin
1159 IMAGE_SIZE := 15360k
1160 IMAGE/factory.img := append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
1161 IMAGE/sysupgrade.bin := append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
1162 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
1163 KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
1164 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
1165 DAP_SIGNATURE := wapac02_dkbs_dap2695
1166 endef
1167 TARGET_DEVICES += dap-2695-a1
1168
1169 define Device/bhr-4grv2
1170 DEVICE_TITLE := Buffalo BHR-4GRV2
1171 BOARDNAME := BHR-4GRV2
1172 ROOTFS_SIZE := 14528k
1173 KERNEL_SIZE := 1472k
1174 IMAGE_SIZE := 16000k
1175 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
1176 IMAGES := sysupgrade.bin factory.bin
1177 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
1178 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
1179 endef
1180 TARGET_DEVICES += bhr-4grv2
1181
1182 define Device/wam250
1183 DEVICE_TITLE := Samsung WAM250
1184 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 -swconfig
1185 BOARDNAME := WAM250
1186 IMAGE_SIZE := 15872k
1187 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env),128k(nvram)ro,15872k(firmware),64k(art)ro
1188 SUPPORTED_DEVICES := wam250
1189 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
1190 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1191 endef
1192 TARGET_DEVICES += wam250
1193
1194 define Device/wifi-pineapple-nano
1195 $(Device/tplink-16mlzma)
1196 DEVICE_TITLE := Hak5 WiFi Pineapple NANO
1197 DEVICE_PACKAGES := kmod-ath9k-htc kmod-usb-core kmod-usb2 kmod-usb-storage \
1198 -swconfig -uboot-envtools
1199 BOARDNAME := WIFI-PINEAPPLE-NANO
1200 DEVICE_PROFILE := WIFIPINEAPPLENANO
1201 TPLINK_HWID := 0x4e414e4f
1202 CONSOLE := ttyATH0,115200
1203 IMAGES := sysupgrade.bin
1204 endef
1205 TARGET_DEVICES += wifi-pineapple-nano
1206
1207 define Device/wlr8100
1208 DEVICE_TITLE := Sitecom WLR-8100
1209 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb3 \
1210 kmod-ath10k ath10k-firmware-qca988x
1211 BOARDNAME := WLR8100
1212 IMAGE_SIZE := 15424k
1213 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
1214 endef
1215 TARGET_DEVICES += wlr8100
1216
1217 define Device/wpj-16m
1218 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
1219 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
1220 IMAGE_SIZE := 16128k
1221 endef
1222
1223 define Device/wpj342
1224 $(Device/wpj-16m)
1225 DEVICE_TITLE := Compex WPJ342 (16MB flash)
1226 BOARDNAME := WPJ342
1227 endef
1228 TARGET_DEVICES += wpj342
1229
1230 define Device/wpj344
1231 $(Device/wpj-16m)
1232 DEVICE_TITLE := Compex WPJ344 (16MB flash)
1233 BOARDNAME := WPJ344
1234 SUPPORTED_DEVICES := wpj344
1235 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1236 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1237 endef
1238 TARGET_DEVICES += wpj344
1239
1240 define Device/wpj531
1241 $(Device/wpj-16m)
1242 DEVICE_TITLE := Compex WPJ531 (16MB flash)
1243 BOARDNAME := WPJ531
1244 endef
1245 TARGET_DEVICES += wpj531
1246
1247 define Device/wpj558
1248 $(Device/wpj-16m)
1249 DEVICE_TITLE := Compex WPJ558 (16MB flash)
1250 BOARDNAME := WPJ558
1251 SUPPORTED_DEVICES := wpj558
1252 IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
1253 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1254 endef
1255 TARGET_DEVICES += wpj558
1256
1257 define Device/wpj563
1258 $(Device/wpj-16m)
1259 DEVICE_TITLE := Compex WPJ563 (16MB flash)
1260 BOARDNAME := WPJ563
1261 endef
1262 TARGET_DEVICES += wpj563
1263
1264 define Device/wrtnode2q
1265 DEVICE_TITLE := WRTnode2Q
1266 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
1267 BOARDNAME := WRTNODE2Q
1268 IMAGE_SIZE := 16064k
1269 MTDPARTS := spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(art)ro,16064k(firmware),16384k@0x0(fullflash)
1270 endef
1271 TARGET_DEVICES += wrtnode2q
1272
1273 define Device/zbt-we1526
1274 DEVICE_TITLE := Zbtlink ZBT-WE1526
1275 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
1276 BOARDNAME := ZBT-WE1526
1277 IMAGE_SIZE := 16000k
1278 KERNEL_SIZE := 1472k
1279 ROOTFS_SIZE := 14528k
1280 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
1281 IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
1282 endef
1283 TARGET_DEVICES += zbt-we1526
1284
1285 define Device/AVM
1286 DEVICE_PACKAGES := fritz-tffs -uboot-envtools
1287 KERNEL := kernel-bin | patch-cmdline | lzma | eva-image
1288 KERNEL_INITRAMFS := $$(KERNEL)
1289 IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
1290 append-squashfs-fakeroot-be | pad-to 256 | \
1291 append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
1292 endef
1293
1294 define Device/fritz300e
1295 $(call Device/AVM)
1296 DEVICE_TITLE := AVM FRITZ!WLAN Repeater 300E
1297 DEVICE_PACKAGES := rssileds -swconfig
1298 BOARDNAME := FRITZ300E
1299 SUPPORTED_DEVICES := fritz300e
1300 IMAGE_SIZE := 15232k
1301 endef
1302 TARGET_DEVICES += fritz300e
1303
1304 define Device/fritz4020
1305 $(call Device/AVM)
1306 DEVICE_TITLE := AVM FRITZ!Box 4020
1307 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
1308 BOARDNAME := FRITZ4020
1309 SUPPORTED_DEVICES := fritz4020
1310 IMAGE_SIZE := 15232k
1311 endef
1312 TARGET_DEVICES += fritz4020