aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/generic-tp-link.mk
blob: 502c88b1bae970e0242ce6fb934911b38f4e2c7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
include ./common-tp-link.mk


define Device/archer-cxx
  KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
	append-metadata | check-size $$$$(IMAGE_SIZE)
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef

define Device/archer-c25-v1
  $(Device/archer-cxx)
  DEVICE_TITLE := TP-LINK Archer C25 v1
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887
  BOARDNAME := ARCHER-C25-V1
  TPLINK_BOARD_ID := ARCHER-C25-V1
  DEVICE_PROFILE := ARCHERC25V1
  IMAGE_SIZE := 7808k
  LOADER_TYPE := elf
  MTDPARTS := spi0.0:128k(factory-uboot)ro,64k(u-boot)ro,1536k(kernel),6272k(rootfs),128k(config)ro,64k(art)ro,7808k@0x30000(firmware)
  SUPPORTED_DEVICES := archer-c25-v1
endef
TARGET_DEVICES += archer-c25-v1

define Device/archer-c58-v1
  $(Device/archer-cxx)
  DEVICE_TITLE := TP-LINK Archer C58 v1
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9888
  BOARDNAME := ARCHER-C58-V1
  TPLINK_BOARD_ID := ARCHER-C58-V1
  DEVICE_PROFILE := ARCHERC58V1
  IMAGE_SIZE := 7936k
  MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,7936k(firmware),64k(tplink)ro,64k(art)ro
  SUPPORTED_DEVICES := archer-c58-v1
endef
TARGET_DEVICES += archer-c58-v1

define Device/archer-c59-v1
  $(Device/archer-cxx)
  DEVICE_TITLE := TP-LINK Archer C59 v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca9888
  BOARDNAME := ARCHER-C59-V1
  TPLINK_BOARD_ID := ARCHER-C59-V1
  DEVICE_PROFILE := ARCHERC59V1
  IMAGE_SIZE := 14528k
  MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,1536k(kernel),12992k(rootfs),1664k(tplink)ro,64k(art)ro,14528k@0x20000(firmware)
  SUPPORTED_DEVICES := archer-c59-v1
endef
TARGET_DEVICES += archer-c59-v1

define Device/archer-c60-v1
  $(Device/archer-cxx)
  DEVICE_TITLE := TP-LINK Archer C60 v1
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9888
  BOARDNAME := ARCHER-C60-V1
  TPLINK_BOARD_ID := ARCHER-C60-V1
  DEVICE_PROFILE := ARCHERC60V1
  IMAGE_SIZE := 7936k
  MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,7936k(firmware),64k(tplink)ro,64k(art)ro
  SUPPORTED_DEVICES := archer-c60-v1
endef
TARGET_DEVICES += archer-c60-v1

define Device/archer-c60-v2
  $(Device/archer-c60-v1)
  DEVICE_TITLE := TP-LINK Archer C60 v2
  BOARDNAME := ARCHER-C60-V2
  TPLINK_BOARD_ID := ARCHER-C60-V2
  DEVICE_PROFILE := ARCHERC60V2
  IMAGE_SIZE := 7808k
  MTDPARTS := spi0.0:192k(u-boot)ro,7808k(firmware),128k(tplink)ro,64k(art)ro
  SUPPORTED_DEVICES := archer-c60-v2
endef
TARGET_DEVICES += archer-c60-v2

define Device/archer-c5-v1
  $(Device/tplink-16mlzma)
  DEVICE_TITLE := TP-LINK Archer C5 v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := ARCHER-C5
  DEVICE_PROFILE := ARCHERC7
  TPLINK_HWID := 0xc5000001
endef
TARGET_DEVICES += archer-c5-v1

define Device/archer-c7-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK Archer C7 v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := ARCHER-C7
  DEVICE_PROFILE := ARCHERC7
  TPLINK_HWID := 0x75000001
endef
TARGET_DEVICES += archer-c7-v1

define Device/archer-c7-v2
  $(Device/tplink-16mlzma)
  DEVICE_TITLE := TP-LINK Archer C7 v2
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := ARCHER-C7-V2
  DEVICE_PROFILE := ARCHERC7
  TPLINK_HWID := 0xc7000002
  IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin
  IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
  IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
endef
TARGET_DEVICES += archer-c7-v2

define Device/archer-c7-v2-il
  $(Device/tplink-16mlzma)
  DEVICE_TITLE := TP-LINK Archer C7 v2 (IL)
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := ARCHER-C7-V2
  DEVICE_PROFILE := ARCHERC7
  TPLINK_HWID := 0xc7000002
  TPLINK_HWREV := 0x494c0001
endef
TARGET_DEVICES += archer-c7-v2-il

define Device/tl-wdr7500-v3
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK Archer C7 v3
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := ARCHER-C7
  DEVICE_PROFILE := ARCHERC7
  TPLINK_HWID := 0x75000003
