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