Optimized build for the D-Link DIR-860L

And now it is enabled for some devices ( mir3g, mir3g v2, mir3p, ... but not for diir-860l yet) through recipe :+1:

https://github.com/openwrt/openwrt/commit/ad19751edc21ae713bd95df6b93be64bd1e0c612

1 Like

I just realized that those commits were irrelevant to DIR-860L. :blush:
Because DIR-860L uses it's own KERNEL commands:

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 6e64fb8bf1..e1b3a518d7 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -218,7 +218,7 @@ define Device/dlink_dir-860l-b1
   $(Device/seama)
   BLOCKSIZE := 64k
   SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb
-  KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma
+  KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma -d18 | uImage lzma
   IMAGE_SIZE := 16064k
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DIR-860L

So it still uses the default dictionary size (-d23). But that dictionary size isn't enough for CONFIG_ALL_KMODS=y in the k5.4 world.
I tried with -d21 (the MT7621 default) but it's not enough, with 19 bit dictionary it boots but unable to find the device tree so it panics:

OF: fdt: No valid device tree found, continuing without
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
 0 
   
3: System Boot system code via Flash.
## Booting image at bfc50000 ...
addr:80500000
We have SEAMA, Image Size = 4915140
Verifying Checksum ...
Uncompressing SEAMA linux.lzma ... OK
## Transferring control to Linux (at address 00000000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 5.4.32 (xabolcs@ut1804) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r12974-75f19deb3a)) #0 SMP Wed Apr 15 02:14:19 2020
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] OF: fdt: No valid device tree found, continuing without
[    0.000000] percpu: Embedded 14 pages/cpu s26704 r8192 d22448 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] Kernel command line:   rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Writing ErrCtl register=0004050c
[    0.000000] Readback ErrCtl register=0004050c
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 120752K/131072K available (5826K kernel code, 206K rwdata, 1252K rodata, 1280K init, 237K bss, 10320K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/rcu/tree.c:2998 rcu_init+0x55c/0x774
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.32 #0
[    0.000000] Stack : 00000000 800774cc 806b0000 806b6474 80720000 806b643c 806b5590 806efdb4
[    0.000000]         80860000 80701248 80700d83 8064c7e4 00000000 00000001 806efd58 00000000
[    0.000000]         00000000 00000000 808a0000 00000000 00000030 00000027 342e3520 2032332e
[    0.000000]         00000000 00000000 00000000 00000000 00000000 80720000 00000000 807299f0
[    0.000000]         00000009 806451a4 806fe2b0 80700000 00000002 00000010 87ff0000 00000000
[    0.000000]         ...
[    0.000000] Call Trace:
[    0.000000] [<8000b72c>] show_stack+0x30/0x100
[    0.000000] [<8058fac4>] dump_stack+0xa4/0xdc
[    0.000000] [<80028038>] __warn+0xc0/0x10c
[    0.000000] [<800280e0>] warn_slowpath_fmt+0x5c/0xac
[    0.000000] [<807299f0>] rcu_init+0x55c/0x774
[    0.000000] [<80720a7c>] start_kernel+0x2dc/0x55c
[    0.000000] [<80011044>] start_secondary+0xb0/0x3a0
[    0.000000] random: get_random_bytes called from print_oops_end_marker+0x2c/0x64 with crng_init=0
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at kernel/rcu/tree.c:2999 rcu_init+0x5ac/0x774
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.4.32 #0
[    0.000000] Stack : 00000000 800774cc 806b0000 806b6474 80720000 806b643c 806b5590 806efdb4
[    0.000000]         80860000 80701248 80700d83 8064c7e4 00000000 00000001 806efd58 00000000
[    0.000000]         00000000 00000000 808a0000 00000000 00000030 0000003b 342e3520 2032332e
[    0.000000]         00000000 00000000 00000000 00000000 00000000 80720000 00000000 80729a40
[    0.000000]         00000009 806451a4 806fe2b0 80700000 00000002 00000010 87ff0000 00000000
[    0.000000]         ...
[    0.000000] Call Trace:
[    0.000000] [<8000b72c>] show_stack+0x30/0x100
[    0.000000] [<8058fac4>] dump_stack+0xa4/0xdc
[    0.000000] [<80028038>] __warn+0xc0/0x10c
[    0.000000] [<800280e0>] warn_slowpath_fmt+0x5c/0xac
[    0.000000] [<80729a40>] rcu_init+0x5ac/0x774
[    0.000000] [<80720a7c>] start_kernel+0x2dc/0x55c
[    0.000000] [<80011044>] start_secondary+0xb0/0x3a0
[    0.000000] ---[ end trace f68728a0d3053b52 ]---
[    0.000000] NR_IRQS: 256
[    0.000000] Kernel panic - not syncing: Failed to find mtk,mt7621-sysc node
[    0.000000] Rebooting in 1 seconds..
[    0.000000] Reboot failed -- System halted

As the diff shows, with CONFIG_ALL_KMODS=y, it needs -d18.
Without CONFIG_ALL_KMODS=y, it works flawlessly with the lzma default dictionary size (-d23).

2 Likes

Is anyone running the 5.4 kernel on their DIR-860l? If so, how are you experiences with:

  • Ethernet Speed
  • WiFi Speed
  • WiFi Stability
  • General Stability

Thanks for sharing your experiences :slight_smile:

The DIR860L is unable tot boot the 5.4 kernel due to lzma loader issues, however support recently dropped thanks to @xabolcs!

5.4 has been running without a hitch on my MIR3G so expect a testbuild soon. Only flash if you have a serial connection since it might not boot. Bit of a precaution there, there be possibly bricked routers

Edit: an update to the mt76 driver just landed, so testing a newer new build atm

Edit 2: no funky things overnight on my MIR3G so here is a first test build containing the 5.4 Linux kernel and an updated mt76 driver. Do not install if you don't have a serial connection! Here be bricked routers: r13097
Also, do not keep settings while flashing r13097 since it uses DSA which messes up the switch configuration if you keep your current configuration.

3 Likes

Thank you Bart for the testing build with 5.4 kernel!
Even if we don't have a serial connection, in case of problems with the testing build, is not possible to flash an old working build through Recovery Mode?
Or it exists the risk to damage the recovery mode as well and brick the router?

Recovery mode should work but I cannot check to see if it works since I don't have access to an DIR860L. Better safe then sorry :wink:

ps. do not keep settings while flashing r13097 since it uses DSA which messes up the switch configuration if you keep your current configuration.

2 Likes

I can say that the r13097 build successfully flashed and booted on my spare DIR-860L (with settings reset). I didn't have time to do any testing, so I can't really say much more than that. Thanks for the 5.4 test build.

2 Likes

//off - I've sold my 860l but will monitor the topic out of curiosity. Currently running as a temporary solution Telekom speedport smart 3 as an AP ( 2500 Mbit/s mu-mimo) and an old d-link n-150 as router. Probably will replace the d-link with x86 openwrt, or will get the Xiaomi AC2100 once that become stable enough.

Thanks for the ride everybody! (hopefully the new owner will jump on the topic as well)

1 Like

I confirm, recovery mode is working on DIR-860L: for example it starts automatically after flashing initramfs through TFTP. :upside_down_face:

Just note down: push the reset button through the hole on the bottom of router with a needle or something while powering on the router and wait the orange led to flash! :+1:

1 Like

The new owner is on board. Flashed the last stable last night and so far running well. Got the dlink to replace my buffalo wzr300hp nh2 also running openwrt, which I'll be using as repeater. The only thing I'm missing so far in my setup is having openvpn. Tried installing but it failed even with the force flag. Any chance of having that included in the future?

1 Like

Right now I am using DIR-860L as AP, the main router switched to a home-brew NanoPi R2S running OpenBSD 6.7 beta.

The R2S has 2 gigabits Ethernet ports, one for WAN and the other for LAN with which connected to a switch. The DIR-860L is configured as a node connected to the switch with one of it's LAN port, and WiFi has it's own sub net.

And DIR-860L can access specific servers (like NAS) on the LAN network, without passing through the router.

Unfortunately the 5G Hz WiFi connection is not stable with the latest master branch, which introduced bunch of mt76 driver updates.

The symptom is, the 5G will just disconnected somehow, since I am pretty close to the AP so it's obviously not due to distance.

1 Like

@Enig123 , you could try to reboot and check wifi 5G again.

I had with most of builds ofthis thread the so called "bad boot issue", that made wifi 5G unusable due to very frequent disconnection. After a reboot the router the wifi was stable for all the time until the next reboot.
Bartvz tried to check the "bad boots" logs but we didn't find what was the cause.
In short, try to reboot and it is possible that your wifi will be stable again.

In this weekend I will update to r13097 in order to make some speed and stability tests.

1 Like

That's awesome to hear :smile:

If you have an 1GBit connection and want stuff like shaping I would recommend x86, otherwise something like an ARM based router makes more sense electricity usage-wise

Welcome aboard and enjoy the sometimes slightly bumpy ride :smile:

Not stable as in connections dropping away? Keep in mind that I use a different but very similar device and it has an uptime of 2d 16h 15m 50s and no weirdness 5Ghz wise.
Might be a bad boot as @Axl_Mas posted below which probably has to do with how the wireless interface gets initialized.

Really want some of those nice juicy numbers :smiley:
Laptop with an Intel AX200 WiFi card on 5 GHz:

[ ID] Interval Transfer Bitrate
[ 5] 0.00-60.04 sec 2.07 GBytes 297 Mbits/sec receiver

A bit slower then before where it was in the 320-330 Mbit/s range but no strange dips or similar here.

2.4 Ghz performance is a completely different story. I thought mine was low because I am using an USB LTE dongle and USB 3 causes interference with 2.4 GHz. Have not been able to figure out how to force USB 2 since when I disable USB 3 and enable USB 2, USB on the router does not work anymore. Anyways 2.4 GHz performance with an Redmi Note 8 Pro connected at 72 Mbps:

[ ID] Interval Transfer Bitrate
[ 5] 0.00-61.35 sec 149 MBytes 20.3 Mbits/sec receiver

And that's with dips to 0.00 Mbits/s :confused:

1 Like

Well a further update after some quick testing of the r13097 build last night (client only). Settings don't survive a reboot or power cycle, so when the router is unplugged or restarted all configuration is lost. So, the 5.4 builds are definitely not usable day to day until that is fixed.

Additionally, 5GHz WiFi is excruciatingly slow the majority of the time (both upload and download were generally below 2mbps). 2.4GHz seem to be "normal". I would suspect it is an issue with the wireless driver, but have not looked in to it further.

2 Likes

I also had settings not sticking at first but a factory reset and new flash without keeping settings solved it for me.
Strange that 5 GHz is so extremely slow for @Enig123 and you, since it's working fine for me. For my phone 2.4 GHz is slow when testing with my laptop, I get the following result:

[ ID] Interval Transfer Bitrate
[ 5] 0.00-60.05 sec 506 MBytes 70.6 Mbits/sec receiver

Which is absolutely normal :confused:

Could you try what I described above, test it, reboot, test, reboot yet again and test yet again? This in order to check if it is the bad boot issue as mentioned by @Axl_Mas

No amount of settings resets / re-flashing from the GUI accomplished anything. I hopped in via SSH looked at 'mount', and the overlay was not being mounted properly. I manually ran a 'firstboot && reboot now' and it finally properly formatted mtdblock8 and initialized the overlayfs on the reboot. However, even after that on subsequent reboot all settings were still lost, and it went back to its failing to mount the overlayfs behavior.

EDIT: Just to be clear, this was on the r13047 K5.4 test build. Without the overlay working, testing the wireless behaviors through multiple reboots seems pointless, so I don't have any updated info on that.

I've flashed r12255 but didn't run firstboot. The command was:
sysupgrade -c
Now - I can see wifi of 2.4 and 5G but router is not properly configured. My router was working as AP without routing functionality. Now it had static address but now - it went to default 192.168.0.1. What worst - password was reset to something else. Is it possible to get into it? Only LuCI is working

I've solved - it was another router /ap on same address. Now - I have it installed. But I have a problem with multiple Wifi networks on 2.4 GHz interface. It is simply not working. only first network is visible. Other networks are grayed out with red round sign on them. I've also found that this might be because of bug in /bin/wifi When I run it from GUI (configuration of wireless networks) no wlan1-x interfaces are up. When then I run

wifi reconf

I see wlan1-1 and wlan1-2 virtual interfaces and

iw info

shows wifi ap names properly.

This problem goes away when I do:

uci set wireless.radio0.noscan=1
commit
wifi

Sorry for replying on my own posts.