Optimized build for the D-Link DIR-860L

It seems it may not be lost for good...

3 Likes

If it is coming from Blogic, I can very much believe it :slight_smile:

I'm asking here since all people on this topic at least have a DIR-860L. I've been building and loading a master build (now with 5.4) on my DIR-860L but it craps out after changing its IP - every single time. A reboot will make it go crazy (it never boots, or at least it seems to hang somewhere).

Only my 5 GHz radio seems to be recognised as well, 2,4 GHz radio is nowhere to be seen (see my comment on the 5.4 PR).

Has anybody tried 5.4 master on their DIR-860L? What's your experience?

It's not my daily driver anymore so I can 'afford' to test builds.

I can't wait to test a new build of @Bartvz but I guess we have to wait abit for it.

Unfortunately my dir-860l is still my main router and with the current situation for working from home it is an important part. Hope the issues get resolved soon, seems there is still some life in this device.

@Kherby - well untill things aren't a bit more stable, there is no need for Bartvz to do a build.

1 Like

When I install the SNAPSHOT sysupgrade or factory images I get: LZMA ERROR 1 - must RESET board to recover

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.

You choosed 3

 0

3: System Boot system code via Flash.
## Booting image at bfc50000 ...
addr:80500000
We have SEAMA, Image Size = 2424768
Verifying Checksum ...
Uncompressing SEAMA linux.lzma ... LZMA ERROR 1 - must RESET board to recover

:upside_down_face:

I was able to reproduce with config.buildinfo, but going further down with the bits to 17 didn't help.

The initramfs image works.

1 Like

Thanks! Would you mind adding that info to the GitHub PR I linked to (I think you already commented there?).

I don't like polluting closed PR's with not fully related problems. This LZMA ERROR 1 - must RESET board to recover should go to FlySpray, IRC or here to the Forums, IMHO. Ok if there will be a minimal STR and a bisected changeset, the problem could be sent to the mailing list.

So it would be nice to create a minimal diffconfig, find a suspicious commit first.

1 Like

CONFIG_ALL_KMODS=y triggers the lzma error! :boom:

Let's find the first bad commit!


  • OpenWrt SNAPSHOT, r12796-ff6b092121 was good:
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 = 4456388
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 4.14.172 (xabolcs@ut1804) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r12798-b51ea43f90)) #0 SMP0
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-860L B1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
  • 7daab6286110b95167e291409395494f18edc9dc was bad, but wasn't the first bad :wink:
3 Likes
  • commit 4d979a4d1969b59e462ea4633eeb8c69111261c5 (+ revert of 3ec70052c5d82ffbc8d13e597f2833a1c30bec54 (broke the tree) + applied 95bd6a04b56aaac9270774011c747d0875389dc5 (dma 5.4 fix)) is bad.
  • commit b51ea43f900191bc8ce7411dad39239fac6df4f8 (+revert of 3ec70052c5d82ffbc8d13e597f2833a1c30bec54) is good.

These are exactly the k5.4 commits: Comparing changes

I don't want to bisect into the k5.4 series.

3 Likes

Thanks @xabolcs for chasing down the bug, have you notified the maintainers so the less code savvy people like me can hope for a fix in the foreseeable future.

There is a ramips lzma loader stuff now:

I tried it with manual inserting:

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 8980ff70d4..4f2966d253 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -218,7 +218,8 @@ 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
+  LOADER_TYPE := bin
+  KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | loader-kernel | uImage none
   IMAGE_SIZE := 16064k
   DEVICE_VENDOR := D-Link
   DEVICE_MODEL := DIR-860L

... and with the $(Device/uimage-lzma-loader) recipe (which doesn't contain the relocate-kernel) without luck. :frowning:

2 Likes

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