9154cc51bf62873251aeed72bc6aa443f44cc00b
[openwrt/openwrt.git] / target / linux / ar71xx / image / tp-link.mk
1 DEVICE_VARS += LOADER_FLASH_OFFS TPLINK_BOARD_ID TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_HWID TPLINK_HWREV
2
3 define Build/copy-file
4 cat "$(1)" > "$@"
5 endef
6
7 define Build/loader-okli
8 dd if=$(KDIR)/loader-$(1).gz bs=7680 conv=sync of="$@.new"
9 cat "$@" >> "$@.new"
10 mv "$@.new" "$@"
11 endef
12
13 define Build/loader-okli-compile
14 $(call Build/loader-common,FLASH_OFFS=$(LOADER_FLASH_OFFS) FLASH_MAX=0 KERNEL_CMDLINE="$(CMDLINE)")
15 endef
16
17 # combine kernel and rootfs into one image
18 # mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
19 # <type> is "sysupgrade" or "factory"
20 #
21 # -a align the rootfs start on an <align> bytes boundary
22 # -j add jffs2 end-of-filesystem markers
23 # -s strip padding from end of the image
24 # -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
25 define Build/mktplinkfw
26 -$(STAGING_DIR_HOST)/bin/mktplinkfw \
27 -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \
28 -m $(TPLINK_HEADER_VERSION) \
29 -k $(IMAGE_KERNEL) \
30 -r $@ \
31 -o $@.new \
32 -j -X 0x40000 \
33 -a $(call rootfs_align,$(FILESYSTEM)) \
34 $(wordlist 2,$(words $(1)),$(1)) \
35 $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
36 endef
37
38 # add RE450 and similar header to the kernel image
39 define Build/mktplinkfw-kernel
40 $(STAGING_DIR_HOST)/bin/mktplinkfw-kernel \
41 -H $(TPLINK_HWID) -N OpenWrt -V $(REVISION) \
42 -L $(KERNEL_LOADADDR) -E $(KERNEL_LOADADDR) \
43 -k $@ \
44 -o $@.new
45 @mv $@.new $@
46 endef
47
48 define Build/uImageArcher
49 mkimage -A $(LINUX_KARCH) \
50 -O linux -T kernel \
51 -C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
52 -n '$(call toupper,$(LINUX_KARCH)) LEDE Linux-$(LINUX_VERSION)' -d $@ $@.new
53 @mv $@.new $@
54 endef
55
56
57 define Device/tplink
58 TPLINK_HWREV := 0x1
59 TPLINK_HEADER_VERSION := 1
60 LOADER_TYPE := gz
61 KERNEL := kernel-bin | patch-cmdline | lzma
62 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | tplink-v1-header
63 IMAGES := sysupgrade.bin factory.bin
64 IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
65 IMAGE/factory.bin := append-rootfs | mktplinkfw factory
66 endef
67
68 define Device/tplink-nolzma
69 $(Device/tplink)
70 LOADER_FLASH_OFFS := 0x22000
71 COMPILE := loader-$(1).gz
72 COMPILE/loader-$(1).gz := loader-okli-compile
73 KERNEL := copy-file $(KDIR)/vmlinux.bin.lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
74 KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | tplink-v1-header
75 endef
76
77 define Device/tplink-4m
78 $(Device/tplink-nolzma)
79 TPLINK_FLASHLAYOUT := 4M
80 IMAGE_SIZE := 3904k
81 endef
82
83 define Device/tplink-8m
84 $(Device/tplink-nolzma)
85 TPLINK_FLASHLAYOUT := 8M
86 IMAGE_SIZE := 7936k
87 endef
88
89 define Device/tplink-4mlzma
90 $(Device/tplink)
91 TPLINK_FLASHLAYOUT := 4Mlzma
92 IMAGE_SIZE := 3904k
93 endef
94
95 define Device/tplink-8mlzma
96 $(Device/tplink)
97 TPLINK_FLASHLAYOUT := 8Mlzma
98 IMAGE_SIZE := 7936k
99 endef
100
101 define Device/tplink-16mlzma
102 $(Device/tplink)
103 TPLINK_FLASHLAYOUT := 16Mlzma
104 IMAGE_SIZE := 15872k
105 endef
106
107 define Device/archer-cxx
108 KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
109 IMAGES := sysupgrade.bin factory.bin
110 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
111 append-metadata | check-size $$$$(IMAGE_SIZE)
112 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
113 endef
114
115 define Device/archer-c25-v1
116 $(Device/archer-cxx)
117 DEVICE_TITLE := TP-LINK Archer C25 v1
118 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca9887
119 BOARDNAME := ARCHER-C25-V1
120 TPLINK_BOARD_ID := ARCHER-C25-V1
121 DEVICE_PROFILE := ARCHERC25V1
122 IMAGE_SIZE := 7808k
123 LOADER_TYPE := elf
124 MTDPARTS := spi0.0:128k(factory-uboot)ro,64k(u-boot)ro,1536k(kernel),6272k(rootfs),128k(config)ro,64k(art)ro,7808k@0x30000(firmware)
125 SUPPORTED_DEVICES := archer-c25-v1
126 endef
127
128 define Device/archer-c58-v1
129 $(Device/archer-cxx)
130 DEVICE_TITLE := TP-LINK Archer C58 v1
131 DEVICE_PACKAGES := kmod-ath10k
132 BOARDNAME := ARCHER-C58-V1
133 TPLINK_BOARD_ID := ARCHER-C58-V1
134 DEVICE_PROFILE := ARCHERC58V1
135 IMAGE_SIZE := 7936k
136 MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,1344k(kernel),6592k(rootfs),64k(tplink)ro,64k(art)ro,7936k@0x20000(firmware)
137 SUPPORTED_DEVICES := archer-c58-v1
138 endef
139
140 define Device/archer-c59-v1
141 $(Device/archer-cxx)
142 DEVICE_TITLE := TP-LINK Archer C59 v1
143 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
144 BOARDNAME := ARCHER-C59-V1
145 TPLINK_BOARD_ID := ARCHER-C59-V1
146 DEVICE_PROFILE := ARCHERC59V1
147 IMAGE_SIZE := 14528k
148 MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,1536k(kernel),12992k(rootfs),1664k(tplink)ro,64k(art)ro,14528k@0x20000(firmware)
149 SUPPORTED_DEVICES := archer-c59-v1
150 endef
151
152 define Device/archer-c60-v1
153 $(Device/archer-cxx)
154 DEVICE_TITLE := TP-LINK Archer C60 v1
155 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
156 BOARDNAME := ARCHER-C60-V1
157 TPLINK_BOARD_ID := ARCHER-C60-V1
158 DEVICE_PROFILE := ARCHERC60V1
159 IMAGE_SIZE := 7936k
160 MTDPARTS := spi0.0:64k(u-boot)ro,64k(mac)ro,1344k(kernel),6592k(rootfs),64k(tplink)ro,64k(art)ro,7936k@0x20000(firmware)
161 SUPPORTED_DEVICES := archer-c60-v1
162 endef
163 TARGET_DEVICES += archer-c25-v1 archer-c58-v1 archer-c59-v1 archer-c60-v1
164
165 define Device/archer-c5-v1
166 $(Device/tplink-16mlzma)
167 DEVICE_TITLE := TP-LINK Archer C5 v1
168 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
169 BOARDNAME := ARCHER-C5
170 DEVICE_PROFILE := ARCHERC7
171 TPLINK_HWID := 0xc5000001
172 endef
173
174 define Device/archer-c7-v1
175 $(Device/tplink-8mlzma)
176 DEVICE_TITLE := TP-LINK Archer C7 v1
177 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
178 BOARDNAME := ARCHER-C7
179 DEVICE_PROFILE := ARCHERC7
180 TPLINK_HWID := 0x75000001
181 endef
182
183 define Device/archer-c7-v2
184 $(Device/tplink-16mlzma)
185 DEVICE_TITLE := TP-LINK Archer C7 v2
186 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
187 BOARDNAME := ARCHER-C7-V2
188 DEVICE_PROFILE := ARCHERC7
189 TPLINK_HWID := 0xc7000002
190 IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin
191 IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
192 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
193 endef
194
195 define Device/archer-c7-v2-il
196 $(Device/tplink-16mlzma)
197 DEVICE_TITLE := TP-LINK Archer C7 v2 (IL)
198 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
199 BOARDNAME := ARCHER-C7-V2
200 DEVICE_PROFILE := ARCHERC7
201 TPLINK_HWID := 0xc7000002
202 TPLINK_HWREV := 0x494c0001
203 endef
204
205 define Device/tl-wdr7500-v3
206 $(Device/tplink-8mlzma)
207 DEVICE_TITLE := TP-LINK Archer C7 v3
208 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
209 BOARDNAME := ARCHER-C7
210 DEVICE_PROFILE := ARCHERC7
211 TPLINK_HWID := 0x75000003
212 endef
213 TARGET_DEVICES += archer-c5-v1 archer-c7-v1 archer-c7-v2 archer-c7-v2-il tl-wdr7500-v3
214
215 define Device/cpe510-520-v1
216 DEVICE_TITLE := TP-LINK CPE510/520 v1
217 DEVICE_PACKAGES := rssileds
218 MTDPARTS := spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),6144k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x40000(firmware)
219 IMAGE_SIZE := 7680k
220 BOARDNAME := CPE510
221 TPLINK_BOARD_ID := CPE510
222 DEVICE_PROFILE := CPE510
223 LOADER_TYPE := elf
224 KERNEL := kernel-bin | patch-cmdline | lzma | loader-kernel
225 IMAGES := sysupgrade.bin factory.bin
226 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
227 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
228 endef
229
230 define Device/cpe210-220-v1
231 $(Device/cpe510-520-v1)
232 DEVICE_TITLE := TP-LINK CPE210/220 v1
233 BOARDNAME := CPE210
234 TPLINK_BOARD_ID := CPE210
235 endef
236
237 define Device/wbs210-v1
238 $(Device/cpe510-520-v1)
239 DEVICE_TITLE := TP-LINK WBS210 v1
240 BOARDNAME := WBS210
241 TPLINK_BOARD_ID := WBS210
242 endef
243
244 define Device/wbs510-v1
245 $(Device/cpe510-520-v1)
246 DEVICE_TITLE := TP-LINK WBS510 v1
247 BOARDNAME := WBS510
248 TPLINK_BOARD_ID := WBS510
249 endef
250 TARGET_DEVICES += cpe210-220-v1 cpe510-520-v1 wbs210-v1 wbs510-v1
251
252 define Device/eap120-v1
253 DEVICE_TITLE := TP-LINK EAP120 v1
254 MTDPARTS := spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),14336k(rootfs),192k(config)ro,64k(ART)ro,15872k@0x40000(firmware)
255 IMAGE_SIZE := 15872k
256 BOARDNAME := EAP120
257 TPLINK_BOARD_ID := EAP120
258 DEVICE_PROFILE := EAP120
259 LOADER_TYPE := elf
260 KERNEL := kernel-bin | patch-cmdline | lzma | loader-kernel
261 IMAGES := sysupgrade.bin factory.bin
262 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
263 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
264 endef
265 TARGET_DEVICES += eap120-v1
266
267 define Device/re450-v1
268 DEVICE_TITLE := TP-LINK RE450 v1
269 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
270 MTDPARTS := spi0.0:128k(u-boot)ro,1344k(kernel),4672k(rootfs),64k(pation-table)ro,64k(product-info)ro,1856k(config)ro,64k(art)ro,6016k@0x20000(firmware)
271 IMAGE_SIZE := 7936k
272 BOARDNAME := RE450
273 TPLINK_BOARD_ID := RE450
274 DEVICE_PROFILE := RE450
275 LOADER_TYPE := elf
276 TPLINK_HWID := 0x0
277 KERNEL := kernel-bin | patch-cmdline | lzma | mktplinkfw-kernel
278 IMAGES := sysupgrade.bin factory.bin
279 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
280 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
281 endef
282 TARGET_DEVICES += re450-v1
283
284 define Device/tl-mr10u-v1
285 $(Device/tplink-4mlzma)
286 DEVICE_TITLE := TP-LINK TL-MR10U v1
287 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
288 BOARDNAME := TL-MR10U
289 DEVICE_PROFILE := TLMR10U
290 TPLINK_HWID := 0x00100101
291 CONSOLE := ttyATH0,115200
292 endef
293
294 define Device/tl-mr11u-v1
295 $(Device/tplink-4mlzma)
296 DEVICE_TITLE := TP-LINK TL-MR11U v1
297 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
298 BOARDNAME := TL-MR11U
299 DEVICE_PROFILE := TLMR11U
300 TPLINK_HWID := 0x00110101
301 CONSOLE := ttyATH0,115200
302 endef
303
304 define Device/tl-mr11u-v2
305 $(Device/tl-mr11u-v1)
306 DEVICE_TITLE := TP-LINK TL-MR11U v2
307 TPLINK_HWID := 0x00110102
308 endef
309
310 define Device/tl-mr12u-v1
311 $(Device/tplink-4mlzma)
312 DEVICE_TITLE := TP-LINK TL-MR12U v1
313 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
314 BOARDNAME := TL-MR13U
315 DEVICE_PROFILE := TLMR12U
316 TPLINK_HWID := 0x00120101
317 CONSOLE := ttyATH0,115200
318 endef
319
320 define Device/tl-mr13u-v1
321 $(Device/tl-mr12u-v1)
322 DEVICE_TITLE := TP-LINK TL-MR13U v1
323 DEVICE_PROFILE := TLMR13U
324 TPLINK_HWID := 0x00130101
325 endef
326 TARGET_DEVICES += tl-mr10u-v1 tl-mr11u-v1 tl-mr11u-v2 tl-mr12u-v1 tl-mr13u-v1
327
328 define Device/tl-mr3020-v1
329 $(Device/tplink-4mlzma)
330 DEVICE_TITLE := TP-LINK TL-MR3020 v1
331 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
332 BOARDNAME := TL-MR3020
333 DEVICE_PROFILE := TLMR3020
334 TPLINK_HWID := 0x30200001
335 CONSOLE := ttyATH0,115200
336 endef
337
338 define Device/tl-mr3040-v1
339 $(Device/tl-mr3020-v1)
340 DEVICE_TITLE := TP-LINK TL-MR3040 v1
341 BOARDNAME := TL-MR3040
342 DEVICE_PROFILE := TLMR3040
343 TPLINK_HWID := 0x30400001
344 endef
345
346 define Device/tl-mr3040-v2
347 $(Device/tl-mr3040-v1)
348 DEVICE_TITLE := TP-LINK TL-MR3040 v2
349 BOARDNAME := TL-MR3040-v2
350 TPLINK_HWID := 0x30400002
351 endef
352
353 define Device/tl-mr3220-v1
354 $(Device/tplink-4m)
355 DEVICE_TITLE := TP-LINK TL-MR3220 v1
356 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
357 BOARDNAME := TL-MR3220
358 DEVICE_PROFILE := TLMR3220
359 TPLINK_HWID := 0x32200001
360 endef
361
362 define Device/tl-mr3220-v2
363 $(Device/tplink-4mlzma)
364 DEVICE_TITLE := TP-LINK TL-MR3220 v2
365 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
366 BOARDNAME := TL-MR3220-v2
367 DEVICE_PROFILE := TLMR3220
368 TPLINK_HWID := 0x32200002
369 CONSOLE := ttyATH0,115200
370 endef
371
372 define Device/tl-mr3420-v1
373 $(Device/tplink-4m)
374 DEVICE_TITLE := TP-LINK TL-MR3420 v1
375 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
376 BOARDNAME := TL-MR3420
377 DEVICE_PROFILE := TLMR3420
378 TPLINK_HWID := 0x34200001
379 endef
380
381 define Device/tl-mr3420-v2
382 $(Device/tplink-4mlzma)
383 DEVICE_TITLE := TP-LINK TL-MR3420 v2
384 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
385 BOARDNAME := TL-MR3420-v2
386 DEVICE_PROFILE := TLMR3420
387 TPLINK_HWID := 0x34200002
388 endef
389 TARGET_DEVICES += tl-mr3020-v1 tl-mr3040-v1 tl-mr3040-v2 tl-mr3220-v1 tl-mr3220-v2 tl-mr3420-v1 tl-mr3420-v2
390
391 define Device/tl-mr6400-v1
392 $(Device/tplink-8mlzma)
393 DEVICE_TITLE := TP-LINK TL-MR6400 v1
394 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-net kmod-usb-net-rndis kmod-usb-serial kmod-usb-serial-option adb-enablemodem
395 BOARDNAME := TL-MR6400
396 DEVICE_PROFILE := TLMR6400
397 TPLINK_HWID := 0x64000001
398 endef
399 TARGET_DEVICES += tl-mr6400-v1
400
401 define Device/tl-wa701nd-v1
402 $(Device/tplink-4m)
403 DEVICE_TITLE := TP-LINK TL-WA701N/ND v1
404 BOARDNAME := TL-WA901ND
405 DEVICE_PROFILE := TLWA701
406 TPLINK_HWID := 0x07010001
407 endef
408
409 define Device/tl-wa701nd-v2
410 $(Device/tplink-4mlzma)
411 DEVICE_TITLE := TP-LINK TL-WA701N/ND v2
412 BOARDNAME := TL-WA701ND-v2
413 DEVICE_PROFILE := TLWA701
414 TPLINK_HWID := 0x07010002
415 CONSOLE := ttyATH0,115200
416 endef
417
418 define Device/tl-wa7210n-v2
419 $(Device/tplink-4mlzma)
420 DEVICE_TITLE := TP-LINK TL-WA7210N v2
421 DEVICE_PACKAGES := rssileds kmod-ledtrig-netdev
422 BOARDNAME := TL-WA7210N-v2
423 DEVICE_PROFILE := TLWA7210
424 TPLINK_HWID := 0x72100002
425 CONSOLE := ttyATH0,115200
426 endef
427
428 define Device/tl-wa730re-v1
429 $(Device/tplink-4m)
430 DEVICE_TITLE := TP-LINK TL-WA730RE v1
431 BOARDNAME := TL-WA901ND
432 DEVICE_PROFILE := TLWA730RE
433 TPLINK_HWID := 0x07300001
434 endef
435
436 define Device/tl-wa750re-v1
437 $(Device/tplink-4mlzma)
438 DEVICE_TITLE := TP-LINK TL-WA750RE v1
439 DEVICE_PACKAGES := rssileds
440 BOARDNAME := TL-WA750RE
441 DEVICE_PROFILE := TLWA750
442 TPLINK_HWID := 0x07500001
443 endef
444
445 define Device/tl-wa7510n-v1
446 $(Device/tplink-4m)
447 DEVICE_TITLE := TP-LINK TL-WA7510N v1
448 BOARDNAME := TL-WA7510N
449 DEVICE_PROFILE := TLWA7510
450 TPLINK_HWID := 0x75100001
451 endef
452 TARGET_DEVICES += tl-wa701nd-v1 tl-wa701nd-v2 tl-wa7210n-v2 tl-wa730re-v1 tl-wa750re-v1 tl-wa7510n-v1
453
454 define Device/tl-wa801nd-v1
455 $(Device/tplink-4m)
456 DEVICE_TITLE := TP-LINK TL-WA801N/ND v1
457 BOARDNAME := TL-WA901ND
458 DEVICE_PROFILE := TLWA801
459 TPLINK_HWID := 0x08010001
460 endef
461
462 define Device/tl-wa801nd-v2
463 $(Device/tplink-4mlzma)
464 DEVICE_TITLE := TP-LINK TL-WA801N/ND v2
465 BOARDNAME := TL-WA801ND-v2
466 DEVICE_PROFILE := TLWA801
467 TPLINK_HWID := 0x08010002
468 endef
469
470 define Device/tl-wa801nd-v3
471 $(Device/tplink-4mlzma)
472 DEVICE_TITLE := TP-LINK TL-WA801N/ND v3
473 BOARDNAME := TL-WA801ND-v3
474 DEVICE_PROFILE := TLWA801
475 TPLINK_HWID := 0x08010003
476 endef
477
478 define Device/tl-wa830re-v1
479 $(Device/tplink-4m)
480 DEVICE_TITLE := TP-LINK TL-WA830RE v1
481 BOARDNAME := TL-WA901ND
482 DEVICE_PROFILE := TLWA830
483 TPLINK_HWID := 0x08300010
484 endef
485
486 define Device/tl-wa830re-v2
487 $(Device/tplink-4mlzma)
488 DEVICE_TITLE := TP-LINK TL-WA830RE v2
489 BOARDNAME := TL-WA830RE-v2
490 DEVICE_PROFILE := TLWA830
491 TPLINK_HWID := 0x08300002
492 endef
493
494 define Device/tl-wa850re-v1
495 $(Device/tplink-4mlzma)
496 DEVICE_TITLE := TP-LINK TL-WA850RE v1
497 BOARDNAME := TL-WA850RE
498 DEVICE_PROFILE := TLWA850
499 TPLINK_HWID := 0x08500001
500 endef
501
502 define Device/tl-wa85xre
503 $(Device/tplink)
504 KERNEL := kernel-bin | patch-cmdline | lzma | mktplinkfw-kernel
505 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
506 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
507 MTDPARTS := spi0.0:128k(u-boot)ro,1344k(kernel),2304k(rootfs),256k(config)ro,64k(art)ro,3648k@0x20000(firmware)
508 endef
509
510 define Device/tl-wa850re-v2
511 $(Device/tl-wa85xre)
512 DEVICE_TITLE := TP-LINK TL-WA850RE v2
513 DEVICE_PACKAGES := rssileds
514 BOARDNAME := TL-WA850RE-V2
515 DEVICE_PROFILE := TLWA850
516 TPLINK_BOARD_ID := TLWA850REV2
517 TPLINK_HWID := 0x08500002
518 endef
519
520 define Device/tl-wa855re-v1
521 $(Device/tl-wa85xre)
522 DEVICE_TITLE := TP-LINK TL-WA855RE v1
523 BOARDNAME := TL-WA855RE-v1
524 DEVICE_PROFILE := TLWA855RE
525 TPLINK_HWID := 0x08550001
526 TPLINK_BOARD_ID := TLWA855REV1
527 endef
528
529 define Device/tl-wa860re-v1
530 $(Device/tplink-4mlzma)
531 DEVICE_TITLE := TP-LINK TL-WA860RE v1
532 BOARDNAME := TL-WA860RE
533 DEVICE_PROFILE := TLWA860
534 TPLINK_HWID := 0x08600001
535 endef
536 TARGET_DEVICES += tl-wa801nd-v1 tl-wa801nd-v2 tl-wa801nd-v3 tl-wa830re-v1 tl-wa830re-v2 tl-wa850re-v1 tl-wa850re-v2 tl-wa855re-v1 tl-wa860re-v1
537
538 define Device/tl-wa901nd-v1
539 $(Device/tplink-4m)
540 DEVICE_TITLE := TP-LINK TL-WA901N/ND v1
541 BOARDNAME := TL-WA901ND
542 DEVICE_PROFILE := TLWA901
543 TPLINK_HWID := 0x09010001
544 endef
545
546 define Device/tl-wa901nd-v2
547 $(Device/tplink-4m)
548 DEVICE_TITLE := TP-LINK TL-WA901N/ND v2
549 BOARDNAME := TL-WA901ND-v2
550 DEVICE_PROFILE := TLWA901
551 TPLINK_HWID := 0x09010002
552 endef
553
554 define Device/tl-wa901nd-v3
555 $(Device/tplink-4mlzma)
556 DEVICE_TITLE := TP-LINK TL-WA901N/ND v3
557 BOARDNAME := TL-WA901ND-v3
558 DEVICE_PROFILE := TLWA901
559 TPLINK_HWID := 0x09010003
560 endef
561
562 define Device/tl-wa901nd-v4
563 $(Device/tplink-4mlzma)
564 DEVICE_TITLE := TP-LINK TL-WA901N/ND v4
565 BOARDNAME := TL-WA901ND-v4
566 DEVICE_PROFILE := TLWA901
567 TPLINK_HWID := 0x09010004
568 IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C EU
569 endef
570 TARGET_DEVICES += tl-wa901nd-v1 tl-wa901nd-v2 tl-wa901nd-v3 tl-wa901nd-v4
571
572 define Device/tl-wdr3320-v2
573 $(Device/tplink-4mlzma)
574 DEVICE_TITLE := TP-LINK TL-WDR3320 v2
575 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
576 BOARDNAME := TL-WDR3320-v2
577 DEVICE_PROFILE := TLWDR3320V2
578 TPLINK_HWID := 0x33200002
579 TPLINK_HEADER_VERSION := 2
580 endef
581
582 define Device/tl-wdr3500-v1
583 $(Device/tplink-8mlzma)
584 DEVICE_TITLE := TP-LINK TL-WDR3500 v1
585 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
586 BOARDNAME := TL-WDR3500
587 DEVICE_PROFILE := TLWDR4300
588 TPLINK_HWID := 0x35000001
589 endef
590
591 define Device/tl-wdr3600-v1
592 $(Device/tl-wdr3500-v1)
593 DEVICE_TITLE := TP-LINK TL-WDR3600 v1
594 BOARDNAME := TL-WDR4300
595 TPLINK_HWID := 0x36000001
596 IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
597 endef
598
599 define Device/tl-wdr4300-v1
600 $(Device/tl-wdr3600-v1)
601 DEVICE_TITLE := TP-LINK TL-WDR4300 v1
602 TPLINK_HWID := 0x43000001
603 endef
604
605 define Device/tl-wdr4300-v1-il
606 $(Device/tl-wdr3500-v1)
607 DEVICE_TITLE := TP-LINK TL-WDR4300 v1 (IL)
608 BOARDNAME := TL-WDR4300
609 TPLINK_HWID := 0x43008001
610 endef
611
612 define Device/tl-wdr4310-v1
613 $(Device/tl-wdr4300-v1-il)
614 DEVICE_TITLE := TP-LINK TL-WDR4310 v1
615 TPLINK_HWID := 0x43100001
616 endef
617
618 define Device/tl-wdr4900-v2
619 $(Device/tplink-8mlzma)
620 DEVICE_TITLE := TP-LINK TL-WDR4900 v2
621 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
622 BOARDNAME := TL-WDR4900-v2
623 DEVICE_PROFILE := TLWDR4900V2
624 TPLINK_HWID := 0x49000002
625 endef
626
627 define Device/tl-wdr6500-v2
628 $(Device/tplink-8mlzma)
629 DEVICE_TITLE := TP-LINK TL-WDR6500 v2
630 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
631 KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
632 KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma | tplink-v1-header
633 BOARDNAME := TL-WDR6500-v2
634 DEVICE_PROFILE := TLWDR6500V2
635 TPLINK_HWID := 0x65000002
636 TPLINK_HEADER_VERSION := 2
637 endef
638
639 define Device/mw4530r-v1
640 $(Device/tl-wdr4300-v1)
641 DEVICE_TITLE := Mercury MW4530R v1
642 TPLINK_HWID := 0x45300001
643 endef
644 TARGET_DEVICES += tl-wdr3320-v2 tl-wdr3500-v1 tl-wdr3600-v1 tl-wdr4300-v1 tl-wdr4300-v1-il tl-wdr4310-v1 tl-wdr4900-v2 tl-wdr6500-v2 mw4530r-v1
645
646 define Device/tl-wpa8630-v1
647 $(Device/tplink-8mlzma)
648 DEVICE_TITLE := TP-LINK TL-WPA8630 v1
649 DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
650 BOARDNAME := TL-WPA8630
651 DEVICE_PROFILE := TL-WPA8630
652 TPLINK_HWID := 0x86300001
653 endef
654 TARGET_DEVICES += tl-wpa8630-v1
655
656 define Device/tl-wr1041n-v2
657 $(Device/tplink-4mlzma)
658 DEVICE_TITLE := TP-LINK TL-WR1041N v2
659 BOARDNAME := TL-WR1041N-v2
660 DEVICE_PROFILE := TLWR1041
661 TPLINK_HWID := 0x10410002
662 endef
663 TARGET_DEVICES += tl-wr1041n-v2
664
665 define Device/tl-wr1043nd-v1
666 $(Device/tplink-8m)
667 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v1
668 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
669 BOARDNAME := TL-WR1043ND
670 DEVICE_PROFILE := TLWR1043
671 TPLINK_HWID := 0x10430001
672 endef
673
674 define Device/tl-wr1043nd-v2
675 $(Device/tplink-8mlzma)
676 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v2
677 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
678 BOARDNAME := TL-WR1043ND-v2
679 DEVICE_PROFILE := TLWR1043
680 TPLINK_HWID := 0x10430002
681 endef
682
683 define Device/tl-wr1043nd-v3
684 $(Device/tl-wr1043nd-v2)
685 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v3
686 TPLINK_HWID := 0x10430003
687 endef
688
689 define Device/tl-wr1043nd-v4
690 $(Device/tplink)
691 DEVICE_TITLE := TP-LINK TL-WR1043N/ND v4
692 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
693 BOARDNAME := TL-WR1043ND-v4
694 DEVICE_PROFILE := TLWR1043
695 TPLINK_HWID := 0x10430004
696 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)
697 IMAGE_SIZE := 15552k
698 TPLINK_BOARD_ID := TLWR1043NDV4
699 KERNEL := kernel-bin | patch-cmdline | lzma | tplink-v1-header
700 IMAGES := sysupgrade.bin factory.bin
701 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
702 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
703 endef
704
705 define Device/tl-wr2543-v1
706 $(Device/tplink-8mlzma)
707 DEVICE_TITLE := TP-LINK TL-WR2543N/ND v1
708 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
709 BOARDNAME := TL-WR2543N
710 DEVICE_PROFILE := TLWR2543
711 TPLINK_HWID := 0x25430001
712 IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99
713 IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99
714 endef
715 TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 tl-wr1043nd-v4 tl-wr2543-v1
716
717 define Device/tl-wr703n-v1
718 $(Device/tplink-4mlzma)
719 DEVICE_TITLE := TP-LINK TL-WR703N v1
720 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
721 BOARDNAME := TL-WR703N
722 DEVICE_PROFILE := TLWR703
723 TPLINK_HWID := 0x07030101
724 CONSOLE := ttyATH0,115200
725 endef
726
727 define Device/tl-wr710n-v1
728 $(Device/tplink-8mlzma)
729 DEVICE_TITLE := TP-LINK TL-WR710N v1
730 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
731 BOARDNAME := TL-WR710N
732 DEVICE_PROFILE := TLWR710
733 TPLINK_HWID := 0x07100001
734 CONSOLE := ttyATH0,115200
735 IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
736 endef
737
738 define Device/tl-wr710n-v2
739 $(Device/tplink-4mlzma)
740 DEVICE_TITLE := TP-LINK TL-WR710N v2
741 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
742 BOARDNAME := TL-WR710N
743 DEVICE_PROFILE := TLWR710
744 TPLINK_HWID := 0x07100002
745 CONSOLE := ttyATH0,115200
746 endef
747
748 define Device/tl-wr710n-v2.1
749 $(Device/tl-wr710n-v1)
750 DEVICE_TITLE := TP-LINK TL-WR710N v2.1
751 TPLINK_HWID := 0x07100002
752 TPLINK_HWREV := 0x00000002
753 endef
754
755 define Device/tl-wr720n-v3
756 $(Device/tplink-4mlzma)
757 DEVICE_TITLE := TP-LINK TL-WR720N v3
758 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
759 BOARDNAME := TL-WR720N-v3
760 DEVICE_PROFILE := TLWR720
761 TPLINK_HWID := 0x07200103
762 CONSOLE := ttyATH0,115200
763 endef
764
765 define Device/tl-wr720n-v4
766 $(Device/tl-wr720n-v3)
767 DEVICE_TITLE := TP-LINK TL-WR720N v4
768 TPLINK_HWID := 0x07200104
769 endef
770 TARGET_DEVICES += tl-wr703n-v1 tl-wr710n-v1 tl-wr710n-v2 tl-wr710n-v2.1 tl-wr720n-v3 tl-wr720n-v4
771
772 define Device/tl-wr740n-v1
773 $(Device/tplink-4m)
774 DEVICE_TITLE := TP-LINK TL-WR740N/ND v1
775 BOARDNAME := TL-WR741ND
776 DEVICE_PROFILE := TLWR740
777 TPLINK_HWID := 0x07400001
778 endef
779
780 define Device/tl-wr740n-v3
781 $(Device/tl-wr740n-v1)
782 DEVICE_TITLE := TP-LINK TL-WR740N/ND v3
783 TPLINK_HWID := 0x07400003
784 endef
785
786 define Device/tl-wr740n-v4
787 $(Device/tplink-4mlzma)
788 DEVICE_TITLE := TP-LINK TL-WR740N/ND v4
789 BOARDNAME := TL-WR741ND-v4
790 DEVICE_PROFILE := TLWR740
791 TPLINK_HWID := 0x07400004
792 CONSOLE := ttyATH0,115200
793 endef
794
795 define Device/tl-wr740n-v5
796 $(Device/tl-wr740n-v4)
797 DEVICE_TITLE := TP-LINK TL-WR740N/ND v5
798 TPLINK_HWID := 0x07400005
799 endef
800
801 define Device/tl-wr740n-v6
802 $(Device/tplink-4mlzma)
803 DEVICE_TITLE := TP-LINK TL-WR740N/ND v6
804 BOARDNAME := TL-WR740N-v6
805 DEVICE_PROFILE := TLWR740
806 TPLINK_HWID := 0x07400006
807 endef
808 TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6
809
810 define Device/tl-wr741nd-v1
811 $(Device/tplink-4m)
812 DEVICE_TITLE := TP-LINK TL-WR741N/ND v1
813 BOARDNAME := TL-WR741ND
814 DEVICE_PROFILE := TLWR741
815 TPLINK_HWID := 0x07410001
816 endef
817
818 define Device/tl-wr741nd-v2
819 $(Device/tl-wr741nd-v1)
820 DEVICE_TITLE := TP-LINK TL-WR741N/ND v2
821 endef
822
823 define Device/tl-wr741nd-v4
824 $(Device/tplink-4mlzma)
825 DEVICE_TITLE := TP-LINK TL-WR741N/ND v4
826 BOARDNAME := TL-WR741ND-v4
827 DEVICE_PROFILE := TLWR741
828 TPLINK_HWID := 0x07410004
829 CONSOLE := ttyATH0,115200
830 endef
831
832 define Device/tl-wr741nd-v5
833 $(Device/tl-wr741nd-v4)
834 DEVICE_TITLE := TP-LINK TL-WR741N/ND v5
835 TPLINK_HWID := 0x07400005
836 endef
837
838 define Device/tl-wr743nd-v1
839 $(Device/tplink-4m)
840 DEVICE_TITLE := TP-LINK TL-WR743N/ND v1
841 BOARDNAME := TL-WR741ND
842 DEVICE_PROFILE := TLWR743
843 TPLINK_HWID := 0x07430001
844 endef
845
846 define Device/tl-wr743nd-v2
847 $(Device/tl-wr741nd-v4)
848 DEVICE_TITLE := TP-LINK TL-WR743N/ND v2
849 DEVICE_PROFILE := TLWR743
850 TPLINK_HWID := 0x07430002
851 endef
852 TARGET_DEVICES += tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2
853
854 define Device/tl-wr802n-v1
855 $(Device/tplink-4mlzma)
856 DEVICE_TITLE := TP-LINK TL-WR802N v1
857 BOARDNAME := TL-WR802N-v1
858 DEVICE_PROFILE := TLWR802
859 TPLINK_HWID := 0x08020001
860 TPLINK_HWREV := 1
861 endef
862
863 define Device/tl-wr802n-v2
864 $(Device/tplink-4mlzma)
865 DEVICE_TITLE := TP-LINK TL-WR802N v2
866 BOARDNAME := TL-WR802N-v2
867 DEVICE_PROFILE := TLWR802
868 TPLINK_HWID := 0x08020002
869 TPLINK_HWREV := 2
870 IMAGES += factory-us.bin factory-eu.bin
871 IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
872 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
873 endef
874
875 define Device/tl-wr810n-v1
876 $(Device/tplink-8mlzma)
877 DEVICE_TITLE := TP-LINK TL-WR810N v1
878 DEVICE_PACKAGES := kmod-usb-core kmod-usb2
879 BOARDNAME := TL-WR810N
880 DEVICE_PROFILE := TLWR810
881 TPLINK_HWID := 0x08100001
882 endef
883
884 define Device/tl-wr840n-v2
885 $(Device/tplink-4mlzma)
886 DEVICE_TITLE := TP-LINK TL-WR840N v2
887 BOARDNAME := TL-WR840N-v2
888 DEVICE_PROFILE := TLWR840
889 TPLINK_HWID := 0x08400002
890 IMAGES += factory-eu.bin
891 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
892 endef
893
894 define Device/tl-wr840n-v3
895 $(Device/tl-wr840n-v2)
896 DEVICE_TITLE := TP-LINK TL-WR840N v3
897 BOARDNAME := TL-WR840N-v3
898 TPLINK_HWID := 0x08400003
899 endef
900 TARGET_DEVICES += tl-wr802n-v1 tl-wr802n-v2 tl-wr810n-v1 tl-wr840n-v2 tl-wr840n-v3
901
902 define Device/tl-wr841-v1.5
903 $(Device/tplink-4m)
904 DEVICE_TITLE := TP-LINK TL-WR841N/ND v1.5
905 BOARDNAME := TL-WR841N-v1.5
906 DEVICE_PROFILE := TLWR841
907 TPLINK_HWID := 0x08410002
908 TPLINK_HWREV := 2
909 endef
910
911 define Device/tl-wr841-v3
912 $(Device/tplink-4m)
913 DEVICE_TITLE := TP-LINK TL-WR841N/ND v3
914 BOARDNAME := TL-WR941ND
915 DEVICE_PROFILE := TLWR841
916 TPLINK_HWID := 0x08410003
917 TPLINK_HWREV := 3
918 endef
919
920 define Device/tl-wr841-v5
921 $(Device/tplink-4m)
922 DEVICE_TITLE := TP-LINK TL-WR841N/ND v5
923 BOARDNAME := TL-WR741ND
924 DEVICE_PROFILE := TLWR841
925 TPLINK_HWID := 0x08410005
926 endef
927
928 define Device/tl-wr841-v7
929 $(Device/tplink-4m)
930 DEVICE_TITLE := TP-LINK TL-WR841N/ND v7
931 BOARDNAME := TL-WR841N-v7
932 DEVICE_PROFILE := TLWR841
933 TPLINK_HWID := 0x08410007
934 endef
935
936 define Device/tl-wr841-v8
937 $(Device/tplink-4mlzma)
938 DEVICE_TITLE := TP-LINK TL-WR841N/ND v8
939 BOARDNAME := TL-WR841N-v8
940 DEVICE_PROFILE := TLWR841
941 TPLINK_HWID := 0x08410008
942 endef
943
944 define Device/tl-wr841-v9
945 $(Device/tplink-4mlzma)
946 DEVICE_TITLE := TP-LINK TL-WR841N/ND v9
947 BOARDNAME := TL-WR841N-v9
948 DEVICE_PROFILE := TLWR841
949 TPLINK_HWID := 0x08410009
950 endef
951
952 define Device/tl-wr841-v10
953 $(Device/tl-wr841-v9)
954 DEVICE_TITLE := TP-LINK TL-WR841N/ND v10
955 TPLINK_HWID := 0x08410010
956 endef
957
958 define Device/tl-wr841-v11
959 $(Device/tplink-4mlzma)
960 DEVICE_TITLE := TP-LINK TL-WR841N/ND v11
961 BOARDNAME := TL-WR841N-v11
962 DEVICE_PROFILE := TLWR841
963 TPLINK_HWID := 0x08410011
964 IMAGES += factory-us.bin factory-eu.bin
965 IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
966 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
967 endef
968
969 define Device/tl-wr841-v12
970 $(Device/tl-wr841-v11)
971 DEVICE_TITLE := TP-LINK TL-WR841N/ND v12
972 TPLINK_HWID := 0x08410012
973 endef
974 TARGET_DEVICES += tl-wr841-v1.5 tl-wr841-v3 tl-wr841-v5 tl-wr841-v7 tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr841-v11 tl-wr841-v12
975
976 define Device/tl-wr842n-v1
977 $(Device/tplink-8m)
978 DEVICE_TITLE := TP-LINK TL-WR842N/ND v1
979 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
980 BOARDNAME := TL-MR3420
981 DEVICE_PROFILE := TLWR842
982 TPLINK_HWID := 0x08420001
983 endef
984
985 define Device/tl-wr842n-v2
986 $(Device/tplink-8mlzma)
987 DEVICE_TITLE := TP-LINK TL-WR842N/ND v2
988 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
989 BOARDNAME := TL-WR842N-v2
990 DEVICE_PROFILE := TLWR842
991 TPLINK_HWID := 0x8420002
992 endef
993
994 define Device/tl-wr842n-v3
995 $(Device/tplink-16mlzma)
996 DEVICE_TITLE := TP-LINK TL-WR842N/ND v3
997 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
998 BOARDNAME := TL-WR842N-v3
999 DEVICE_PROFILE := TLWR842
1000 TPLINK_HWID := 0x08420003
1001 endef
1002
1003 define Device/tl-wr843nd-v1
1004 $(Device/tplink-4mlzma)
1005 DEVICE_TITLE := TP-LINK TL-WR843N/ND v1
1006 BOARDNAME := TL-WR841N-v8
1007 DEVICE_PROFILE := TLWR843
1008 TPLINK_HWID := 0x08430001
1009 endef
1010
1011 define Device/tl-wr847n-v8
1012 $(Device/tplink-4mlzma)
1013 DEVICE_TITLE := TP-LINK TL-WR847N/ND v8
1014 BOARDNAME := TL-WR841N-v8
1015 DEVICE_PROFILE := TLWR841
1016 TPLINK_HWID := 0x08470008
1017 endef
1018 TARGET_DEVICES += tl-wr842n-v1 tl-wr842n-v2 tl-wr842n-v3 tl-wr843nd-v1 tl-wr847n-v8
1019
1020 define Device/tl-wr902ac-v1
1021 DEVICE_TITLE := TP-LINK TL-WR902AC v1
1022 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport \
1023 kmod-ath10k ath10k-firmware-qca9887 -swconfig -uboot-envtools
1024 BOARDNAME := TL-WR902AC-V1
1025 DEVICE_PROFILE := TLWR902
1026 TPLINK_BOARD_ID := TL-WR902AC-V1
1027 TPLINK_HWID := 0x0
1028 SUPPORTED_DEVICES := tl-wr902ac-v1
1029 IMAGE_SIZE := 7360k
1030 KERNEL := kernel-bin | patch-cmdline | lzma | mktplinkfw-kernel
1031 IMAGES += factory.bin
1032 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
1033 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
1034 append-metadata | check-size $$$$(IMAGE_SIZE)
1035 MTDPARTS := spi0.0:128k(u-boot)ro,7360k(firmware),640k(tplink)ro,64k(art)ro
1036 endef
1037 TARGET_DEVICES += tl-wr902ac-v1
1038
1039 define Device/tl-wr940n-v4
1040 $(Device/tplink-4mlzma)
1041 DEVICE_TITLE := TP-LINK TL-WR940N v4
1042 BOARDNAME := TL-WR940N-v4
1043 DEVICE_PROFILE := TLWR941
1044 TPLINK_HWID := 0x09400004
1045 IMAGES += factory-us.bin factory-eu.bin
1046 IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
1047 IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU
1048 endef
1049
1050 define Device/tl-wr941nd-v2
1051 $(Device/tplink-4m)
1052 DEVICE_TITLE := TP-LINK TL-WR941N/ND v2
1053 BOARDNAME := TL-WR941ND
1054 DEVICE_PROFILE := TLWR941
1055 TPLINK_HWID := 0x09410002
1056 TPLINK_HWREV := 2
1057 endef
1058
1059 define Device/tl-wr941nd-v3
1060 $(Device/tl-wr941nd-v2)
1061 DEVICE_TITLE := TP-LINK TL-WR941N/ND v3
1062 endef
1063
1064 define Device/tl-wr941nd-v4
1065 $(Device/tplink-4m)
1066 DEVICE_TITLE := TP-LINK TL-WR941N/ND v4
1067 BOARDNAME := TL-WR741ND
1068 DEVICE_PROFILE := TLWR941
1069 TPLINK_HWID := 0x09410004
1070 endef
1071
1072 define Device/tl-wr941nd-v5
1073 $(Device/tplink-4mlzma)
1074 DEVICE_TITLE := TP-LINK TL-WR941N/ND v5
1075 BOARDNAME := TL-WR941ND-v5
1076 DEVICE_PROFILE := TLWR941
1077 TPLINK_HWID := 0x09410005
1078 endef
1079
1080 define Device/tl-wr941nd-v6
1081 $(Device/tplink-4mlzma)
1082 DEVICE_TITLE := TP-LINK TL-WR941N/ND v6
1083 BOARDNAME := TL-WR941ND-v6
1084 DEVICE_PROFILE := TLWR941
1085 TPLINK_HWID := 0x09410006
1086 endef
1087
1088 # Chinese version (unlike European) is similar to the TL-WDR3500
1089 define Device/tl-wr941nd-v6-cn
1090 $(Device/tplink-4mlzma)
1091 DEVICE_TITLE := TP-LINK TL-WR941N/ND v6 (CN)
1092 BOARDNAME := TL-WDR3500
1093 DEVICE_PROFILE := TLWR941
1094 TPLINK_HWID := 0x09410006
1095 endef
1096
1097 define Device/tl-wr942n-v1
1098 DEVICE_TITLE := TP-LINK TL-WR942N v1
1099 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
1100 BOARDNAME := TL-WR942N-V1
1101 TPLINK_BOARD_ID := TLWR942NV1
1102 DEVICE_PROFILE := TLWR942
1103 IMAGE_SIZE := 14464k
1104 KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
1105 IMAGES := sysupgrade.bin factory.bin
1106 IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
1107 append-metadata | check-size $$$$(IMAGE_SIZE)
1108 IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
1109 MTDPARTS := spi0.0:128k(u-boot)ro,1344k(kernel),13120k(rootfs),64k(product-info)ro,64k(partition-table)ro,256k(oem-config)ro,1344k(oem-vars)ro,64k(ART)ro,14464k@0x20000(firmware)
1110 SUPPORTED_DEVICES := tl-wr942n-v1
1111 endef
1112 TARGET_DEVICES += tl-wr940n-v4 tl-wr941nd-v2 tl-wr941nd-v3 tl-wr941nd-v4 tl-wr941nd-v5 tl-wr941nd-v6 tl-wr941nd-v6-cn tl-wr942n-v1