Optimized build for the D-Link DIR-860L

I receive "access denied" when I click in the google drive link. Is the folder with the build public?

1 Like

@bartvz Same here Google asks me to log in.

1 Like

Oops, should be fixed now :sweat_smile:
Switched to Google Drive since I have more storage there, but unfortunately it works clunkier then Dropbox

2 Likes

Fixed! I am downloading right now :wink:

2 Likes

@Bartvz
I've tested the latest build with two of my backup units (flashed via recovery gui) and both are loosing the settings after reboot with r14548.
With the second unit I've also tried to flash the sysupgrade via OpenWrt GUI from r14548 (without keeping settings) but it didn't improve the situation either.
The official 19.07.4 build works fine with both units, same as r12255.
I do have a third unit with factory firmware (brand new, never used) so I might give it a try with this one later on but I doubt that it will change much (all my units came with fw 2.03 preinstalled).

Let me know If there is anything else that I can test...

1 Like

Same here, I'm just about ready to give up and call it quits....stick with 12255 for the time being and live with the occasional 5GHz crashes.

WIth latest 14548 build overlay still gets mounted to tmp (flashed both from recovery AND from latest snapshot).

With latest snapshot (14548) overlays gets mounted properly, settings are retained on reboot, BUT even tough wireless settings are accepted and saved (and kept on reboot) not one of my devices finds the SSIDs (ESSID is not hidden). Again flashed both from recovery and from LUCI numerous times...

Back to 12255 for now, is it odd that even after numerous flashes as per above (without keeping settings), going back to 12255 my old (12255) settings/config is automatically restored (without a back-up restore step)? Is it possible that parts of my flash are not getting wiped on re-flashed images?

1 Like

Well I just did another test with one of my units and the latest OpenWrt SNAPSHOT r14548-620f9c7734 + luci and settings are properly saved after reboot with this build. Wifi also seems to work fine.
You have to make sure you set the right country code under the advanced settings tab (at least for 5G). If i don't set the correct country code I can only use the default (preset) channel for 2.4 + 5GHz and ofc no DFS-channels @5GHz are working without setting the correct country code.
There must be some issue with the optimized build of that is causing some? units to loose all settings after reboot. We just have to find out what exactly is causing this issue and I'm sure it can be fixed.

@Bartvz
If I remember correctly you don't own the DIR860L-B1 anymore but if you want I could send you one of my units for testing.

3 Likes

Same results here.
For some unknown reasons Optimized builds are installing in different memory addresses and lose settings after reboot.
Installing from LuCI, from Dlink recovery or from command line don't fix the issue.

The clean Snapshot (same version of optimized build) keeps the setting after reboots.

I lauched cat /proc/mtd in both clean snaphot and Optimized build:

clean Snapshot + luci 
OpenWrt SNAPSHOT, r14548-620f9c7734
 -----------------------------------------------------
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00004000 00010000 "u-boot-env"
mtd2: 00004000 00010000 "radio"
mtd3: 00008000 00010000 "factory"
mtd4: 00010000 00010000 "defaults"
mtd5: 00fb0000 00010000 "firmware"
mtd6: 0026ffc0 00010000 "kernel"
mtd7: 00d40000 00010000 "rootfs"
mtd8: 00a90000 00010000 "rootfs_data"



optimized build:
 OpenWrt SNAPSHOT, r14548-620f9c7734
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00004000 00010000 "u-boot-env"
mtd2: 00004000 00010000 "radio"
mtd3: 00008000 00010000 "factory"
mtd4: 00010000 00010000 "defaults"
mtd5: 00fb0000 00010000 "firmware"
mtd6: 0024ffc0 00010000 "kernel"
mtd7: 00d60000 00010000 "rootfs"
mtd8: 00440000 00010000 "rootfs_data"
root@OpenWrt:~# 
2 Likes

