Dynalink DL-WRX36 Custom Image & Kernel

Basically I'm checking how to make a custom build for the DL-WRX36.

It caught my attention the kernel_menuconfig that has a lot of knobs. Personally I'm looking to make a build that just uses the hardware at maximum extent without going for power consumption.

The DL-WRX36 is a Qualcomm IPQ8072A, ARM Cortex-A53 processor (from 2012 lol how time flies).

Are any Kernel options that should be added? I guess the NEON and Crypto extensions, but that's it.

What about the config?

Basically, I'm heavy user of light network storage:

  • SMB4
  • USB Storage
  • USB Hub capabilities.
  • Transmission
  • Adblock
  • VPN (OpenVPN, WireGuard, and L2TP/IPSec. Yep, the three).
  • LXC (containers. You wouldn't believe the amount of crazy things you can run on OpenWRT without its blessing).

VPN is mainly to use the router DNS, which in turn adblocks.

I can get the gist of this on the menuconfig, but on the kernel_menuconfig I don't know if I could gain some advantage by integrating something more into the kernel or tweak some parameters.

Gonna leave my kernel config (found at openwrt\build_dir\target-aarch64_cortex-a53_musl\linux-ipq807x_generic\linux-5.15.137).

Does this thread help?

I know this thread is a couple months old, but I spent a lot of time figuring out how to get the most out of the dynalink WRX36 hardware, so Ill give a few pointers (if nothing else for anyone else seeing this thread in the future).


COMPILE FLAGS: for target / kernel optimization flags, i use

-O3 -mcpu=cortex-a53+crc+crypto+rdma

This uses all (well, most) of GCC's optimizations, enables all the "performance oriented but not enabled by default" arm cpu extensions, and tells gcc to tailor the code specifically for the cortex-A53 and not to care if it runs on anything else.

Note: dont use -march=... or -mtune=... These will only serve to make the compiled code more "general", and will potentially avoid using some higher performance instructions in favor of being compatible with more CPU's. If you only care if it runs on the dynalink wrx36 then just use -mcpu.


KERNEL TWEAKS: I modify my kernel config in many ways, but here are a few that (i think) have a larger impact:

  • making the kernel fully preemptable
  • setting the interrupt timer to 1000 hz
  • enabling some of the hw offload capabilities in the "networking" configs
  • adding all the compatible hw accelerated crypto routines (everything except the ones labled "arm 8.2 crypto")

Warning: make kernel_menuconfig probably doesnt work the way you think/want it to work. See this thread for details, but basically if you just run

make kernel_menuconfig; make

your kernel is going to end up missing a bunch of stuff. At minimum run

make kernel_menuconfig target/linux/clean prepare; make

Even better still, use the script in the thread linked above.


NSS BUILDS: This isnt a well known fact, but the cortex-a53 isnt the only chip that can process data in the dynalink WRX36...there is a secondary "NSS" network processing unit (NPU) as well. Mainline openwrt doesnt really use this (yet), but thanks to the hard work of a few people it is quickly becoming possible to enable it.

See this thread for details.

it is still in "beta" but I just built a custom image with NSS enabled and almost everything works (still troubleshooting ksmbd and unbound). But cpu usage from maxing out my gigabit connection has been significantly reduced.

For example: previously running something like speedtest-netperf.sh on my gigabit connection would take up ~40% of the overall CPU time between the 4 cores, with CPU0 being constantly at >90% utilization. On the new NSS build it has dropped to ~13% overall utilization and <30% CPU0 utilization...a nearly 70% reduction in CPU usage for the same task!

When I get the last remaining kinks ironed out ill probably post a public release of the build. If you want to try yourself here are the .config and kernel .config's im using. clone this openwrt fork.


hope this info was is of use to you (or at least is useful to someone out there).

4 Likes

Great job @jkool702!

I think I will wait until the NSS build is out of the beta to create my own build. My WRX36 can't run any package (like transmission or aria2) and can't execute Docker either (for Plex Home Server).

Assuming you are talking about plex media server, you might be interested in this script I wrote to run plexmediaserver on armv7/armv8 openwrt routers like the dynalink wrx36. It runs plex without using docker, though does add a few other non-standard dependencies...youll likely need to install the following dependencies:

opkg update && opkg install unzip curl squashfs-tools-mksquashfs

Instead of using a docker image, it generates a squashfs image of everything plexmediaserver needs to run and saves it to the external HDD (here the plex library is). When you start plex this squashfs image is copoed over to the device's memory (under /tmp) and then mounted. This reduces total plex memory usage (data + runtime memory usage) to ~100 MB or so, which still leaves 90% of the wrx36's memory available for other stuff.

The script itself is an init.d service that handles everything, including setting up a UCI config automatically for you. To use it, save the linked script to /etc/init.d/plexmediaserver., e.g., by running

 wget -O /etc/init.d/plexmediaserver https://raw.githubusercontent.com/jkool702/openwrt-plexmediaserver/main/etc/init.d/plexmediaserver

Then mount the external drive that will hold the plex library. If the drive already has a plex library the scripot should automatically find it. If not, initialize one by running

mkdir -p ${PLEX_DRIVE_MNT_POINT}/.plex/Library

then run

service plexmediaserver update

and itll download and set everything up for you. You start/stop via

service plexmediaserver start
service plexmediaserver stop

By default it will automatically start on boot, but you can control this behavior via

service plexmediaserver enable
service plexmediaserver disable

I tried to automate it as much as possible so that 99% of the time you dont have to manually configure anything. If you fall into the other 1% you can manually tweak the UCI config values at /etc/config/plexmediaserver, though the script should correctly set these for you automtically.

Got it, I couldn't get my head around why running Plex as that was a good idea, but now I know.

I have plethora of nick-picks on the build, tho. For example, not using a Class C IP range, Adblock not running after WAN is up, and some other packages non-existing to be installed.

FYI - Ive just pushed an update to my custom dynalink wrx-36 build that is NSS enabled. Everything seems to be working quite well with it so far.