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