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