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