endef
TARGET_DEVICES += tl-wdr7500-v3

define Device/archer-c7-v4
  $(Device/archer-cxx)
  DEVICE_TITLE := TP-LINK Archer C7 v4
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := ARCHER-C7-V4
  TPLINK_BOARD_ID := ARCHER-C7-V4
  IMAGE_SIZE := 15104k
  LOADER_TYPE := elf
  MTDPARTS := spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,1536k(kernel),13568k(rootfs),960k(config)ro,64k(art)ro,15104k@0x40000(firmware)
  SUPPORTED_DEVICES := archer-c7-v4
endef
TARGET_DEVICES += archer-c7-v4

define Device/archer-c7-v5
  $(Device/archer-c7-v4)
  DEVICE_TITLE := TP-LINK Archer C7 v5
  BOARDNAME := ARCHER-C7-V5
  TPLINK_BOARD_ID := ARCHER-C7-V5
  IMAGE_SIZE := 15104k
  MTDPARTS := spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,64k@0x50000(art)ro,1536k@0xc0000(kernel),13824k(rootfs),15360k@0xc0000(firmware)
  SUPPORTED_DEVICES := archer-c7-v5
endef
TARGET_DEVICES += archer-c7-v5

define Device/cpexxx
  DEVICE_PACKAGES := rssileds
  MTDPARTS := spi0.0:128k(u-boot)ro,64k(partition-table)ro,64k(product-info)ro,1792k(kernel),5888k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x40000(firmware)
  IMAGE_SIZE := 7680k
  DEVICE_PROFILE := CPE510
  LOADER_TYPE := elf
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef

define Device/cpe510-520-v1
  $(Device/cpexxx)
  DEVICE_TITLE := TP-LINK CPE510/520 v1
  BOARDNAME := CPE510
  TPLINK_BOARD_ID := CPE510
  LOADER_FLASH_OFFS := 0x43000
  COMPILE := loader-$(1).elf
  COMPILE/loader-$(1).elf := loader-okli-compile
  KERNEL := kernel-bin | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 12288
endef
TARGET_DEVICES += cpe510-520-v1

define Device/cpe210-220-v1
  $(Device/cpe510-520-v1)
  DEVICE_TITLE := TP-LINK CPE210/220 v1
  BOARDNAME := CPE210
  TPLINK_BOARD_ID := CPE210
endef
TARGET_DEVICES += cpe210-220-v1

define Device/cpe210-v2
  $(Device/cpexxx)
  DEVICE_TITLE := TP-LINK CPE210 v2
  BOARDNAME := CPE210V2
  TPLINK_BOARD_ID := CPE210V2
  KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
  TPLINK_HWID := 0x0
  TPLINK_HWREV := 0
  TPLINK_HEADER_VERSION := 1
endef
TARGET_DEVICES += cpe210-v2

define Device/wbs210-v1
  $(Device/cpe510-520-v1)
  DEVICE_TITLE := TP-LINK WBS210 v1
  BOARDNAME := WBS210
  TPLINK_BOARD_ID := WBS210
endef
TARGET_DEVICES += wbs210-v1

define Device/wbs510-v1
  $(Device/cpe510-520-v1)
  DEVICE_TITLE := TP-LINK WBS510 v1
  BOARDNAME := WBS510
  TPLINK_BOARD_ID := WBS510
endef
TARGET_DEVICES += wbs510-v1

define Device/eap120-v1
  DEVICE_TITLE := TP-LINK EAP120 v1
  MTDPARTS := spi0.0:128k(u-boot)ro,64k(partition-table)ro,64k(product-info)ro,1536k(kernel),14336k(rootfs),192k(config)ro,64k(ART)ro,15872k@0x40000(firmware)
  IMAGE_SIZE := 15872k
  BOARDNAME := EAP120
  TPLINK_BOARD_ID := EAP120
  DEVICE_PROFILE := EAP120
  LOADER_TYPE := elf
  KERNEL := kernel-bin | patch-cmdline | lzma | loader-kernel
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += eap120-v1

define Device/re355-v1
  DEVICE_TITLE := TP-LINK RE355 v1
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  MTDPARTS := spi0.0:128k(u-boot)ro,6016k(firmware),64k(partition-table)ro,64k(product-info)ro,1856k(config)ro,64k(art)ro
  IMAGE_SIZE := 7936k
  BOARDNAME := RE355
  TPLINK_BOARD_ID := RE355
  DEVICE_PROFILE := RE355
  LOADER_TYPE := elf
  TPLINK_HWID := 0x0
  TPLINK_HWREV := 0
  TPLINK_HEADER_VERSION := 1
  KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += re355-v1

