ar71xx: Compex WPJ563 support
[openwrt/openwrt.git] / target / linux / ar71xx / image / generic.mk
1 define Device/ap531b0
2 DEVICE_TITLE := Rockeetech AP531B0
3 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
4 BOARDNAME = AP531B0
5 IMAGE_SIZE := 16000k
6 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
7 endef
8 TARGET_DEVICES += ap531b0
9
10 define Device/ap90q
11 DEVICE_TITLE := YunCore AP90Q
12 BOARDNAME = AP90Q
13 IMAGE_SIZE = 16000k
14 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
15 endef
16 TARGET_DEVICES += ap90q
17
18 define Device/bsb
19 DEVICE_TITLE := Smart Electronics Black Swift board
20 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
21 BOARDNAME = BSB
22 IMAGE_SIZE = 16000k
23 CONSOLE = ttyATH0,115200
24 MTDPARTS = spi0.0:128k(u-boot)ro,64k(u-boot-env)ro,16128k(firmware),64k(art)ro
25 endef
26 TARGET_DEVICES += bsb
27
28 define Device/carambola2
29 DEVICE_TITLE := Carambola2 board from 8Devices
30 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
31 BOARDNAME = CARAMBOLA2
32 IMAGE_SIZE = 16000k
33 CONSOLE = ttyATH0,115200
34 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
35 endef
36 TARGET_DEVICES += carambola2
37
38 define Device/cf-e316n-v2
39 DEVICE_TITLE := COMFAST CF-E316N v2
40 BOARDNAME = CF-E316N-V2
41 IMAGE_SIZE = 16192k
42 MTDPARTS = spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(art-backup)ro
43 endef
44 TARGET_DEVICES += cf-e316n-v2
45
46 define Device/cf-e320n-v2
47 $(Device/cf-e316n-v2)
48 DEVICE_TITLE := COMFAST CF-E320N v2
49 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
50 BOARDNAME = CF-E320N-V2
51 endef
52 TARGET_DEVICES += cf-e320n-v2
53
54 define Device/cf-e380ac-v1
55 DEVICE_TITLE := COMFAST CF-E380AC v1
56 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
57 BOARDNAME = CF-E380AC-V1
58 IMAGE_SIZE = 16128k
59 MTDPARTS = spi0.0:128k(u-boot)ro,64k(art)ro,16128k(firmware),64k(art-backup)ro
60 endef
61 TARGET_DEVICES += cf-e380ac-v1
62
63 define Device/cf-e380ac-v2
64 $(Device/cf-e380ac-v1)
65 DEVICE_TITLE := COMFAST CF-E380AC v2
66 BOARDNAME = CF-E380AC-V2
67 IMAGE_SIZE = 16000k
68 MTDPARTS = spi0.0:256k(u-boot)ro,64k(art)ro,16000k(firmware),64k(art-backup)ro
69 endef
70 TARGET_DEVICES += cf-e380ac-v2
71
72 define Device/cf-e520n
73 DEVICE_TITLE := COMFAST CF-E520N
74 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
75 BOARDNAME = CF-E520N
76 IMAGE_SIZE = 8000k
77 MTDPARTS = spi0.0:64k(u-boot)ro,64k(art)ro,8000k(firmware),64k(art-backup)ro
78 endef
79 TARGET_DEVICES += cf-e520n
80
81 define Device/cf-e530n
82 $(Device/cf-e520n)
83 DEVICE_TITLE := COMFAST CF-E530N
84 BOARDNAME = CF-E530N
85 endef
86 TARGET_DEVICES += cf-e530n
87
88 define Device/cpe505n
89 DEVICE_TITLE := P&W CPE505N
90 BOARDNAME = CPE505N
91 IMAGE_SIZE = 16000k
92 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
93 endef
94 TARGET_DEVICES += cpe505n
95
96 define Device/cpe830
97 $(Device/ap90q)
98 DEVICE_TITLE := YunCore CPE830
99 DEVICE_PACKAGES := rssileds
100 BOARDNAME = CPE830
101 endef
102 TARGET_DEVICES += cpe830
103
104 define Device/cpe870
105 DEVICE_TITLE := YunCore CPE870
106 DEVICE_PACKAGES := rssileds
107 BOARDNAME = CPE870
108 IMAGE_SIZE = 7936k
109 MTDPARTS = spi0.0:64k(u-boot)ro,64k(u-boot-env),7936k(firmware),64k(config)ro,64k(art)ro
110 endef
111 TARGET_DEVICES += cpe870
112
113 define Device/dragino2
114 BOARDNAME := DRAGINO2
115 CONSOLE := ttyATH0,115200
116 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
117 DEVICE_TITLE := Dragino 2 (MS14)
118 IMAGE_SIZE := 16000k
119 MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
120 endef
121 TARGET_DEVICES += dragino2
122
123 define Device/weio
124 DEVICE_TITLE := WeIO
125 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
126 BOARDNAME = WEIO
127 IMAGE_SIZE = 16000k
128 CONSOLE = ttyATH0,115200
129 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
130 endef
131 TARGET_DEVICES += weio
132
133 define Device/gl-ar150
134 DEVICE_TITLE := GL AR150
135 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
136 BOARDNAME = GL-AR150
137 IMAGE_SIZE = 16000k
138 CONSOLE = ttyATH0,115200
139 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
140 endef
141 TARGET_DEVICES += gl-ar150
142
143 define Device/gl-ar300
144 DEVICE_TITLE := GL AR300
145 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
146 BOARDNAME = GL-AR300
147 IMAGE_SIZE = 16000k
148 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
149 endef
150 TARGET_DEVICES += gl-ar300
151
152 define Device/gl-ar300m
153 DEVICE_TITLE := GL AR300M
154 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 uboot-envtools
155 BOARDNAME = GL-AR300M
156 IMAGE_SIZE = 16000k
157 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
158 endef
159 TARGET_DEVICES += gl-ar300m
160
161 define Device/gl-domino
162 DEVICE_TITLE := GL Domino Pi
163 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
164 BOARDNAME = DOMINO
165 IMAGE_SIZE = 16000k
166 CONSOLE = ttyATH0,115200
167 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
168 endef
169 TARGET_DEVICES += gl-domino
170
171 define Device/gl-mifi
172 DEVICE_TITLE := GL MIFI
173 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
174 BOARDNAME = GL-MIFI
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 += gl-mifi
180
181 define Device/lima
182 DEVICE_TITLE := Lima board from 8Devices
183 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
184 BOARDNAME = LIMA
185 IMAGE_SIZE = 15616k
186 MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,256k(art)ro,-(firmware)
187 endef
188 TARGET_DEVICES += lima
189
190 define Device/mr12
191 DEVICE_TITLE := Meraki MR12
192 DEVICE_PACKAGES := kmod-spi-gpio
193 BOARDNAME = MR12
194 IMAGE_SIZE = 15680k
195 MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
196 IMAGE/kernel.bin = append-kernel
197 IMAGE/rootfs.bin = append-rootfs | pad-rootfs
198 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
199 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
200 endef
201 TARGET_DEVICES += mr12
202
203 define Device/mr16
204 DEVICE_TITLE := Meraki MR16
205 DEVICE_PACKAGES := kmod-spi-gpio
206 BOARDNAME = MR16
207 IMAGE_SIZE = 15680k
208 MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
209 IMAGE/kernel.bin = append-kernel
210 IMAGE/rootfs.bin = append-rootfs | pad-rootfs
211 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
212 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
213 endef
214 TARGET_DEVICES += mr16
215
216 define Device/dr531
217 DEVICE_TITLE := Wallys DR531
218 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
219 BOARDNAME = DR531
220 IMAGE_SIZE = 7808k
221 MTDPARTS = spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
222 endef
223 TARGET_DEVICES += dr531
224
225 define Device/wndr3700
226 DEVICE_TITLE := NETGEAR WNDR3700
227 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
228 BOARDNAME = WNDR3700
229 NETGEAR_KERNEL_MAGIC = 0x33373030
230 NETGEAR_BOARD_ID = WNDR3700
231 IMAGE_SIZE = 7680k
232 MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
233 IMAGES := sysupgrade.bin factory.img factory-NA.img
234 KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
235 IMAGE/default = append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
236 IMAGE/sysupgrade.bin = $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
237 IMAGE/factory.img = $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
238 IMAGE/factory-NA.img = $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
239 endef
240
241 define Device/wndr3700v2
242 $(Device/wndr3700)
243 DEVICE_TITLE := NETGEAR WNDR3700 v2
244 NETGEAR_BOARD_ID = WNDR3700v2
245 NETGEAR_KERNEL_MAGIC = 0x33373031
246 NETGEAR_HW_ID = 29763654+16+64
247 IMAGE_SIZE = 15872k
248 MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
249 IMAGES := sysupgrade.bin factory.img
250 endef
251
252 define Device/wndr3800
253 $(Device/wndr3700v2)
254 DEVICE_TITLE := NETGEAR WNDR3800
255 NETGEAR_BOARD_ID = WNDR3800
256 NETGEAR_HW_ID = 29763654+16+128
257 endef
258
259 define Device/wndr3800ch
260 $(Device/wndr3800)
261 DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
262 NETGEAR_BOARD_ID = WNDR3800CH
263 endef
264
265 define Device/wndrmac
266 $(Device/wndr3700v2)
267 DEVICE_TITLE := NETGEAR WNDRMAC
268 NETGEAR_BOARD_ID = WNDRMAC
269 endef
270
271 define Device/wndrmacv2
272 $(Device/wndr3800)
273 DEVICE_TITLE := NETGEAR WNDRMAC v2
274 NETGEAR_BOARD_ID = WNDRMACv2
275 endef
276
277 TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2
278
279 define Device/cap324
280 DEVICE_TITLE := PowerCloud CAP324 Cloud AP
281 DEVICE_PACKAGES := uboot-envtools
282 BOARDNAME := CAP324
283 DEVICE_PROFILE := CAP324
284 IMAGE_SIZE = 15296k
285 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
286 endef
287
288 TARGET_DEVICES += cap324
289
290 define Device/cap324-nocloud
291 DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
292 DEVICE_PACKAGES := uboot-envtools
293 BOARDNAME := CAP324
294 DEVICE_PROFILE := CAP324
295 IMAGE_SIZE = 16000k
296 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
297 endef
298
299 TARGET_DEVICES += cap324-nocloud
300
301 define Device/cr3000
302 DEVICE_TITLE := PowerCloud CR3000 Cloud Router
303 DEVICE_PACKAGES := uboot-envtools
304 BOARDNAME := CR3000
305 DEVICE_PROFILE := CR3000
306 IMAGE_SIZE = 7104k
307 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
308 endef
309
310 TARGET_DEVICES += cr3000
311
312 define Device/cr3000-nocloud
313 DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
314 DEVICE_PACKAGES := uboot-envtools
315 BOARDNAME := CR3000
316 DEVICE_PROFILE := CR3000
317 IMAGE_SIZE = 7808k
318 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
319 endef
320
321 TARGET_DEVICES += cr3000-nocloud
322
323 define Device/cr5000
324 DEVICE_TITLE := PowerCloud CR5000 Cloud Router
325 DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
326 BOARDNAME := CR5000
327 DEVICE_PROFILE := CR5000
328 IMAGE_SIZE = 7104k
329 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
330 endef
331
332 TARGET_DEVICES += cr5000
333
334 define Device/cr5000-nocloud
335 DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
336 DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
337 BOARDNAME := CR5000
338 DEVICE_PROFILE := CR5000
339 IMAGE_SIZE = 7808k
340 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
341 endef
342
343 TARGET_DEVICES += cr5000-nocloud
344
345 define Device/pqi-air-pen
346 DEVICE_TITLE := PQI Air Pen
347 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage
348 BOARDNAME = PQI-AIR-PEN
349 IMAGE_SIZE = 7744k
350 CONSOLE = ttyATH0,115200
351 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(art)ro,64k(NVRAM)ro,7680k(firmware),64k(CONF)
352 endef
353
354 TARGET_DEVICES += pqi-air-pen
355
356 define Device/antminer-s1
357 $(Device/tplink-8mlzma)
358 DEVICE_TITLE := Antminer-S1
359 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
360 BOARDNAME := ANTMINER-S1
361 DEVICE_PROFILE := ANTMINERS1
362 TPLINK_HWID := 0x04440101
363 CONSOLE := ttyATH0,115200
364 endef
365
366 define Device/antminer-s3
367 $(Device/tplink-8mlzma)
368 DEVICE_TITLE := Antminer-S3
369 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-crypto-manager kmod-i2c-gpio-custom kmod-usb-hid
370 BOARDNAME := ANTMINER-S3
371 DEVICE_PROFILE := ANTMINERS3
372 TPLINK_HWID := 0x04440301
373 CONSOLE := ttyATH0,115200
374 endef
375
376 define Device/antrouter-r1
377 $(Device/tplink-8mlzma)
378 DEVICE_TITLE := Antrouter-R1
379 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
380 BOARDNAME := ANTROUTER-R1
381 DEVICE_PROFILE := ANTROUTERR1
382 TPLINK_HWID := 0x44440101
383 CONSOLE := ttyATH0,115200
384 endef
385
386 define Device/el-m150
387 $(Device/tplink-8mlzma)
388 DEVICE_TITLE := EasyLink EL-M150
389 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
390 BOARDNAME := EL-M150
391 DEVICE_PROFILE := ELM150
392 TPLINK_HWID := 0x01500101
393 CONSOLE := ttyATH0,115200
394 endef
395
396 define Device/el-mini
397 $(Device/tplink-8mlzma)
398 DEVICE_TITLE := EasyLink EL-MINI
399 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
400 BOARDNAME := EL-MINI
401 DEVICE_PROFILE := ELMINI
402 TPLINK_HWID := 0x01530001
403 CONSOLE := ttyATH0,115200
404 endef
405 TARGET_DEVICES += antminer-s1 antminer-s3 antrouter-r1 el-m150 el-mini
406
407 define Device/gl-inet-6408A-v1
408 $(Device/tplink-8mlzma)
409 DEVICE_TITLE := GL.iNet 6408
410 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
411 BOARDNAME := GL-INET
412 DEVICE_PROFILE := GLINET
413 TPLINK_HWID := 0x08000001
414 CONSOLE := ttyATH0,115200
415 endef
416
417 define Device/gl-inet-6416A-v1
418 $(Device/tplink-16mlzma)
419 DEVICE_TITLE := GL.iNet 6416
420 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
421 BOARDNAME := GL-INET
422 DEVICE_PROFILE := GLINET
423 TPLINK_HWID := 0x08000001
424 CONSOLE := ttyATH0,115200
425 endef
426 TARGET_DEVICES += gl-inet-6408A-v1 gl-inet-6416A-v1
427
428 define Device/jwap230
429 DEVICE_TITLE := jjPlus JWAP230
430 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
431 BOARDNAME = JWAP230
432 IMAGE_SIZE = 16000k
433 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
434 endef
435 TARGET_DEVICES += jwap230
436
437 define Device/r602n
438 DEVICE_TITLE := P&W R602N
439 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
440 BOARDNAME = R602N
441 IMAGE_SIZE = 16000k
442 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
443 endef
444 TARGET_DEVICES += r602n
445
446 define Device/rnx-n360rt
447 $(Device/tplink-4m)
448 DEVICE_TITLE := Rosewill RNX-N360RT
449 BOARDNAME := TL-WR941ND
450 DEVICE_PROFILE := RNXN360RT
451 TPLINK_HWID := 0x09410002
452 TPLINK_HWREV := 0x00420001
453 endef
454 TARGET_DEVICES += rnx-n360rt
455
456 define Device/mc-mac1200r
457 $(Device/tplink-8mlzma)
458 DEVICE_TITLE := Mercury MAC1200R
459 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
460 BOARDNAME := MC-MAC1200R
461 DEVICE_PROFILE := MAC1200R
462 TPLINK_HWID := 0x12000001
463 endef
464 TARGET_DEVICES += mc-mac1200r
465
466 define Device/minibox-v1
467 $(Device/tplink-16mlzma)
468 DEVICE_TITLE := Gainstrong MiniBox V1.0
469 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
470 BOARDNAME := MINIBOX-V1
471 DEVICE_PROFILE := MINIBOXV1
472 TPLINK_HWID := 0x3C000201
473 CONSOLE := ttyATH0,115200
474 endef
475 TARGET_DEVICES += minibox-v1
476
477 define Device/omy-g1
478 $(Device/tplink-16mlzma)
479 DEVICE_TITLE := OMYlink OMY-G1
480 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
481 BOARDNAME := OMY-G1
482 DEVICE_PROFILE := OMYG1
483 TPLINK_HWID := 0x06660101
484 endef
485
486 define Device/omy-x1
487 $(Device/tplink-8mlzma)
488 DEVICE_TITLE := OMYlink OMY-X1
489 BOARDNAME := OMY-X1
490 DEVICE_PROFILE := OMYX1
491 TPLINK_HWID := 0x06660201
492 endef
493 TARGET_DEVICES += omy-g1 omy-x1
494
495 define Device/onion-omega
496 $(Device/tplink-16mlzma)
497 DEVICE_TITLE := Onion Omega
498 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
499 BOARDNAME := ONION-OMEGA
500 DEVICE_PROFILE := OMEGA
501 TPLINK_HWID := 0x04700001
502 CONSOLE := ttyATH0,115200
503 endef
504 TARGET_DEVICES += onion-omega
505
506 define Device/sc1750
507 DEVICE_TITLE := Abicom SC1750
508 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
509 BOARDNAME = SC1750
510 IMAGE_SIZE = 15744k
511 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
512 endef
513 TARGET_DEVICES += sc1750
514
515 define Device/sc300m
516 DEVICE_TITLE := Abicom SC300M
517 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
518 BOARDNAME = SC300M
519 IMAGE_SIZE = 15744k
520 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
521 endef
522 TARGET_DEVICES += sc300m
523
524 define Device/sc450
525 DEVICE_TITLE := Abicom SC450
526 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
527 BOARDNAME = SC450
528 IMAGE_SIZE = 15744k
529 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),15744k(firmware),128k(APConfig),128k(kplog),64k(ART)
530 endef
531 TARGET_DEVICES += sc450
532
533 define Device/smart-300
534 $(Device/tplink-8mlzma)
535 DEVICE_TITLE := NC-LINK SMART-300
536 BOARDNAME := SMART-300
537 DEVICE_PROFILE := SMART-300
538 TPLINK_HWID := 0x93410001
539 endef
540 TARGET_DEVICES += smart-300
541
542 define Device/som9331
543 $(Device/tplink-8mlzma)
544 DEVICE_TITLE := OpenEmbed SOM9331
545 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
546 BOARDNAME := SOM9331
547 DEVICE_PROFILE := SOM9331
548 TPLINK_HWID := 0x04800054
549 CONSOLE := ttyATH0,115200
550 endef
551 TARGET_DEVICES += som9331
552
553 define Device/sr3200
554 DEVICE_TITLE := YunCore SR3200
555 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
556 BOARDNAME = SR3200
557 IMAGE_SIZE = 16000k
558 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
559 endef
560 TARGET_DEVICES += sr3200
561
562 define Device/xd3200
563 $(Device/sr3200)
564 DEVICE_TITLE := YunCore XD3200
565 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
566 BOARDNAME = XD3200
567 endef
568 TARGET_DEVICES += xd3200
569
570 define Device/tellstick-znet-lite
571 $(Device/tplink-16mlzma)
572 DEVICE_TITLE := TellStick ZNet Lite
573 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
574 BOARDNAME := TELLSTICK-ZNET-LITE
575 DEVICE_PROFILE := TELLSTICKZNETLITE
576 TPLINK_HWID := 0x00726001
577 CONSOLE := ttyATH0,115200
578 endef
579 TARGET_DEVICES += tellstick-znet-lite
580
581 define Device/oolite
582 $(Device/tplink-16mlzma)
583 DEVICE_TITLE := Gainstrong OOLITE
584 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
585 BOARDNAME := GS-OOLITE
586 DEVICE_PROFILE := OOLITE
587 TPLINK_HWID := 0x3C000101
588 CONSOLE := ttyATH0,115200
589 endef
590 TARGET_DEVICES += oolite
591
592
593 define Device/NBG6616
594 DEVICE_TITLE := ZyXEL NBG6616
595 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
596 BOARDNAME = NBG6616
597 KERNEL_SIZE = 2048k
598 IMAGE_SIZE = 15323k
599 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)
600 CMDLINE += mem=128M
601 IMAGES := sysupgrade.bin
602 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
603 IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
604 # We cannot currently build a factory image. It is the sysupgrade image
605 # prefixed with a header (which is actually written into the MTD device).
606 # The header is 2kiB and is filled with 0xff. The format seems to be:
607 # 2 bytes: 0x0000
608 # 2 bytes: checksum of the data partition (big endian)
609 # 4 bytes: length of the contained image file (big endian)
610 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
611 # 2 bytes: 0x0000
612 # 2 bytes: checksum over the header partition (big endian)
613 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
614 # rest: 0xff padding
615 #
616 # The checksums are calculated by adding up all bytes and if a 16bit
617 # overflow occurs, one is added and the sum is masked to 16 bit:
618 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
619 # Should the file have an odd number of bytes then the byte len-0x800 is
620 # used additionally.
621 # The checksum for the header is calcualted over the first 2048 bytes with
622 # the firmware checksum as the placeholder during calculation.
623 #
624 # The header is padded with 0xff to the erase block size of the device.
625 endef
626
627 TARGET_DEVICES += NBG6616
628
629 define Device/c-55
630 DEVICE_TITLE := AirTight Networks C-55
631 DEVICE_PACKAGES := kmod-ath9k
632 BOARDNAME = C-55
633 KERNEL_SIZE = 2048k
634 IMAGE_SIZE = 15872k
635 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)
636 IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
637 endef
638
639 TARGET_DEVICES += c-55
640
641
642 define Build/uImageHiWiFi
643 # Field ih_name needs to start with "tw150v1"
644 mkimage -A $(LINUX_KARCH) \
645 -O linux -T kernel \
646 -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
647 -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION)' -d $@ $@.new
648 @mv $@.new $@
649 endef
650
651 define Device/hiwifi-hc6361
652 DEVICE_TITLE := HiWiFi HC6361
653 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
654 kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
655 BOARDNAME := HiWiFi-HC6361
656 DEVICE_PROFILE := HIWIFI_HC6361
657 IMAGE_SIZE := 16128k
658 KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
659 CONSOLE := ttyATH0,115200
660 MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
661 endef
662 TARGET_DEVICES += hiwifi-hc6361
663
664
665 define Build/seama
666 $(STAGING_DIR_HOST)/bin/seama -i $@ $(if $(1),$(1),-m "dev=/dev/mtdblock/1" -m "type=firmware")
667 mv $@.seama $@
668 endef
669
670 define Build/seama-seal
671 $(call Build/seama,-s $@.seama $(1))
672 endef
673
674 define Device/seama
675 LOADER_TYPE := bin
676 BLOCKSIZE := 64k
677 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
678 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
679 KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
680 IMAGES := sysupgrade.bin factory.bin
681
682 # 64 bytes offset:
683 # - 28 bytes seama_header
684 # - 36 bytes of META data (4-bytes aligned)
685 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
686 IMAGE/sysupgrade.bin := \
687 $$(IMAGE/default) | seama | pad-rootfs | \
688 check-size $$$$(IMAGE_SIZE)
689 IMAGE/factory.bin := \
690 $$(IMAGE/default) | seama | pad-rootfs | \
691 seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
692 check-size $$$$(IMAGE_SIZE)
693 SEAMA_SIGNATURE :=
694 DEVICE_VARS += SEAMA_SIGNATURE
695 endef
696
697 define Device/dir-869-a1
698 $(Device/seama)
699 DEVICE_TITLE := D-Link DIR-869 rev. A1
700 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
701 BOARDNAME = DIR-869-A1
702 IMAGE_SIZE = 15872k
703 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
704 SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
705 IMAGE/factory.bin := \
706 $$(IMAGE/default) | pad-rootfs -x 64 | \
707 seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
708 check-size $$$$(IMAGE_SIZE)
709 endef
710
711 define Device/mynet-n600
712 $(Device/seama)
713 DEVICE_TITLE := Western Digital My Net N600
714 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
715 BOARDNAME = MYNET-N600
716 IMAGE_SIZE = 15808k
717 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
718 SEAMA_SIGNATURE := wrgnd16_wd_db600
719 endef
720
721 define Device/mynet-n750
722 $(Device/seama)
723 DEVICE_TITLE := Western Digital My Net N750
724 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
725 BOARDNAME = MYNET-N750
726 IMAGE_SIZE = 15808k
727 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
728 SEAMA_SIGNATURE := wrgnd13_wd_av
729 endef
730
731 define Device/qihoo-c301
732 $(Device/seama)
733 DEVICE_TITLE := Qihoo C301
734 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
735 BOARDNAME = QIHOO-C301
736 IMAGE_SIZE = 15744k
737 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)
738 SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
739 endef
740
741 TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750 qihoo-c301
742
743 define Build/mkwrggimg
744 $(STAGING_DIR_HOST)/bin/mkwrggimg -b \
745 -i $@ -o $@.imghdr -d /dev/mtdblock/1 \
746 -m $(BOARDNAME) -s $(DAP_SIGNATURE) \
747 -v LEDE -B $(REVISION)
748 mv $@.imghdr $@
749 endef
750
751 define Build/wrgg-pad-rootfs
752 $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
753 endef
754
755 define Device/dap-2695-a1
756 DEVICE_TITLE := D-Link DAP-2695 rev. A1
757 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k uboot-envtools
758 BOARDNAME = DAP-2695-A1
759 IMAGES := factory.img sysupgrade.bin
760 IMAGE_SIZE = 15360k
761 IMAGE/factory.img = append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
762 IMAGE/sysupgrade.bin = append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
763 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
764 KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
765 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
766 DAP_SIGNATURE := wapac02_dkbs_dap2695
767 DEVICE_VARS += DAP_SIGNATURE
768 endef
769
770 TARGET_DEVICES += dap-2695-a1
771
772 define Build/mkbuffaloimg
773 $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
774 -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
775 -K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
776 -i $@ -o $@.new
777 mv $@.new $@
778 endef
779
780 define Device/bhr-4grv2
781 DEVICE_TITLE := Buffalo BHR-4GRV2
782 BOARDNAME := BHR-4GRV2
783 ROOTFS_SIZE := 14528k
784 KERNEL_SIZE := 1472k
785 IMAGE_SIZE := 16000k
786 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
787 IMAGES := sysupgrade.bin factory.bin
788 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
789 IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
790 endef
791 TARGET_DEVICES += bhr-4grv2
792
793 define Device/wpj342
794 DEVICE_TITLE := Compex WPJ342 (16MB flash)
795 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
796 BOARDNAME := WPJ342
797 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
798 IMAGE_SIZE := 16128k
799 endef
800 TARGET_DEVICES += wpj342
801
802 define Device/wpj344
803 DEVICE_TITLE := Compex WPJ344 (16MB flash)
804 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
805 BOARDNAME := WPJ344
806 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
807 IMAGE_SIZE := 16128k
808 endef
809 TARGET_DEVICES += wpj344
810
811 define Device/wpj531
812 DEVICE_TITLE := Compex WPJ531 (16MB flash)
813 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
814 BOARDNAME := WPJ531
815 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
816 IMAGE_SIZE := 16128k
817 endef
818 TARGET_DEVICES += wpj531
819
820 define Device/wpj558
821 DEVICE_TITLE := Compex WPJ558 (16MB flash)
822 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
823 BOARDNAME := WPJ558
824 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
825 IMAGE_SIZE := 16128k
826 endef
827 TARGET_DEVICES += wpj558
828
829 define Device/wpj563
830 DEVICE_TITLE := Compex WPJ563 (16MB flash)
831 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
832 BOARDNAME := WPJ563
833 MTDPARTS := spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro
834 IMAGE_SIZE := 16128k
835 endef
836 TARGET_DEVICES += wpj563