Own Build LEDE for TP-Link WR841N v13

Hey there,

I tried to build my own LEDE for TP-Link WR841N v13, just like it was done for v12..

Means patching the Makefile with:

define Device/tl-wr841-v13
 $(Device/tl-wr841-v11)
 DEVICE_TITLE := TP-LINK TL-WR841N/ND v13
 TPLINK_HWID := 0x08410013
endef

And add it to TARGET_Devices...

Compile finished withou errors, but booting the device isn't successful...

Bootloader can't decompress the kernel:

3: System Boot system code via Flash.(0xbc020000)
do_bootm:argc=2, addr=0xbc020000
## Booting image at bc020000 ...
Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

Anyone got his v13 working withe LEDE allready?

All infos I found about v13 said, that there were actualy no hw changes visible and booting with higher hw id only should be possible.

Thanks for all answers :slight_smile:

So... as I found out, v13 is not ar71xx Soc, but MT7628...

Compatible Device is WR840 v4 with differen LANPort order and the LED's are little bit different.

Trying my luck with PR 974 now, which integrates WR840 v4 to Lede...

@tmomas thanks for moving to the right forum and sorry for wrong posting

//Edit

Success booting the router with WR840 v4 Firmware...
After changing LED's Config by hand, 974 patch applied and I built the firm, which successfully bootet the WR841N v13

No I'll take a look, if LanPort Order is ok and LED's behaving as they should...

Never thought to get that far, as i opened up this thread...

//Edit2

LED's and LANPorts are working correctly...

Only thing whats not working really good is the wifi AP connection....

Getting kernel.warn messages....

Thu May 18 19:33:40 2017 kern.warn kernel: [  884.168840] WARNING: CPU: 0 PID: 457 at /home/jerkball/compile/lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7628/mt76-2017-03-17-712b8e8f/mt7603_mac.c:1231 mt7603_mac_work+0x12c/0x248 [mt7603e]
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.187106] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 iptable_nat ipt_REJECT ipt_MASQUERADE xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitThu May 18 19:33:40 2017 kern.warn kernel: [  884.253218] CPU: 0 PID: 457 Comm: kworker/u2:2 Not tainted 4.9.20 #0
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.259702] Workqueue: phy0 mt7603_mac_work [mt7603e]
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.264833] Stack : 83803414 83157218 00000088 8004d430 8396bb3c 803d3207 803864d0 000001c9
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.273335]         8038643c 83315d64 803d0000 8007aa1c 00000088 8004d430 8038bc98 803d0000
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.281854]         00000003 83315d64 803d0000 80038c84 00000088 83315d9c 000000a5 00000000
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.290369]         00000000 00000000 8317d2b8 83b5a800 83b5a700 30796870 00000000 00000000
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.298888]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.307408]         ...
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.309893] Call Trace:
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.312396] [<8000e3e4>] show_stack+0x50/0x84
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.316850] [<80023ea0>] __warn+0xe4/0x118
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.321010] [<80023f68>] warn_slowpath_null+0x1c/0x34
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.326165] [<8317d3e4>] mt7603_mac_work+0x12c/0x248 [mt7603e]
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.332100] [<80036ce8>] process_one_work+0x1ec/0x32c
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.337244] [<80037a94>] worker_thread+0x2ac/0x420
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.342107] [<8003c294>] kthread+0xd8/0xec
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.346273] [<80009338>] ret_from_kernel_thread+0x14/0x1c
Thu May 18 19:33:40 2017 kern.warn kernel: [  884.351746] ---[ end trace 88ffaada167db6de ]---

I already fixed the thing in TL-WR840NV4.dts according wmac raxp mentioned over at OpenWRT's, but didn't help..
Switched from Kernel 4.4 to Kernel 4.9, but that didn't help either...

If someone got a hint maybe?

Unfortunately these stack traces are common for the MT76 driver. I'm building for a MT7628 myself but couldn't get the LEDs to work. Could you post your corrected led version for me to compare. Thanks!

Thanks for your reply...

Sure thing...

As the 974.patch failed due to changes in 01_leds, I did the changes by hand and removed that part from the patch...

Only thing I did, was add this:

tl-wr840n-v4)
    set_wifi_led "$board:green:wireless"
    ucidef_set_led_switch "lan" "lan" "$board:green:lan" "switch0" "0x1e"
    ucidef_set_led_switch "wan" "wan" "$board:green:wan" "switch0" "0x01"
    ;;

at line 336 between

tiny-ac)
    set_wifi_led "$board:orange:wifi"
    set_usb_led "$board:green:usb"
    ;;

and

vocore-8M|\
vocore-16M)

LED's working flawlessly with that entry...

Some people from Freifunk are also working on this, the current status can be seen here:

https://md.darmstadt.ccc.de/AwY2E4CYBYCMQLQEMCMcHQGYA4XNlgpOONgKaRrbbSRA

Great! Thanks! Now I have the LAN / WAN led's working as they should! Wifi still doesn't. I suppose this is a DTS problem as well.

Nice work guys, i'm trying to build my own but I though I might ask if anyone could share their build of LEDE for WR841 V13 with the led support?. I'm a bit of newbie.

Also I wanted to know if it supports installing packages, because I flashed the firmware provided by LEDE link and after installing lucy via ssh and going into Software the "Update List" button is nowhere to be found.
edit:
I tested SQM and it was not working well getting 0.2 download speed as opposed to 2.5 that I should be getting, I had the same config on another router with lede wr841 v10 and it worked fine.

There are now snapshots provided
https://downloads.lede-project.org/snapshots/targets/ramips/mt7628/
You might have to provide the links to the packages by hand to the opkg sources.