define Device/re450-v1
  DEVICE_TITLE := TP-LINK RE450 v1
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  MTDPARTS := spi0.0:128k(u-boot)ro,6016k(firmware),64k(partition-table)ro,64k(product-info)ro,1856k(config)ro,64k(art)ro
  IMAGE_SIZE := 7936k
  BOARDNAME := RE450
  TPLINK_BOARD_ID := RE450
  DEVICE_PROFILE := RE450
  LOADER_TYPE := elf
  TPLINK_HWID := 0x0
  TPLINK_HWREV := 0
  TPLINK_HEADER_VERSION := 1
  KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += re450-v1

define Device/tl-mr6400-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-MR6400 v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem
  BOARDNAME := TL-MR6400
  DEVICE_PROFILE := TLMR6400
  TPLINK_HWID := 0x64000001
endef
TARGET_DEVICES += tl-mr6400-v1

define Device/tl-wdr3500-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WDR3500 v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WDR3500
  DEVICE_PROFILE := TLWDR4300
  TPLINK_HWID := 0x35000001
endef
TARGET_DEVICES += tl-wdr3500-v1

define Device/tl-wdr3600-v1
  $(Device/tl-wdr3500-v1)
  DEVICE_TITLE := TP-LINK TL-WDR3600 v1
  BOARDNAME := TL-WDR4300
  TPLINK_HWID := 0x36000001
  IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
endef
TARGET_DEVICES += tl-wdr3600-v1

define Device/tl-wdr4300-v1
  $(Device/tl-wdr3600-v1)
  DEVICE_TITLE := TP-LINK TL-WDR4300 v1
  TPLINK_HWID := 0x43000001
endef
TARGET_DEVICES += tl-wdr4300-v1

define Device/tl-wdr4300-v1-il
  $(Device/tl-wdr3500-v1)
  DEVICE_TITLE := TP-LINK TL-WDR4300 v1 (IL)
  BOARDNAME := TL-WDR4300
  TPLINK_HWID := 0x43008001
endef
TARGET_DEVICES += tl-wdr4300-v1-il

define Device/tl-wdr4310-v1
  $(Device/tl-wdr4300-v1-il)
  DEVICE_TITLE := TP-LINK TL-WDR4310 v1
  TPLINK_HWID := 0x43100001
endef
TARGET_DEVICES += tl-wdr4310-v1

define Device/tl-wdr4900-v2
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WDR4900 v2
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WDR4900-v2
  DEVICE_PROFILE := TLWDR4900V2
  TPLINK_HWID := 0x49000002
endef
TARGET_DEVICES += tl-wdr4900-v2

define Device/tl-wdr6500-v2
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WDR6500 v2
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
  KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma | tplink-v1-header
  BOARDNAME := TL-WDR6500-v2
  DEVICE_PROFILE := TLWDR6500V2
  TPLINK_HWID := 0x65000002
  TPLINK_HEADER_VERSION := 2
endef
TARGET_DEVICES += tl-wdr6500-v2

define Device/mw4530r-v1
  $(Device/tl-wdr4300-v1)
  DEVICE_TITLE := Mercury MW4530R v1
  TPLINK_HWID := 0x45300001
endef
TARGET_DEVICES += mw4530r-v1

define Device/tl-wpa8630-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WPA8630 v1
  DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
  BOARDNAME := TL-WPA8630
  DEVICE_PROFILE := TL-WPA8630
  TPLINK_HWID := 0x86300001
endef
TARGET_DEVICES += tl-wpa8630-v1

define Device/tl-wr1043n-v5
  $(Device/archer-cxx)
  DEVICE_TITLE := TP-LINK TL-WR1043N v5
  BOARDNAME := TL-WR1043N-v5
  SUPPORTED_DEVICES := tl-wr1043n-v5
  DEVICE_PROFILE := TLWR1043
  MTDPARTS := spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,15104k(firmware),128k(product-info)ro,640k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(art)ro
  IMAGE_SIZE := 15104k
  TPLINK_BOARD_ID := TLWR1043NV5
endef
TARGET_DEVICES += tl-wr1043n-v5

define Device/tl-wr1043nd-v1
  $(Device/tplink-8m)
  DEVICE_TITLE := TP-LINK TL-WR1043N/ND v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR1043ND
  DEVICE_PROFILE := TLWR1043
  TPLINK_HWID := 0x10430001
endef
TARGET_DEVICES += tl-wr1043nd-v1

define Device/tl-wr1043nd-v2
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WR1043N/ND v2
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR1043ND-v2
  DEVICE_PROFILE := TLWR1043
  TPLINK_HWID := 0x10430002
endef
TARGET_DEVICES += tl-wr1043nd-v2

define Device/tl-wr1043nd-v3
  $(Device/tl-wr1043nd-v2)
  DEVICE_TITLE := TP-LINK TL-WR1043N/ND v3
  TPLINK_HWID := 0x10430003