Snapshot r14548 seems to run fine for me (current uptime ~2 days) without any shown problems in system or kernel log.
At the beginning I had a issue with 2.4GHz Wifi (constant hardware resets in syslog where the radio1 couldn't recover on its own) but a cold reboot fixed it and and the issue didn't came back since.

Has anyone with a DIR-860L and vlans made a successfull switch from swconfig to DSA? I still haven't found a solid guide that shows me howto convert swconfig into DSA and my main router (WRT3200ACM) + DIR-860L (smart switch + Wifi AP), so I still use older builds with swconfig for my productive network enviroment and I feel like that this has to change in the near future If I want to stay "up-to-date"...

1 Like

Try again with commit b59d5c8f0eebb6d15d7cefe487c17fad0ee4a524! :wink:

mediatek: rewrite flow offload code

The code is now much cleaner and works better than the old code.
Preparation for submitting it upstream (though with a different API)
Also add back MT7621 support and fix flow table coherence issues on
MT7622

Signed-off-by: Felix Fietkau <nbd@nbd.name>

From target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch:

Only supports IPv4 for now

2 Likes

Is that a Patch for Software or Hardware Flow offloading ?

Dunno, but hardware flow offloading doesn't work with it. :frowning:

@dchard just tested and reported it in another topic.

1 Like

I think it has to do with kernel size. The kernel size of my build is bigger and thus different addresses need to be used. Mt7621 uses LZMA-loader and thus bigger kernels should not be a problem. This was a problem since kernel 5.4 was to big and this was fixed using previous mentioned method. However, it seems it is not completely fixed :sweat:

Kind offer but I do not have a lot of time to tinker around with one due to work and personal life :confused: However, if it does not cost an arm and a leg, it is good to have one. I am located in the Netherlands, could you pm me the shipping costs?

A patch for both but it looks like it does not fix HW flow offloading. Since it is being upstreamed, I expect a "few" revisions :wink:

For the people wanting to test themselves, r14728

1 Like

"De-optimizing" (:sweat_smile:) r14728's config.buildinfo with the following patch allowed me to keep settings during reboot and sysupgrade.

--- diffconfig-bartvz	2020-10-21 09:08:13.386180513 +0200
+++ diffconfig-bartvz-xabolcs	2020-10-21 15:28:38.259292006 +0200
@@ -2,38 +2,28 @@
 CONFIG_TARGET_ramips_mt7621=y
 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_dlink_dir-860l-b1=y
 CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mir3g=y
 CONFIG_DEVEL=y
 CONFIG_TOOLCHAINOPTS=y
 # CONFIG_DROPBEAR_ED25519 is not set
 CONFIG_ETHTOOL_PRETTY_DUMP=y
-CONFIG_FSTOOLS_OVL_MOUNT_COMPRESS_ZLIB=y
 # CONFIG_GCC_USE_VERSION_8 is not set
 CONFIG_GCC_USE_VERSION_9=y
 CONFIG_GCC_VERSION="9.3.0"
 CONFIG_GCC_VERSION_9=y
 # CONFIG_GDB is not set
 CONFIG_GNUTLS_ALPN=y
 CONFIG_GNUTLS_ANON=y
 CONFIG_GNUTLS_DTLS_SRTP=y
 CONFIG_GNUTLS_HEARTBEAT=y
 CONFIG_GNUTLS_OCSP=y
 CONFIG_GNUTLS_PSK=y
-# CONFIG_KERNEL_BLK_DEV_THROTTLING is not set
 CONFIG_KERNEL_BUILD_USER="openwrt"
-# CONFIG_KERNEL_CFS_BANDWIDTH is not set
-CONFIG_KERNEL_CGROUP_DEVICE=y
-CONFIG_KERNEL_CGROUP_FREEZER=y
-CONFIG_KERNEL_CGROUP_NET_PRIO=y
-# CONFIG_KERNEL_MEMCG_SWAP is not set
-CONFIG_KERNEL_MIPS_FPU_EMULATOR=y
-CONFIG_KERNEL_MIPS_FP_SUPPORT=y
-CONFIG_KERNEL_NET_CLS_CGROUP=y
 CONFIG_LUCI_SRCDIET=y
 CONFIG_OPENSSL_ENGINE=y
 CONFIG_OPENSSL_OPTIMIZE_SPEED=y
 CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=y
 CONFIG_OPENSSL_WITH_ASM=y
 CONFIG_OPENSSL_WITH_CHACHA_POLY1305=y
 CONFIG_OPENSSL_WITH_CMS=y
 CONFIG_OPENSSL_WITH_DEPRECATED=y
@@ -203,12 +193,9 @@
 CONFIG_PACKAGE_usb-modeswitch=y
 CONFIG_PACKAGE_usbreset=y
 CONFIG_PACKAGE_usbutils=y
 CONFIG_PACKAGE_wget=y
 CONFIG_PACKAGE_wireguard-tools=y
 CONFIG_PACKAGE_wpad=y
 # CONFIG_PACKAGE_wpad-basic-wolfssl is not set
 CONFIG_PACKAGE_zlib=y
-CONFIG_TARGET_OPTIMIZATION="-O2 -pipe -mno-branch-likely -mips32r2 -march=1004kc -mdsp -mmt -mno-mips16"
-CONFIG_TARGET_OPTIONS=y
-# CONFIG_USE_MIPS16 is not set
 # CONFIG_WPA_WOLFSSL is not set

Kernel is still big enough: 2490304 bytes == 0x0025ffc0 (as in the mtd6 row of /proc/mtd)

3: System Boot system code via Flash.
## Booting image at bfc50000 ...
addr:80500000
We have SEAMA, Image Size = 2490304
Verifying Checksum ...
Uncompressing SEAMA linux.lzma ... OK
## Transferring control to Linux (at address 00000000) ...
## Giving linux memsize in MB, 128

Starting kernel ...



OpenWrt kernel loader for MIPS based SoC
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80001000...
.
.
.
[    0.900672] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    0.912388] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
[    0.922710] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.935365] Creating 6 MTD partitions on "spi0.0":
[    0.944917] 0x000000000000-0x000000030000 : "u-boot"
[    0.956064] 0x000000030000-0x000000034000 : "u-boot-env"
[    0.967704] 0x000000034000-0x000000038000 : "radio"
[    0.978472] 0x000000038000-0x000000040000 : "factory"
[    0.989619] 0x000000040000-0x000000050000 : "defaults"
[    1.000934] 0x000000050000-0x000001000000 : "firmware"
[    1.013254] 2 seama-fw partitions found on MTD device firmware
[    1.024885] Creating 2 MTD partitions on "firmware":
[    1.034775] 0x000000000040-0x000000260000 : "kernel"
[    1.045715] 0x000000260000-0x000000fb0000 : "rootfs"
[    1.056753] mtd: device 7 (rootfs) set to be root filesystem
[    1.068169] 1 squashfs-split partitions found on MTD device rootfs
[    1.080503] 0x000000b80000-0x000000fb0000 : "rootfs_data"
 OpenWrt SNAPSHOT, r14731-b90a4a8e08
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00004000 00010000 "u-boot-env"
mtd2: 00004000 00010000 "radio"
mtd3: 00008000 00010000 "factory"
mtd4: 00010000 00010000 "defaults"
mtd5: 00fb0000 00010000 "firmware"
mtd6: 0025ffc0 00010000 "kernel"
mtd7: 00d50000 00010000 "rootfs"
mtd8: 00430000 00010000 "rootfs_data"
root@OpenWrt:/#

