NanoPI R6S with OpenWRT

Yes, it runs all cores at maximum clock speed. In my testing the R6S Performs better along with the other settings i have shared.

https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md

Theres a issue with cpufreq, which has been patched. Ive found Performance to work better.

2 Likes

Add the CPU Performance into Luci, System, Startup and Local Startup - Hes mine if it helps

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

# Enable IRQ Balance, Packet Steering and UPNP
uci set irqbalance.irqbalance.enabled=1
uci set network.globals.packet_steering=0
uci set upnpd.config.enabled=0

#CPU Performance GOVERNOR
find /sys/devices/system/cpu/cpufreq/ -name scaling_governor | while read GOVERNOR ; do echo performance > $GOVERNOR ; done
#find /sys/devices/system/cpu/cpufreq/ -name scaling_governor | while read GOVERNOR ; do echo schedutil > $GOVERNOR ; done

# Update list of available packages
sleep 30
/bin/opkg update

exit 0
2 Likes

Thanks for sharing!

1 Like

You can use find with awk:

find /sys/devices/system/cpu/cpufreq -name scaling_governor -exec awk '{print "performance" > "{}" }' {} \;

# find /sys/devices/system/cpu/cpufreq -name scaling_governor -exec cat {} \;
schedutil
schedutil
schedutil
# find /sys/devices/system/cpu/cpufreq -name scaling_governor -exec awk '{print "
performance" > "{}" }' {} \;`
# find /sys/devices/system/cpu/cpufreq -name scaling_governor -exec cat {} \;
performance
performance
performance
1 Like

thanks, how about: find /sys/class/net/eth*/queues/[rt]x-[01]/[rx]ps_cpus -exec sh -c '[ -w {} ] && echo ff > {} 2>/dev/null' ;

do i add that in the 40-net-smp-affinity under all the other r6s bits yes?

friendlyarm,nanopi-r6s)
	set_interface_core 2 "eth0"
	set_interface_core 4 "eth1"
	set_interface_core 8 "eth2"
	find /sys/class/net/eth*/queues/[rt]x-[01]/[rx]ps_cpus -exec sh -c '[ -w {} ] && echo ff > {} 2>/dev/null' \;
	;;

copy and paste in the file

1 Like

amazing thank you!

Well, thanks for the help, i finally have the R6S in use now, god knows how many times ive flashed the sd card with different combos of firmware lol

I had RC2 working but was getting weird dhcp issues, was random when a device would connect with an ip, other times nothing. In the end i gave up and flashed latest friendlywrt to emmc, working perfectly straight away. Im going to use this as a learning tool until a proper supported version of openwrt is out for it.

The R6S is an absolute beast at 5W at full load, i used the assymetrical fix from here: https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM as i have 1400/110, getting A+ on bufferbloat test.

next on the list to setup is Wireguard and adguard home.

For those who boots OpenWrt from SD card: how did you do it?

I have tried the following:
A1. Download the 24.10 rc2 squashfs image from the firmware selector, then flash it onto the SD card with balena etcher
A2. R6S does not boot from SD card: it boots from eMMC (FriendlyWrt) instead
(I can see the SD card in lsblk, so the card is not faulty)

B1. Wipe the eMMC with the de-bricking procedure documented in the FriendlyElec wiki
B2. Use the same SD card as above
B3. The device simply does not boot

C1. Install FriendlyWrt 23.05 directly to eMMC with a USB-A to USB-A cable (with FriendlyElec's utility software)
C2. Flash FriendlyWrt 23.05 SD card image, OpenWrt 24.10 rc2, mj22226's image and Armbian (Ubuntu server image) onto the SD card (in order)
C3. Only Armbian boots successfully; the others do not boot and the device boots from eMMC instead

BTW, I contacted FriendlyElec and they told me this (translated from Chinese):

For the R6S, it is not possible to boot from SD card even by pressing the MASKROM button (unlike older boards; Rockchip changed the implementation on the latest platforms). Pressing the MASKROM button while booting simply let you enter MASKROM mode for flashing/clearing the eMMC.

I had to unbrick via Windows and install friendlywrt via usb.

  1. https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S#Windows_Users
  2. https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S#Option_3:_Install_OS_via_USB

It’s possible that only the second step is required.

Hey folks, I have R6S with (customized / personalized / debloated / no chinese packages) FriendlyWRT 23.05 image on it and now that I see we have official support on 24.10 I wanted to understand what the current status is in terms of practical use.

  • You can use FriendlyElec's tools to install official OpenWRT onto the eMMC.
  • If I install OpenWRT this way, OpenWRT's u-boot will never consider booting from SDCard in present state and will go straight to boot from eMMC.
  • If I replace OpenWRT u-boot with FriendlyWRT u-boot, the update functionality from SDCard will be maintained (i.e. I can look into FriendlyWRT u-boot changes to see what's missing)?

If OpenWRT is installed to eMMC, can it be updated via Luci (like on routers with older chips)?

1 Like

Wondering this too, just purchased an R6S and disappointed to hear SD card booting may no longer be possible like it is on the R4S?

Yes it can

1 Like

Your understanding is correct. However I have not managed to use FriendlyWRT u-boot + OpenWrt official in eMMC.

What I did was to erase eMMC and boot an official OpenWrt image from SD. As you said, if official OpenWrt is flashed to eMMC, R6S will not boot from SD anymore. Anyway, as @chase-miller confirmed above, in this situation you will be able to update via LuCI or CLI sysupgrade.

1 Like

Thanks folks. btw. any reason why everyone is trying to use SD card booting instead of eMMC? Is it just stability problems right now (i.e. ability to fall back to FriendlyWRT if problems with OpenWRT)?

FriendlyWRT boot logic is here btw.: https://github.com/friendlyarm/uboot-rockchip/blob/nanopi6-v2017.09/include/configs/nanopi6.h#L33 ; just a script in u-boot.

Yes I did the same thing, erased eMMC so it will be forced to boot from SD card.

My reason: since Official OpenWrt u-boot cannot boot from SD, if you flash it to eMMC and for some reason the boot is corrupted, it will be a little harder to recover from this situation (contrary to the R5S that the MASK ROM could be used in this situation to ignore eMMC boot loader and force boot from SD, R6S MASK ROM does not work this way).

So booting from SD (with erased eMMC) is fail proof. In case the SD boot is corrupted, simply replacing the SD will solve the issue.

I have my R6S running how i like it now using Friendlywrt on the emmc.

ive got a backup of the config.

How much of the system does the backup actually restore? would I still need to install the additional apps ive added?

whats best way to do a system clone for ease of restoring back?

I just used Rufus to write the latest 24.10.0-RC2 image to an SD card and my R6S booted right in it with no issues.