tp-link.mk 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_BOARD_NAME
  2. # combine kernel and rootfs into one image
  3. # mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
  4. # <type> is "sysupgrade" or "factory"
  5. #
  6. # -a align the rootfs start on an <align> bytes boundary
  7. # -j add jffs2 end-of-filesystem markers
  8. # -s strip padding from end of the image
  9. # -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
  10. define Build/mktplinkfw
  11. -$(STAGING_DIR_HOST)/bin/mktplinkfw \
  12. -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) \
  13. -m $(TPLINK_HEADER_VERSION) \
  14. -k $(word 1,$^) \
  15. -r $@ \
  16. -o $@.new \
  17. -j -X 0x40000 \
  18. -a $(call rootfs_align,$(FILESYSTEM)) \
  19. $(wordlist 2,$(words $(1)),$(1)) \
  20. $(if $(findstring sysupgrade,$(word 1,$(1))),-s) && mv $@.new $@ || rm -f $@
  21. endef
  22. # mktplinkfw-combined
  23. #
  24. # -c combined image
  25. define Build/mktplinkfw-combined
  26. $(STAGING_DIR_HOST)/bin/mktplinkfw \
  27. -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \
  28. -m $(TPLINK_HEADER_VERSION) \
  29. -k $@ \
  30. -o $@.new \
  31. -s -S \
  32. -c
  33. @mv $@.new $@
  34. endef
  35. # mktplinkfw-initramfs <optional extra arguments to mktplinkfw binary>
  36. #
  37. # -c combined image
  38. define Build/mktplinkfw-initramfs
  39. $(STAGING_DIR_HOST)/bin/mktplinkfw \
  40. -H $(TPLINK_HWID) -W $(TPLINK_HWREV) -F $(TPLINK_FLASHLAYOUT) -N OpenWrt -V $(REVISION) $(1) \
  41. -m $(TPLINK_HEADER_VERSION) \
  42. -k $@ \
  43. -o $@.new \
  44. -s -S \
  45. -c
  46. @mv $@.new $@
  47. endef
  48. define Device/tplink
  49. TPLINK_HWREV := 0x1
  50. TPLINK_HEADER_VERSION := 1
  51. LOADER_TYPE := gz
  52. KERNEL := kernel-bin | patch-cmdline | lzma
  53. KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw-initramfs
  54. IMAGES := sysupgrade.bin factory.bin
  55. IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
  56. IMAGE/factory.bin := append-rootfs | mktplinkfw factory
  57. endef
  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 | mktplinkfw-initramfs
  65. endef
  66. define Device/tplink-4m
  67. $(Device/tplink-nolzma)
  68. TPLINK_FLASHLAYOUT := 4M
  69. IMAGE_SIZE := 3904k
  70. endef
  71. define Device/tplink-8m
  72. $(Device/tplink-nolzma)
  73. TPLINK_FLASHLAYOUT := 8M
  74. IMAGE_SIZE := 7936k
  75. endef
  76. define Device/tplink-4mlzma
  77. $(Device/tplink)
  78. TPLINK_FLASHLAYOUT := 4Mlzma
  79. IMAGE_SIZE := 3904k
  80. endef
  81. define Device/tplink-8mlzma
  82. $(Device/tplink)
  83. TPLINK_FLASHLAYOUT := 8Mlzma
  84. IMAGE_SIZE := 7936k
  85. endef
  86. define Device/tplink-16mlzma
  87. $(Device/tplink)
  88. TPLINK_FLASHLAYOUT := 16Mlzma
  89. IMAGE_SIZE := 15872k
  90. endef
  91. define Device/cpe510-520
  92. 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)
  93. IMAGE_SIZE := 7680k
  94. BOARDNAME := CPE510
  95. TPLINK_BOARD_NAME := CPE510
  96. DEVICE_PROFILE := CPE510
  97. LOADER_TYPE := elf
  98. KERNEL := kernel-bin | patch-cmdline | lzma | loader-kernel
  99. IMAGES := sysupgrade.bin factory.bin
  100. IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  101. IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
  102. endef
  103. define Device/cpe210-220
  104. $(Device/cpe510-520)
  105. BOARDNAME := CPE210
  106. endef
  107. TARGET_DEVICES += cpe210-220 cpe510-520
  108. define Device/tl-wdr4300-v1
  109. $(Device/tplink-8mlzma)
  110. BOARDNAME = TL-WDR4300
  111. DEVICE_PROFILE = TLWDR4300
  112. TPLINK_HWID := 0x43000001
  113. endef
  114. define Device/tl-wdr3500-v1
  115. $(Device/tl-wdr4300-v1)
  116. BOARDNAME = TL-WDR3500
  117. TPLINK_HWID := 0x35000001
  118. endef
  119. define Device/tl-wdr3600-v1
  120. $(Device/tl-wdr4300-v1)
  121. TPLINK_HWID := 0x36000001
  122. endef
  123. define Device/tl-wdr4300-v1-il
  124. $(Device/tl-wdr4300-v1)
  125. TPLINK_HWID := 0x43008001
  126. endef
  127. define Device/tl-wdr4310-v1
  128. $(Device/tl-wdr4300-v1)
  129. TPLINK_HWID := 0x43100001
  130. endef
  131. define Device/mw4530r-v1
  132. $(Device/tl-wdr4300-v1)
  133. TPLINK_HWID := 0x45300001
  134. endef
  135. TARGET_DEVICES += tl-wdr3500-v1 tl-wdr3600-v1 tl-wdr4300-v1 tl-wdr4300-v1-il tl-wdr4310-v1 mw4530r-v1
  136. define Device/tl-wdr6500-v2
  137. $(Device/tplink-8mlzma)
  138. KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
  139. KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | uImage lzma | mktplinkfw-initramfs
  140. BOARDNAME = TL-WDR6500-v2
  141. DEVICE_PROFILE = TLWDR6500V2
  142. TPLINK_HWID := 0x65000002
  143. TPLINK_HEADER_VERSION := 2
  144. endef
  145. TARGET_DEVICES += tl-wdr6500-v2
  146. define Device/tl-wdr3320-v2
  147. $(Device/tplink-4mlzma)
  148. BOARDNAME = TL-WDR3320-v2
  149. DEVICE_PROFILE = TLWDR3320V2
  150. TPLINK_HWID := 0x33200002
  151. TPLINK_HEADER_VERSION := 2
  152. endef
  153. TARGET_DEVICES += tl-wdr3320-v2
  154. define Device/archer-c5-v1
  155. $(Device/tplink-16mlzma)
  156. BOARDNAME := ARCHER-C5
  157. DEVICE_PROFILE := ARCHERC7
  158. TPLINK_HWID := 0xc5000001
  159. endef
  160. define Device/archer-c7-v1
  161. $(Device/tplink-8mlzma)
  162. BOARDNAME := ARCHER-C7
  163. DEVICE_PROFILE := ARCHERC7
  164. TPLINK_HWID := 0x75000001
  165. endef
  166. define Device/archer-c7-v2
  167. $(Device/tplink-16mlzma)
  168. BOARDNAME := ARCHER-C7-V2
  169. DEVICE_PROFILE := ARCHERC7
  170. TPLINK_HWID := 0xc7000002
  171. IMAGE/factory.bin := append-rootfs | mktplinkfw factory -C US
  172. endef
  173. define Device/tl-wdr7500-v3
  174. $(Device/tplink-8mlzma)
  175. BOARDNAME := ARCHER-C7
  176. DEVICE_PROFILE := ARCHERC7
  177. TPLINK_HWID := 0x75000003
  178. endef
  179. TARGET_DEVICES += archer-c5-v1 archer-c7-v1 archer-c7-v2 tl-wdr7500-v3
  180. define Device/tl-mr10u-v1
  181. $(Device/tplink-4mlzma)
  182. BOARDNAME := TL-MR10U
  183. DEVICE_PROFILE := TLMR10U
  184. TPLINK_HWID := 0x00100101
  185. CONSOLE := ttyATH0,115200
  186. endef
  187. define Device/tl-mr11u-v1
  188. $(Device/tplink-4mlzma)
  189. BOARDNAME := TL-MR11U
  190. DEVICE_PROFILE := TLMR11U
  191. TPLINK_HWID := 0x00110101
  192. CONSOLE := ttyATH0,115200
  193. endef
  194. define Device/tl-mr11u-v2
  195. $(Device/tplink-4mlzma)
  196. BOARDNAME := TL-MR11U
  197. DEVICE_PROFILE := TLMR11U
  198. TPLINK_HWID := 0x00110102
  199. CONSOLE := ttyATH0,115200
  200. endef
  201. define Device/tl-mr12u-v1
  202. $(Device/tplink-4mlzma)
  203. BOARDNAME := TL-MR13U
  204. DEVICE_PROFILE := TLMR12U
  205. TPLINK_HWID := 0x00120101
  206. CONSOLE := ttyATH0,115200
  207. endef
  208. define Device/tl-mr13u-v1
  209. $(Device/tplink-4mlzma)
  210. BOARDNAME := TL-MR13U
  211. DEVICE_PROFILE := TLMR13U
  212. TPLINK_HWID := 0x00130101
  213. CONSOLE := ttyATH0,115200
  214. endef
  215. TARGET_DEVICES += tl-mr10u-v1 tl-mr11u-v1 tl-mr11u-v2 tl-mr12u-v1 tl-mr13u-v1
  216. define Device/tl-mr3020-v1
  217. $(Device/tplink-4mlzma)
  218. BOARDNAME := TL-MR3020
  219. DEVICE_PROFILE := TLMR3020
  220. TPLINK_HWID := 0x30200001
  221. CONSOLE := ttyATH0,115200
  222. endef
  223. define Device/tl-mr3040-v1
  224. $(Device/tplink-4mlzma)
  225. BOARDNAME := TL-MR3040
  226. DEVICE_PROFILE := TLMR3040
  227. TPLINK_HWID := 0x30400001
  228. CONSOLE := ttyATH0,115200
  229. endef
  230. define Device/tl-mr3040-v2
  231. $(Device/tplink-4mlzma)
  232. BOARDNAME := TL-MR3040-v2
  233. DEVICE_PROFILE := TLMR3040
  234. TPLINK_HWID := 0x30400002
  235. CONSOLE := ttyATH0,115200
  236. endef
  237. define Device/tl-mr3220-v1
  238. $(Device/tplink-4m)
  239. BOARDNAME := TL-MR3220
  240. DEVICE_PROFILE := TLMR3220
  241. TPLINK_HWID := 0x32200001
  242. endef
  243. define Device/tl-mr3220-v2
  244. $(Device/tplink-4mlzma)
  245. BOARDNAME := TL-MR3220-v2
  246. DEVICE_PROFILE := TLMR3220
  247. TPLINK_HWID := 0x32200002
  248. CONSOLE := ttyATH0,115200
  249. endef
  250. define Device/tl-mr3420-v1
  251. $(Device/tplink-4m)
  252. BOARDNAME := TL-MR3420
  253. DEVICE_PROFILE := TLMR3420
  254. TPLINK_HWID := 0x34200001
  255. endef
  256. define Device/tl-mr3420-v2
  257. $(Device/tplink-4mlzma)
  258. BOARDNAME := TL-MR3420-v2
  259. DEVICE_PROFILE := TLMR3420
  260. TPLINK_HWID := 0x34200002
  261. endef
  262. TARGET_DEVICES += tl-mr3020-v1 tl-mr3040-v1 tl-mr3040-v2 tl-mr3220-v1 tl-mr3220-v2 tl-mr3420-v1 tl-mr3420-v2
  263. define Device/tl-wr703n-v1
  264. $(Device/tplink-4mlzma)
  265. BOARDNAME := TL-WR703N
  266. DEVICE_PROFILE := TLWR703
  267. TPLINK_HWID := 0x07030101
  268. CONSOLE := ttyATH0,115200
  269. endef
  270. define Device/tl-wr710n-v1
  271. $(Device/tplink-8mlzma)
  272. BOARDNAME := TL-WR710N
  273. DEVICE_PROFILE := TLWR710
  274. TPLINK_HWID := 0x07100001
  275. CONSOLE := ttyATH0,115200
  276. endef
  277. define Device/tl-wr710n-v2
  278. $(Device/tplink-4mlzma)
  279. BOARDNAME := TL-WR710N
  280. DEVICE_PROFILE := TLWR710
  281. TPLINK_HWID := 0x07100002
  282. CONSOLE := ttyATH0,115200
  283. endef
  284. define Device/tl-wr710n-v2.1
  285. $(Device/tplink-8mlzma)
  286. BOARDNAME := TL-WR710N
  287. DEVICE_PROFILE := TLWR710
  288. TPLINK_HWID := 0x07100002
  289. TPLINK_HWREV := 0x00000002
  290. CONSOLE := ttyATH0,115200
  291. endef
  292. define Device/tl-wr720n-v3
  293. $(Device/tplink-4mlzma)
  294. BOARDNAME := TL-WR720N-v3
  295. DEVICE_PROFILE := TLWR720
  296. TPLINK_HWID := 0x07200103
  297. CONSOLE := ttyATH0,115200
  298. endef
  299. define Device/tl-wr720n-v4
  300. $(Device/tplink-4mlzma)
  301. BOARDNAME := TL-WR720N-v3
  302. DEVICE_PROFILE := TLWR720
  303. TPLINK_HWID := 0x07200104
  304. CONSOLE := ttyATH0,115200
  305. endef
  306. TARGET_DEVICES += tl-wr703n-v1 tl-wr710n-v1 tl-wr710n-v2 tl-wr710n-v2.1 tl-wr720n-v3 tl-wr720n-v4
  307. define Device/tl-wr740n-v1
  308. $(Device/tplink-4m)
  309. BOARDNAME := TL-WR741ND
  310. DEVICE_PROFILE := TLWR740
  311. TPLINK_HWID := 0x07400001
  312. endef
  313. define Device/tl-wr740n-v3
  314. $(Device/tplink-4m)
  315. BOARDNAME := TL-WR741ND
  316. DEVICE_PROFILE := TLWR740
  317. TPLINK_HWID := 0x07400003
  318. endef
  319. define Device/tl-wr740n-v4
  320. $(Device/tplink-4mlzma)
  321. BOARDNAME := TL-WR741ND-v4
  322. DEVICE_PROFILE := TLWR740
  323. TPLINK_HWID := 0x07400004
  324. CONSOLE := ttyATH0,115200
  325. endef
  326. define Device/tl-wr740n-v5
  327. $(Device/tplink-4mlzma)
  328. BOARDNAME := TL-WR741ND-v4
  329. DEVICE_PROFILE := TLWR740
  330. TPLINK_HWID := 0x07400005
  331. CONSOLE := ttyATH0,115200
  332. endef
  333. define Device/tl-wr740n-v6
  334. $(Device/tplink-4mlzma)
  335. BOARDNAME := TL-WR841N-v9
  336. DEVICE_PROFILE := TLWR740
  337. TPLINK_HWID := 0x07400006
  338. endef
  339. define Device/tl-wr741nd-v1
  340. $(Device/tplink-4m)
  341. BOARDNAME := TL-WR741ND
  342. DEVICE_PROFILE := TLWR741
  343. TPLINK_HWID := 0x07410001
  344. endef
  345. define Device/tl-wr741nd-v2
  346. $(Device/tplink-4m)
  347. BOARDNAME := TL-WR741ND
  348. DEVICE_PROFILE := TLWR741
  349. TPLINK_HWID := 0x07410001
  350. endef
  351. define Device/tl-wr741nd-v4
  352. $(Device/tplink-4mlzma)
  353. BOARDNAME := TL-WR741ND-v4
  354. DEVICE_PROFILE := TLWR741
  355. TPLINK_HWID := 0x07410004
  356. CONSOLE := ttyATH0,115200
  357. endef
  358. define Device/tl-wr741nd-v5
  359. $(Device/tplink-4mlzma)
  360. BOARDNAME := TL-WR741ND-v4
  361. DEVICE_PROFILE := TLWR741
  362. TPLINK_HWID := 0x07400005
  363. CONSOLE := ttyATH0,115200
  364. endef
  365. define Device/tl-wr810n
  366. $(Device/tplink-8mlzma)
  367. BOARDNAME := TL-WR810N
  368. DEVICE_PROFILE := TLWR810
  369. TPLINK_HWID := 0x08100001
  370. endef
  371. TARGET_DEVICES += tl-wr810n
  372. define Device/tl-wr743nd-v1
  373. $(Device/tplink-4m)
  374. BOARDNAME := TL-WR741ND
  375. DEVICE_PROFILE := TLWR743
  376. TPLINK_HWID := 0x07430001
  377. endef
  378. define Device/tl-wr743nd-v2
  379. $(Device/tplink-4mlzma)
  380. BOARDNAME := TL-WR741ND-v4
  381. DEVICE_PROFILE := TLWR743
  382. TPLINK_HWID := 0x07430002
  383. CONSOLE := ttyATH0,115200
  384. endef
  385. TARGET_DEVICES += tl-wr740n-v1 tl-wr740n-v3 tl-wr740n-v4 tl-wr740n-v5 tl-wr740n-v6 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v1 tl-wr743nd-v2
  386. define Device/tl-wr841-v1.5
  387. $(Device/tplink-4m)
  388. BOARDNAME := TL-WR841N-v1.5
  389. DEVICE_PROFILE := TLWR841
  390. TPLINK_HWID := 0x08410002
  391. TPLINK_HWREV := 2
  392. endef
  393. define Device/tl-wr841-v3
  394. $(Device/tplink-4m)
  395. BOARDNAME := TL-WR941ND
  396. DEVICE_PROFILE := TLWR841
  397. TPLINK_HWID := 0x08410003
  398. TPLINK_HWREV := 3
  399. endef
  400. define Device/tl-wr841-v5
  401. $(Device/tplink-4m)
  402. BOARDNAME := TL-WR741ND
  403. DEVICE_PROFILE := TLWR841
  404. TPLINK_HWID := 0x08410005
  405. endef
  406. define Device/tl-wr841-v7
  407. $(Device/tplink-4m)
  408. BOARDNAME := TL-WR841N-v7
  409. DEVICE_PROFILE := TLWR841
  410. TPLINK_HWID := 0x08410007
  411. endef
  412. define Device/tl-wr841-v8
  413. $(Device/tplink-4mlzma)
  414. BOARDNAME := TL-WR841N-v8
  415. DEVICE_PROFILE := TLWR841
  416. TPLINK_HWID := 0x08410008
  417. endef
  418. define Device/tl-wr841-v9
  419. $(Device/tplink-4mlzma)
  420. BOARDNAME := TL-WR841N-v9
  421. DEVICE_PROFILE := TLWR841
  422. TPLINK_HWID := 0x08410009
  423. endef
  424. define Device/tl-wr841-v10
  425. $(Device/tplink-4mlzma)
  426. BOARDNAME := TL-WR841N-v9
  427. DEVICE_PROFILE := TLWR841
  428. TPLINK_HWID := 0x08410010
  429. endef
  430. define Device/tl-wr841-v11
  431. $(Device/tplink-4mlzma)
  432. BOARDNAME := TL-WR841N-v11
  433. DEVICE_PROFILE := TLWR841
  434. TPLINK_HWID := 0x08410011
  435. endef
  436. define Device/tl-wr842n-v1
  437. $(Device/tplink-8m)
  438. BOARDNAME := TL-MR3420
  439. DEVICE_PROFILE := TLWR842
  440. TPLINK_HWID := 0x08420001
  441. endef
  442. define Device/tl-wr842n-v2
  443. $(Device/tplink-8mlzma)
  444. BOARDNAME := TL-WR842N-v2
  445. DEVICE_PROFILE := TLWR842
  446. TPLINK_HWID := 0x8420002
  447. endef
  448. define Device/tl-wr842n-v3
  449. $(Device/tplink-16mlzma)
  450. BOARDNAME := TL-WR842N-v3
  451. DEVICE_PROFILE := TLWR842
  452. TPLINK_HWID := 0x08420003
  453. endef
  454. define Device/tl-wr843nd-v1
  455. $(Device/tplink-4mlzma)
  456. BOARDNAME := TL-WR841N-v8
  457. DEVICE_PROFILE := TLWR843
  458. TPLINK_HWID := 0x08430001
  459. endef
  460. define Device/tl-wr847n-v8
  461. $(Device/tplink-4mlzma)
  462. BOARDNAME := TL-WR841N-v8
  463. DEVICE_PROFILE := TLWR841
  464. TPLINK_HWID := 0x08470008
  465. endef
  466. 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-wr842n-v1 tl-wr842n-v2 tl-wr842n-v3 tl-wr843nd-v1 tl-wr847n-v8
  467. define Device/tl-wr941nd-v2
  468. $(Device/tplink-4m)
  469. BOARDNAME := TL-WR941ND
  470. DEVICE_PROFILE := TLWR941
  471. TPLINK_HWID := 0x09410002
  472. TPLINK_HWREV := 2
  473. endef
  474. define Device/tl-wr941nd-v3
  475. $(Device/tplink-4m)
  476. BOARDNAME := TL-WR941ND
  477. DEVICE_PROFILE := TLWR941
  478. TPLINK_HWID := 0x09410002
  479. TPLINK_HWREV := 2
  480. endef
  481. define Device/tl-wr941nd-v4
  482. $(Device/tplink-4m)
  483. BOARDNAME := TL-WR741ND
  484. DEVICE_PROFILE := TLWR941
  485. TPLINK_HWID := 0x09410004
  486. endef
  487. define Device/tl-wr941nd-v5
  488. $(Device/tplink-4mlzma)
  489. BOARDNAME := TL-WR941ND-v5
  490. DEVICE_PROFILE := TLWR941
  491. TPLINK_HWID := 0x09410005
  492. endef
  493. define Device/tl-wr941nd-v6
  494. $(Device/tplink-4mlzma)
  495. BOARDNAME := TL-WR941ND-v6
  496. DEVICE_PROFILE := TLWR941
  497. TPLINK_HWID := 0x09410006
  498. endef
  499. # Chinese version (unlike European) is similar to the TL-WDR3500
  500. define Device/tl-wr941nd-v6-cn
  501. $(Device/tplink-4mlzma)
  502. BOARDNAME := TL-WDR3500
  503. DEVICE_PROFILE := TLWR941
  504. TPLINK_HWID := 0x09410006
  505. endef
  506. TARGET_DEVICES += tl-wr941nd-v2 tl-wr941nd-v3 tl-wr941nd-v4 tl-wr941nd-v5 tl-wr941nd-v6 tl-wr941nd-v6-cn
  507. define Device/tl-wr1041n-v2
  508. $(Device/tplink-4mlzma)
  509. BOARDNAME := TL-WR1041N-v2
  510. DEVICE_PROFILE := TLWR1041
  511. TPLINK_HWID := 0x10410002
  512. endef
  513. TARGET_DEVICES += tl-wr1041n-v2
  514. define Device/tl-wr1043nd-v1
  515. $(Device/tplink-8m)
  516. BOARDNAME := TL-WR1043ND
  517. DEVICE_PROFILE := TLWR1043
  518. TPLINK_HWID := 0x10430001
  519. endef
  520. define Device/tl-wr1043nd-v2
  521. $(Device/tplink-8mlzma)
  522. BOARDNAME := TL-WR1043ND-v2
  523. DEVICE_PROFILE := TLWR1043
  524. TPLINK_HWID := 0x10430002
  525. endef
  526. define Device/tl-wr1043nd-v3
  527. $(Device/tplink-8mlzma)
  528. BOARDNAME := TL-WR1043ND-v2
  529. DEVICE_PROFILE := TLWR1043
  530. TPLINK_HWID := 0x10430003
  531. endef
  532. define Device/tl-wr1043nd-v4
  533. 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)
  534. IMAGE_SIZE := 15552k
  535. BOARDNAME := TL-WR1043ND-v4
  536. TPLINK_BOARD_NAME := TLWR1043NDV4
  537. TPLINK_HWID := 0x10430004
  538. TPLINK_FLASHLAYOUT := 16Msafeloader
  539. DEVICE_PROFILE := TLWR1043
  540. LOADER_TYPE := elf
  541. KERNEL := kernel-bin | patch-cmdline | lzma | mktplinkfw-combined
  542. IMAGES := sysupgrade.bin factory.bin
  543. IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade
  544. IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
  545. endef
  546. TARGET_DEVICES += tl-wr1043nd-v1 tl-wr1043nd-v2 tl-wr1043nd-v3 tl-wr1043nd-v4
  547. define Device/tl-wr2543-v1
  548. $(Device/tplink-8mlzma)
  549. BOARDNAME := TL-WR2543N
  550. DEVICE_PROFILE := TLWR2543
  551. TPLINK_HWID := 0x25430001
  552. IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade -v 3.13.99
  553. IMAGE/factory.bin := append-rootfs | mktplinkfw factory -v 3.13.99
  554. endef
  555. TARGET_DEVICES += tl-wr2543-v1
  556. define Device/tl-wdr4900-v2
  557. $(Device/tplink-8mlzma)
  558. BOARDNAME := TL-WDR4900-v2
  559. DEVICE_PROFILE := TLWDR4900V2
  560. TPLINK_HWID := 0x49000002
  561. endef
  562. TARGET_DEVICES += tl-wdr4900-v2
  563. define Device/tl-wa701nd-v1
  564. $(Device/tplink-4m)
  565. BOARDNAME := TL-WA901ND
  566. DEVICE_PROFILE := TLWA701
  567. TPLINK_HWID := 0x07010001
  568. endef
  569. define Device/tl-wa701nd-v2
  570. $(Device/tplink-4mlzma)
  571. BOARDNAME := TL-WA701ND-v2
  572. DEVICE_PROFILE := TLWA701
  573. TPLINK_HWID := 0x07010002
  574. CONSOLE := ttyATH0,115200
  575. endef
  576. define Device/tl-wa730re-v1
  577. $(Device/tplink-4m)
  578. BOARDNAME := TL-WA901ND
  579. DEVICE_PROFILE := TLWA730RE
  580. TPLINK_HWID := 0x07300001
  581. endef
  582. define Device/tl-wa750re-v1
  583. $(Device/tplink-4mlzma)
  584. BOARDNAME := TL-WA750RE
  585. DEVICE_PROFILE := TLWA750
  586. TPLINK_HWID := 0x07500001
  587. endef
  588. define Device/tl-wa7510n
  589. $(Device/tplink-4m)
  590. BOARDNAME := TL-WA7510N
  591. DEVICE_PROFILE := TLWA7510
  592. TPLINK_HWID := 0x75100001
  593. endef
  594. TARGET_DEVICES += tl-wa701nd-v1 tl-wa701nd-v2 tl-wa730re-v1 tl-wa750re-v1 tl-wa7510n
  595. define Device/tl-wa801nd-v1
  596. $(Device/tplink-4m)
  597. BOARDNAME := TL-WA901ND
  598. DEVICE_PROFILE := TLWA801
  599. TPLINK_HWID := 0x08010001
  600. endef
  601. define Device/tl-wa801nd-v2
  602. $(Device/tplink-4mlzma)
  603. BOARDNAME := TL-WA801ND-v2
  604. DEVICE_PROFILE := TLWA801
  605. TPLINK_HWID := 0x08010002
  606. endef
  607. define Device/tl-wa801nd-v3
  608. $(Device/tplink-4mlzma)
  609. BOARDNAME := TL-WA801ND-v3
  610. DEVICE_PROFILE := TLWA801
  611. TPLINK_HWID := 0x08010003
  612. endef
  613. define Device/tl-wa830re-v1
  614. $(Device/tplink-4m)
  615. BOARDNAME := TL-WA901ND
  616. DEVICE_PROFILE := TLWA830
  617. TPLINK_HWID := 0x08300010
  618. endef
  619. define Device/tl-wa830re-v2
  620. $(Device/tplink-4mlzma)
  621. BOARDNAME := TL-WA830RE-v2
  622. DEVICE_PROFILE := TLWA830
  623. TPLINK_HWID := 0x08300002
  624. endef
  625. define Device/tl-wa850re-v1
  626. $(Device/tplink-4mlzma)
  627. BOARDNAME := TL-WA850RE
  628. DEVICE_PROFILE := TLWA850
  629. TPLINK_HWID := 0x08500001
  630. endef
  631. define Device/tl-wa860re-v1
  632. $(Device/tplink-4mlzma)
  633. BOARDNAME := TL-WA860RE
  634. DEVICE_PROFILE := TLWA860
  635. TPLINK_HWID := 0x08600001
  636. endef
  637. TARGET_DEVICES += tl-wa801nd-v1 tl-wa801nd-v2 tl-wa801nd-v3 tl-wa830re-v1 tl-wa830re-v2 tl-wa850re-v1 tl-wa860re-v1
  638. define Device/tl-wa901nd-v1
  639. $(Device/tplink-4m)
  640. BOARDNAME := TL-WA901ND
  641. DEVICE_PROFILE := TLWA901
  642. TPLINK_HWID := 0x09010001
  643. endef
  644. define Device/tl-wa901nd-v2
  645. $(Device/tplink-4m)
  646. BOARDNAME := TL-WA901ND-v2
  647. DEVICE_PROFILE := TLWA901
  648. TPLINK_HWID := 0x09010002
  649. endef
  650. define Device/tl-wa901nd-v3
  651. $(Device/tplink-4mlzma)
  652. BOARDNAME := TL-WA901ND-v3
  653. DEVICE_PROFILE := TLWA901
  654. TPLINK_HWID := 0x09010003
  655. endef
  656. define Device/tl-wa901nd-v4
  657. $(Device/tplink-4mlzma)
  658. BOARDNAME := TL-WA901ND-v4
  659. DEVICE_PROFILE := TLWA901
  660. TPLINK_HWID := 0x09010004
  661. endef
  662. TARGET_DEVICES += tl-wa901nd-v1 tl-wa901nd-v2 tl-wa901nd-v3 tl-wa901nd-v4
  663. define Device/tl-wa7210n-v2
  664. $(Device/tplink-4mlzma)
  665. BOARDNAME := TL-WA7210N-v2
  666. DEVICE_PROFILE := TLWA7210
  667. TPLINK_HWID := 0x72100002
  668. CONSOLE := ttyATH0,115200
  669. endef
  670. TARGET_DEVICES += tl-wa7210n-v2