@Bartvz, looks like there is no problem with the kernel size, but with the config.buildinfo parameters.

This is what @Kherby referred to.

2 Likes

Heh :sweat_smile:
New build is cooking with changes to config.buildinfo

Edit: And the new build failed spectacularly :sweat_smile:
Rebuilt the build environment and compiling again, stay tuned.

Edit 2: Second attempt and the same result. Back to square 1 and add my modifications one by one :confused:

6 Likes

Thanks, much appreciated.
I reverted back to stock for the time being, WiFi appears to be solid (both 5G&2G), downside is severely limited firmware though...

1 Like

New testing build is out, r14858. Problem turned out to be a compiler flag. Mostly upstream changes (newer kernel).

2 Likes

6 downloads and no comments. Looks like it is a sound build. @Axl_Mas @xabolcs is it possible for you to install and keep settings?

Thanks for the build, have not had the time to test it yet but will do this week and revert back.

1 Like

I confirm.
Settings and files are persisted across reboots.

BusyBox v1.31.1 () built-in shell (ash)                                                                                 
                                                                                                                        
  _______                     ________        __                                                                        
 |       |.-----.-----.-----.|  |  |  |.----.|  |_                                                                      
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|                                                                     
 |_______||   __|_____|__|__||________||__|  |____|                                                                     
          |__| W I R E L E S S   F R E E D O M                                                                          
 -----------------------------------------------------                                                                  
 OpenWrt SNAPSHOT, r14858-229623e310                                                                                    
 -----------------------------------------------------                                                                  
=== WARNING! =====================================                                                                      
There is no root password defined on this device!                                                                       
Use the "passwd" command to set up a new password                                                                       
in order to prevent unauthorized SSH logins.                                                                            
--------------------------------------------------                                                                      
root@OpenWrt:/# cat /proc/mtd                                                                                           
dev:    size   erasesize  name                                                                                          
mtd0: 00030000 00010000 "u-boot"                                                                                        
mtd1: 00004000 00010000 "u-boot-env"                                                                                    
mtd2: 00004000 00010000 "radio"                                                                                         
mtd3: 00008000 00010000 "factory"                                                                                       
mtd4: 00010000 00010000 "defaults"                                                                                      
mtd5: 00fb0000 00010000 "firmware"                                                                                      
mtd6: 0024ffc0 00010000 "kernel"                                                                                        
mtd7: 00d60000 00010000 "rootfs"                                                                                        
mtd8: 00560000 00010000 "rootfs_data"                                                                                   
root@OpenWrt:/# df -h                                                                                                   
Filesystem                Size      Used Available Use% Mounted on                                                      
/dev/root                 8.0M      8.0M         0 100% /rom                                                            
tmpfs                    59.7M    336.0K     59.3M   1% /tmp                                                            
/dev/mtdblock8            5.4M    288.0K      5.1M   5% /overlay                                                        
overlayfs:/overlay        5.4M    288.0K      5.1M   5% /                                                               
tmpfs                   512.0K         0    512.0K   0% /dev                                                            

1 Like