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