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