ipq806x: add support for TP-Link Archer VR2600v
[openwrt/openwrt.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/domywifi-dw33d
102 DEVICE_TITLE := DomyWifi DW33D
103 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-ledtrig-usbdev kmod-ath10k
104 BOARDNAME = DW33D
105 IMAGE_SIZE = 16000k
106 CONSOLE = ttyS0,115200
107 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware);ar934x-nfc:96m(rootfs_data),32m(backup)ro
108 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 14528k | append-kernel | check-size $$$$(IMAGE_SIZE)
109 endef
110 TARGET_DEVICES += domywifi-dw33d
111
112 define Device/dragino2
113 BOARDNAME := DRAGINO2
114 CONSOLE := ttyATH0,115200
115 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport
116 DEVICE_TITLE := Dragino 2 (MS14)
117 IMAGE_SIZE := 16000k
118 MTDPARTS := spi0.0:256k(u-boot)ro,16000k(firmware),64k(config)ro,64k(art)ro
119 endef
120 TARGET_DEVICES += dragino2
121
122 define Device/weio
123 DEVICE_TITLE := WeIO
124 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
125 BOARDNAME = WEIO
126 IMAGE_SIZE = 16000k
127 CONSOLE = ttyATH0,115200
128 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
129 endef
130 TARGET_DEVICES += weio
131
132 define Device/gl-ar150
133 DEVICE_TITLE := GL AR150
134 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
135 BOARDNAME = GL-AR150
136 IMAGE_SIZE = 16000k
137 CONSOLE = ttyATH0,115200
138 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
139 endef
140 TARGET_DEVICES += gl-ar150
141
142 define Device/gl-ar300
143 DEVICE_TITLE := GL AR300
144 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
145 BOARDNAME = GL-AR300
146 IMAGE_SIZE = 16000k
147 CONSOLE = ttyS0,115200
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 CONSOLE = ttyS0,115200
158 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env),16000k(firmware),64k(art)ro
159 endef
160 TARGET_DEVICES += gl-ar300m
161
162 define Device/gl-domino
163 DEVICE_TITLE := GL Domino Pi
164 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
165 BOARDNAME = DOMINO
166 IMAGE_SIZE = 16000k
167 CONSOLE = ttyATH0,115200
168 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
169 endef
170 TARGET_DEVICES += gl-domino
171
172 define Device/gl-mifi
173 DEVICE_TITLE := GL MIFI
174 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
175 BOARDNAME = GL-MIFI
176 IMAGE_SIZE = 16000k
177 CONSOLE = ttyATH0,115200
178 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
179 endef
180 TARGET_DEVICES += gl-mifi
181
182 define Device/mr12
183 DEVICE_TITLE := Meraki MR12
184 DEVICE_PACKAGES := kmod-spi-gpio
185 BOARDNAME = MR12
186 IMAGE_SIZE = 15680k
187 MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
188 IMAGE/kernel.bin = append-kernel
189 IMAGE/rootfs.bin = append-rootfs | pad-rootfs
190 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
191 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
192 endef
193 TARGET_DEVICES += mr12
194
195 define Device/mr16
196 DEVICE_TITLE := Meraki MR16
197 DEVICE_PACKAGES := kmod-spi-gpio
198 BOARDNAME = MR16
199 IMAGE_SIZE = 15680k
200 MTDPARTS = spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13440k(rootfs),2240k(kernel),64k(mac),128k(art)ro,15680k@0x80000(firmware)
201 IMAGE/kernel.bin = append-kernel
202 IMAGE/rootfs.bin = append-rootfs | pad-rootfs
203 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to 13440k | append-kernel | check-size $$$$(IMAGE_SIZE)
204 IMAGES := kernel.bin rootfs.bin sysupgrade.bin
205 endef
206 TARGET_DEVICES += mr16
207
208 define Device/dr531
209 DEVICE_TITLE := Wallys DR531
210 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
211 BOARDNAME = DR531
212 IMAGE_SIZE = 7808k
213 MTDPARTS = spi0.0:192k(u-boot)ro,64k(u-boot-env),64k(partition-table)ro,7808k(firmware),64k(art)ro
214 endef
215 TARGET_DEVICES += dr531
216
217 define Device/wndr3700
218 DEVICE_TITLE := NETGEAR WNDR3700
219 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-wndr3700-usb
220 BOARDNAME = WNDR3700
221 NETGEAR_KERNEL_MAGIC = 0x33373030
222 NETGEAR_BOARD_ID = WNDR3700
223 IMAGE_SIZE = 7680k
224 MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,7680k(firmware),64k(art)ro
225 IMAGES := sysupgrade.bin factory.img factory-NA.img
226 KERNEL := kernel-bin | patch-cmdline | lzma -d20 | netgear-uImage lzma
227 IMAGE/default = append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
228 IMAGE/sysupgrade.bin = $$(IMAGE/default) | check-size $$$$(IMAGE_SIZE)
229 IMAGE/factory.img = $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)
230 IMAGE/factory-NA.img = $$(IMAGE/default) | netgear-dni NA | check-size $$$$(IMAGE_SIZE)
231 endef
232
233 define Device/wndr3700v2
234 $(Device/wndr3700)
235 DEVICE_TITLE := NETGEAR WNDR3700 v2
236 NETGEAR_BOARD_ID = WNDR3700v2
237 NETGEAR_KERNEL_MAGIC = 0x33373031
238 NETGEAR_HW_ID = 29763654+16+64
239 IMAGE_SIZE = 15872k
240 MTDPARTS = spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,15872k(firmware),64k(art)ro
241 IMAGES := sysupgrade.bin factory.img
242 endef
243
244 define Device/wndr3800
245 $(Device/wndr3700v2)
246 DEVICE_TITLE := NETGEAR WNDR3800
247 NETGEAR_BOARD_ID = WNDR3800
248 NETGEAR_HW_ID = 29763654+16+128
249 endef
250
251 define Device/wndr3800ch
252 $(Device/wndr3800)
253 DEVICE_TITLE := NETGEAR WNDR3800 (Ch)
254 NETGEAR_BOARD_ID = WNDR3800CH
255 endef
256
257 define Device/wndrmac
258 $(Device/wndr3700v2)
259 DEVICE_TITLE := NETGEAR WNDRMAC
260 NETGEAR_BOARD_ID = WNDRMAC
261 endef
262
263 define Device/wndrmacv2
264 $(Device/wndr3800)
265 DEVICE_TITLE := NETGEAR WNDRMAC v2
266 NETGEAR_BOARD_ID = WNDRMACv2
267 endef
268
269 TARGET_DEVICES += wndr3700 wndr3700v2 wndr3800 wndr3800ch wndrmac wndrmacv2
270
271 define Device/cap324
272 DEVICE_TITLE := PowerCloud CAP324 Cloud AP
273 DEVICE_PACKAGES := uboot-envtools
274 BOARDNAME := CAP324
275 DEVICE_PROFILE := CAP324
276 IMAGE_SIZE = 15296k
277 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15296k(firmware),640k(certs),64k(nvram),64k(art)ro
278 endef
279
280 TARGET_DEVICES += cap324
281
282 define Device/cap324-nocloud
283 DEVICE_TITLE := PowerCloud CAP324 Cloud AP (No-Cloud)
284 DEVICE_PACKAGES := uboot-envtools
285 BOARDNAME := CAP324
286 DEVICE_PROFILE := CAP324
287 IMAGE_SIZE = 16000k
288 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro
289 endef
290
291 TARGET_DEVICES += cap324-nocloud
292
293 define Device/cr3000
294 DEVICE_TITLE := PowerCloud CR3000 Cloud Router
295 DEVICE_PACKAGES := uboot-envtools
296 BOARDNAME := CR3000
297 DEVICE_PROFILE := CR3000
298 IMAGE_SIZE = 7104k
299 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
300 endef
301
302 TARGET_DEVICES += cr3000
303
304 define Device/cr3000-nocloud
305 DEVICE_TITLE := PowerCloud CR3000 (No-Cloud)
306 DEVICE_PACKAGES := uboot-envtools
307 BOARDNAME := CR3000
308 DEVICE_PROFILE := CR3000
309 IMAGE_SIZE = 7808k
310 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
311 endef
312
313 TARGET_DEVICES += cr3000-nocloud
314
315 define Device/cr5000
316 DEVICE_TITLE := PowerCloud CR5000 Cloud Router
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 = 7104k
321 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7104k(firmware),640k(certs),64k(nvram),64k(art)ro
322 endef
323
324 TARGET_DEVICES += cr5000
325
326 define Device/cr5000-nocloud
327 DEVICE_TITLE := PowerCloud CR5000 (No-Cloud)
328 DEVICE_PACKAGES := uboot-envtools kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-core
329 BOARDNAME := CR5000
330 DEVICE_PROFILE := CR5000
331 IMAGE_SIZE = 7808k
332 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7808k(firmware),64k(art)ro
333 endef
334
335 TARGET_DEVICES += cr5000-nocloud
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/smart-300
479 $(Device/tplink-8mlzma)
480 DEVICE_TITLE := NC-LINK SMART-300
481 BOARDNAME := SMART-300
482 DEVICE_PROFILE := SMART-300
483 TPLINK_HWID := 0x93410001
484 endef
485 TARGET_DEVICES += smart-300
486
487 define Device/som9331
488 $(Device/tplink-8mlzma)
489 DEVICE_TITLE := OpenEmbed SOM9331
490 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
491 BOARDNAME := SOM9331
492 DEVICE_PROFILE := SOM9331
493 TPLINK_HWID := 0x04800054
494 CONSOLE := ttyATH0,115200
495 endef
496 TARGET_DEVICES += som9331
497
498 define Device/tellstick-znet-lite
499 $(Device/tplink-16mlzma)
500 DEVICE_TITLE := TellStick ZNet Lite
501 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-acm kmod-usb-serial kmod-usb-serial-pl2303
502 BOARDNAME := TELLSTICK-ZNET-LITE
503 DEVICE_PROFILE := TELLSTICKZNETLITE
504 TPLINK_HWID := 0x00726001
505 CONSOLE := ttyATH0,115200
506 endef
507 TARGET_DEVICES += tellstick-znet-lite
508
509 define Device/oolite
510 $(Device/tplink-16mlzma)
511 DEVICE_TITLE := Gainstrong OOLITE
512 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
513 BOARDNAME := GS-OOLITE
514 DEVICE_PROFILE := OOLITE
515 TPLINK_HWID := 0x3C000101
516 CONSOLE := ttyATH0,115200
517 endef
518 TARGET_DEVICES += oolite
519
520
521 define Device/NBG6616
522 DEVICE_TITLE := ZyXEL NBG6616
523 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-usb-storage kmod-rtc-pcf8563 kmod-ath10k ath10k-firmware-qca988x
524 BOARDNAME = NBG6616
525 KERNEL_SIZE = 2048k
526 IMAGE_SIZE = 15323k
527 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)
528 CMDLINE += mem=128M
529 IMAGES := sysupgrade.bin
530 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage
531 IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
532 # We cannot currently build a factory image. It is the sysupgrade image
533 # prefixed with a header (which is actually written into the MTD device).
534 # The header is 2kiB and is filled with 0xff. The format seems to be:
535 # 2 bytes: 0x0000
536 # 2 bytes: checksum of the data partition (big endian)
537 # 4 bytes: length of the contained image file (big endian)
538 # 32 bytes: Firmware Version string (NUL terminated, 0xff padded)
539 # 2 bytes: 0x0000
540 # 2 bytes: checksum over the header partition (big endian)
541 # 32 bytes: Model (e.g. "NBG6616", NUL termiated, 0xff padded)
542 # rest: 0xff padding
543 #
544 # The checksums are calculated by adding up all bytes and if a 16bit
545 # overflow occurs, one is added and the sum is masked to 16 bit:
546 # csum = csum + databyte; if (csum > 0xffff) { csum += 1; csum &= 0xffff };
547 # Should the file have an odd number of bytes then the byte len-0x800 is
548 # used additionally.
549 # The checksum for the header is calcualted over the first 2048 bytes with
550 # the firmware checksum as the placeholder during calculation.
551 #
552 # The header is padded with 0xff to the erase block size of the device.
553 endef
554
555 TARGET_DEVICES += NBG6616
556
557 define Device/c-55
558 DEVICE_TITLE := AirTight Networks C-55
559 DEVICE_PACKAGES := kmod-ath9k
560 BOARDNAME = C-55
561 KERNEL_SIZE = 2048k
562 IMAGE_SIZE = 15872k
563 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)
564 IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
565 endef
566
567 TARGET_DEVICES += c-55
568
569
570 define Build/uImageHiWiFi
571 # Field ih_name needs to start with "tw150v1"
572 mkimage -A $(LINUX_KARCH) \
573 -O linux -T kernel \
574 -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
575 -n 'tw150v1 $(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION)' -d $@ $@.new
576 @mv $@.new $@
577 endef
578
579 define Device/hiwifi-hc6361
580 DEVICE_TITLE := HiWiFi HC6361
581 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage \
582 kmod-fs-ext4 kmod-nls-iso8859-1 e2fsprogs
583 BOARDNAME := HiWiFi-HC6361
584 DEVICE_PROFILE := HIWIFI_HC6361
585 IMAGE_SIZE := 16128k
586 KERNEL := kernel-bin | patch-cmdline | lzma | uImageHiWiFi lzma
587 CONSOLE := ttyATH0,115200
588 MTDPARTS := spi0.0:64k(u-boot)ro,64k(bdinfo)ro,16128k(firmware),64k(backup)ro,64k(art)ro
589 endef
590 TARGET_DEVICES += hiwifi-hc6361
591
592
593 define Build/seama
594 $(STAGING_DIR_HOST)/bin/seama -i $@ $(if $(1),$(1),-m "dev=/dev/mtdblock/1" -m "type=firmware")
595 mv $@.seama $@
596 endef
597
598 define Build/seama-seal
599 $(call Build/seama,-s $@.seama $(1))
600 endef
601
602 define Device/seama
603 CONSOLE := ttyS0,115200
604 LOADER_TYPE := bin
605 BLOCKSIZE := 64k
606 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
607 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | seama
608 KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX).seama
609 IMAGES := sysupgrade.bin factory.bin
610
611 # 64 bytes offset:
612 # - 28 bytes seama_header
613 # - 36 bytes of META data (4-bytes aligned)
614 IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
615 IMAGE/sysupgrade.bin := \
616 $$(IMAGE/default) | seama | pad-rootfs | \
617 check-size $$$$(IMAGE_SIZE)
618 IMAGE/factory.bin := \
619 $$(IMAGE/default) | seama | pad-rootfs | \
620 seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
621 check-size $$$$(IMAGE_SIZE)
622 SEAMA_SIGNATURE :=
623 DEVICE_VARS += SEAMA_SIGNATURE
624 endef
625
626 define Device/dir-869-a1
627 $(Device/seama)
628 DEVICE_TITLE := D-Link DIR-869 rev. A1
629 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
630 BOARDNAME = DIR-869-A1
631 IMAGE_SIZE = 15872k
632 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
633 SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
634 IMAGE/factory.bin := \
635 $$(IMAGE/default) | pad-rootfs -x 64 | \
636 seama | seama-seal -m "signature=$$$$(SEAMA_SIGNATURE)" | \
637 check-size $$$$(IMAGE_SIZE)
638 endef
639
640 define Device/mynet-n600
641 $(Device/seama)
642 DEVICE_TITLE := Western Digital My Net N600
643 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
644 BOARDNAME = MYNET-N600
645 IMAGE_SIZE = 15808k
646 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
647 SEAMA_SIGNATURE := wrgnd16_wd_db600
648 endef
649
650 define Device/mynet-n750
651 $(Device/seama)
652 DEVICE_TITLE := Western Digital My Net N750
653 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
654 BOARDNAME = MYNET-N750
655 IMAGE_SIZE = 15808k
656 MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,64k(devdata)ro,64k(devconf)ro,15872k(firmware),64k(radiocfg)ro
657 SEAMA_SIGNATURE := wrgnd13_wd_av
658 endef
659
660 define Device/qihoo-c301
661 $(Device/seama)
662 DEVICE_TITLE := Qihoo C301
663 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
664 BOARDNAME = QIHOO-C301
665 IMAGE_SIZE = 15744k
666 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)
667 SEAMA_SIGNATURE := wrgac26_qihoo360_360rg
668 endef
669
670 TARGET_DEVICES += dir-869-a1 mynet-n600 mynet-n750 qihoo-c301
671
672 define Build/mkwrggimg
673 $(STAGING_DIR_HOST)/bin/mkwrggimg -b \
674 -i $@ -o $@.imghdr -d /dev/mtdblock/1 \
675 -m $(BOARDNAME) -s $(DAP_SIGNATURE) \
676 -v LEDE -B $(REVISION)
677 mv $@.imghdr $@
678 endef
679
680 define Build/wrgg-pad-rootfs
681 $(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
682 endef
683
684 define Device/dap-2695-a1
685 DEVICE_TITLE := D-Link DAP-2695 rev. A1
686 DEVICE_PACKAGES := ath10k-firmware-qca988x kmod-ath10k uboot-envtools
687 BOARDNAME = DAP-2695-A1
688 IMAGES := factory.img sysupgrade.bin
689 IMAGE_SIZE = 15360k
690 IMAGE/factory.img = append-kernel | pad-offset 65536 160 | append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size $$$$(IMAGE_SIZE)
691 IMAGE/sysupgrade.bin = append-kernel | pad-offset 65536 160 | mkwrggimg | append-rootfs | wrgg-pad-rootfs | check-size $$$$(IMAGE_SIZE)
692 KERNEL := kernel-bin | patch-cmdline | relocate-kernel | lzma
693 KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
694 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
695 DAP_SIGNATURE := wapac02_dkbs_dap2695
696 DEVICE_VARS += DAP_SIGNATURE
697 endef
698
699 TARGET_DEVICES += dap-2695-a1
700
701 define Build/mkbuffaloimg
702 $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
703 -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
704 -K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
705 -i $@ -o $@.new
706 mv $@.new $@
707 endef
708
709 define Device/bhr-4grv2
710 DEVICE_TITLE := Buffalo BHR-4GRV2
711 BOARDNAME := BHR-4GRV2
712 ROOTFS_SIZE := 14528k
713 KERNEL_SIZE := 1472k
714 IMAGE_SIZE := 16000k
715 MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
716 IMAGES := sysupgrade.bin factory.bin
717 IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
718 IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | mkbuffaloimg
719 endef
720 TARGET_DEVICES += bhr-4grv2