endef
TARGET_DEVICES += tl-wr1043nd-v3

define Device/tl-wr1043nd-v4
  $(Device/tplink)
  DEVICE_TITLE := TP-LINK TL-WR1043N/ND v4
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR1043ND-v4
  DEVICE_PROFILE := TLWR1043
  TPLINK_HWID :=  0x10430004
  MTDPARTS := spi0.0:128k(u-boot)ro,1536k(kernel),14016k(rootfs),128k(product-info)ro,320k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(ART)ro,15552k@0x20000(firmware)
  IMAGE_SIZE := 15552k
  TPLINK_BOARD_ID := TLWR1043NDV4
  KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
TARGET_DEVICES += tl-wr1043nd-v4

define Device/tl-wr2543-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WR2543N/ND v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR2543N
  DEVICE_PROFILE := TLWR2543
  TPLINK_HWID := 0x25430001
  IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99
  IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99
endef
TARGET_DEVICES += tl-wr2543-v1

define Device/tl-wr710n-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WR710N v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  BOARDNAME := TL-WR710N
  DEVICE_PROFILE := TLWR710
  TPLINK_HWID := 0x07100001
  CONSOLE := ttyATH0,115200
  IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
endef
TARGET_DEVICES += tl-wr710n-v1

define Device/tl-wr710n-v2.1
  $(Device/tl-wr710n-v1)
  DEVICE_TITLE := TP-LINK TL-WR710N v2.1
  TPLINK_HWID := 0x07100002
  TPLINK_HWREV := 0x00000002
endef
TARGET_DEVICES += tl-wr710n-v2.1

define Device/tl-wr810n-v1
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WR810N v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
  BOARDNAME := TL-WR810N
  DEVICE_PROFILE := TLWR810
  TPLINK_HWID := 0x08100001
endef
TARGET_DEVICES += tl-wr810n-v1

define Device/tl-wr810n-v2
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WR810N v2
  BOARDNAME := TL-WR810N-v2
  DEVICE_PROFILE := TLWR810
  TPLINK_HWID := 0x08100002
endef
TARGET_DEVICES += tl-wr810n-v2

define Device/tl-wr842n-v1
  $(Device/tplink-8m)
  DEVICE_TITLE := TP-LINK TL-WR842N/ND v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-MR3420
  DEVICE_PROFILE := TLWR842
  TPLINK_HWID := 0x08420001
endef
TARGET_DEVICES += tl-wr842n-v1

define Device/tl-wr842n-v2
  $(Device/tplink-8mlzma)
  DEVICE_TITLE := TP-LINK TL-WR842N/ND v2
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR842N-v2
  DEVICE_PROFILE := TLWR842
  TPLINK_HWID := 0x8420002
endef
TARGET_DEVICES += tl-wr842n-v2

define Device/tl-wr842n-v3
  $(Device/tplink-16mlzma)
  DEVICE_TITLE := TP-LINK TL-WR842N/ND v3
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR842N-v3
  DEVICE_PROFILE := TLWR842
  TPLINK_HWID := 0x08420003
endef
TARGET_DEVICES += tl-wr842n-v3

define Device/tl-wr902ac-v1
  DEVICE_TITLE := TP-LINK TL-WR902AC v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport \
	kmod-ath10k ath10k-firmware-qca9887 -swconfig -uboot-envtools
  BOARDNAME := TL-WR902AC-V1
  DEVICE_PROFILE := TLWR902
  TPLINK_BOARD_ID := TL-WR902AC-V1
  TPLINK_HWID := 0x0
  TPLINK_HWREV := 0
  TPLINK_HEADER_VERSION := 1
  SUPPORTED_DEVICES := tl-wr902ac-v1
  IMAGE_SIZE := 7360k
  KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
  IMAGES += factory.bin
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
	append-metadata | check-size $$$$(IMAGE_SIZE)
  MTDPARTS := spi0.0:128k(u-boot)ro,7360k(firmware),640k(tplink)ro,64k(art)ro
endef
TARGET_DEVICES += tl-wr902ac-v1

define Device/tl-wr942n-v1
  DEVICE_TITLE := TP-LINK TL-WR942N v1
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
  BOARDNAME := TL-WR942N-V1
  TPLINK_BOARD_ID := TLWR942NV1
  DEVICE_PROFILE := TLWR942
  IMAGE_SIZE := 14464k
  KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
	append-metadata | check-size $$$$(IMAGE_SIZE)
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
  MTDPARTS := spi0.0:128k(u-boot)ro,14464k(firmware),64k(product-info)ro,64k(partition-table)ro,256k(oem-config)ro,1344k(oem-vars)ro,64k(ART)ro
  SUPPORTED_DEVICES := tl-wr942n-v1
endef
TARGET_DEVICES += tl-wr942n-v1