NanoPI R6S with OpenWRT

I managed to fix my R6S, now it can boot from SD card.
I guess I somehow messed up the "MiniLoader"?

I followed the procedure listed in the wiki:
https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S#Option_3:_Install_OS_via_USB
Start from step 4.5.3.3.1 to step 4.5.3.3.3 (Option 1).
During step 4.5.3.3.3, instead of a .img file, I instead flashed the MiniLoaderAll.bin file download from here (this URL is listed in the wiki).

Though there is still no HDMI output. Is this normal?

Is anybody here running the latest openwrt firmware for nanopi r6s. If so do you guys have an optimized cpu file so I can run cake at higher speeds. The default smp affinity file doesn’t cut it. I’d greatly appreciate it.

Also lately I’ve been having issues with the nanopi r6s. Before I can run 900 download with cake and get like 5-10 ms bufferbloat but now I get over 30-40ms. Idk if it’s the net smp affinity file but I even tried with openwrt rc2 and friendlywrt 23.05. Idk what’s been going on.

@Rome2 - https://forum.openwrt.org/t/nanopi-r6s-with-openwrt/167611/363?u=choppyc - Give thats a try, there is some further tweaks below this post.

Ahhh thanks. I will try it out tonight.

Check out NanoPI R6S with OpenWRT - #380 by choppyc in particular as well as the handful of posts preceding it (enable irqbalance and disable packet steering). I modified the core allocation slightly to leverage the higher frequency cores. Not sure if it really makes a difference.

friendlyarm,nanopi-r6s)
        set_interface_core 2 "eth0"
        set_interface_core 6 "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' \;
        ;;

Yes. For me it is anyway.

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

give that a try, puts the eth on the fastest last 2 cores and queues on other cores except core 1, which already has some processes fixed to it.

I think the biggest difference is using the 8125-rss and irqbalance personally.

1 Like

Do the RK3588 devices in mainline OpenWRT have working cpu frequency scaling now ? (Iv been using a pretty old build with some extra patches on top)

I'm not sure how reliable collectd-mod-cpufreq is, but per below it seems the clock frequency does change, but most (99.8%) of time it seems stuck at 1GHz (for the A55 cores) and 1.2Ghz (for the A76 cores). This is for OpenWrt 24.10-SNAPSHOT r28178-28de3ffefa with Kernel 6.6.63.

In the upstream Linux kernel (basic) support for HDMI on rk3588 based devices was merged in 6.13-rc1. See here for the patch submission wrt NanoPi R6C/R6S.

So those would need to be backported, but I'm not sure that's feasible and/or desirable. I have a vague recollection that is was not deemed desirable for OpenWrt? Which makes sense IMO as you'd need to enable the whole graphics stack.

Just sysupgrade'd a Nanopi R6S from FriendlyWRT to openwrt-24.10.0-rc2 from the official repos. I am getting confused about the NIC names: eth0 seems to be the one sitting between eth1 and eth2, but it registers with 1Gbit and the two others register 2.5Gbit. If anyone figured out the interface names I would be grateful! Thanks

In OpenWrt 24.10 official it is as follows:

eth0: LAN2 1.0 Gbps
eth1: WAN 2.5 Gbps
eth2: LAN1 2.5 Gbps

I agree the numbering is not intuitive...

6 Likes

did the upgrade go ok? did you install to eMMC? or run from sd card?

The upgrade went fine. Device has been running my home network for 24h without issues. Performance is what you expect: saturate the 2.5G LAN link (bidirectional 2.35G) and WAN. Brilliant!
Only missing thing is HDMI and USB keyboard support. This would be so nice to have to debug the router whenever the network or firewall config goes wrong. I am happy recompiling everything myself if there is a HOWTO explaining how to get HDMI/USB to work!

1 Like

Awesome! Did the sysuprade install to emmc?

Yes, straight to EMMC, from a previous version of OpenWRT. Device is booting really fast from EMMC, working great.

1 Like

Warning: Spectulation ahead

From the CNX article:

This section is not coming from Collabora, it’s just some information I got from a few trustee third parties and some speculation. It should be taken with a grain of salt, and I’ll update it if I get feedback from Rockchip or companies using RK3588. I was told Rockchip no longer considers RK3588 to be an “open source” chip. In practice, that means Rockchip no longer contributes RK3588 code to open-source projects (not sure when the TF-A code mentioned above was released) and they also decided not to sell RK3588 directly to SBC vendors. The latter is not a big issue, since they may be able to source chips from resellers, but it may increase prices. You may also have read that Joshua Riek who worked on Ubuntu Rockchip decided to take a break. While the reason given is mostly burnout and lack of funding, what we are discussing here may potentially explain why he was not able to get access to the Rockchip SDK.

1 Like

Hi,

I am running OpenWRT snapshot:

root@np2:~# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r28363-f10ee1e209'
DISTRIB_TARGET='rockchip/armv8'
DISTRIB_ARCH='aarch64_generic'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r28363-f10ee1e209'
DISTRIB_TAINTS=''
root@np2:~#

I have noted kernel panic in last 5 days:

root@np2:~# dmesg -T
...
[Mon Dec 23 10:01:25 2024] Unable to handle kernel paging request at virtual address ffff00010be6aa2c
[Mon Dec 23 10:01:25 2024] Mem abort info:
[Mon Dec 23 10:01:25 2024]   ESR = 0x0000000096000021
[Mon Dec 23 10:01:25 2024]   EC = 0x25: DABT (current EL), IL = 32 bits
[Mon Dec 23 10:01:25 2024]   SET = 0, FnV = 0
[Mon Dec 23 10:01:25 2024]   EA = 0, S1PTW = 0
[Mon Dec 23 10:01:25 2024]   FSC = 0x21: alignment fault
[Mon Dec 23 10:01:25 2024] Data abort info:
[Mon Dec 23 10:01:25 2024]   ISV = 0, ISS = 0x00000021, ISS2 = 0x00000000
[Mon Dec 23 10:01:25 2024]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[Mon Dec 23 10:01:25 2024]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[Mon Dec 23 10:01:25 2024] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000003e76000
[Mon Dec 23 10:01:25 2024] [ffff00010be6aa2c] pgd=18000002ffff8003, p4d=18000002ffff8003, pud=18000002ff879003, pmd=18000002ff819003, pte=006800010be6a707
[Mon Dec 23 10:01:25 2024] Internal error: Oops: 0000000096000021 [#4] PREEMPT SMP
[Mon Dec 23 10:01:25 2024] Modules linked in: pppoe ppp_async nft_fib_inet nf_flow_table_inet wireguard pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_compat nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack libchacha20poly1305 iptable_mangle iptable_filter ipt_REJECT ipt_ECN ip_tables chacha_neon xt_time xt_tcpudp xt_tcpmss xt_statistic xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_ecn xt_dscp xt_comment xt_TCPMSS xt_LOG xt_HL xt_DSCP xt_CLASSIFY x_tables slhc sch_cake r8125(O) poly1305_neon nfnetlink nf_reject_ipv6
nf_reject_ipv4 nf_log_syslog nf_defrag_ipv6 nf_defrag_ipv4 libcurve25519_generic libchacha crc_ccitt sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact msdos ifb ip6_udp_tunnel udp_tunnel sit tunnel4 ip_tunnel tun ntfs autofs4 nls_utf8 nls_cp437 kpp fuse uas
[Mon Dec 23 10:01:25 2024]  fsl_mph_dr_of ehci_fsl gpio_button_hotplug(O) vfat fat
[Mon Dec 23 10:01:25 2024] CPU: 2 PID: 8969 Comm: kworker/u16:14 Tainted: G      D    O       6.6.67 #0
[Mon Dec 23 10:01:25 2024] Hardware name: FriendlyElec NanoPi R6S (DT)
[Mon Dec 23 10:01:25 2024] Workqueue: events_power_efficient nft_offload_exit [nf_tables]
[Mon Dec 23 10:01:25 2024] pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[Mon Dec 23 10:01:25 2024] pc : nft_offload_exit+0xcb0/0x55d4 [nf_tables]
[Mon Dec 23 10:01:25 2024] lr : nft_offload_exit+0xbf0/0x55d4 [nf_tables]
[Mon Dec 23 10:01:25 2024] sp : ffff800088c2bd00
[Mon Dec 23 10:01:25 2024] x29: ffff800088c2bd00 x28: ffff00010be6aa2c x27: ffff000106bfd2f0
[Mon Dec 23 10:01:25 2024] x26: ffff0001057e8b40 x25: ffff000106bf5378 x24: 000000000000040c
[Mon Dec 23 10:01:25 2024] x23: ffff000101f3c000 x22: 0000000000000010 x21: ffff000106bfd378
[Mon Dec 23 10:01:25 2024] x20: ffff00010be6aa54 x19: ffff00010be6aa20 x18: 0000000000000000
[Mon Dec 23 10:01:25 2024] x17: 000000040044ffff x16: 000000b2b5503510 x15: 0000000000000000
[Mon Dec 23 10:01:25 2024] x14: ffffffffffffffff x13: 0000000000000030 x12: ffff000106bfd2f0
[Mon Dec 23 10:01:25 2024] x11: ffff00010b000000 x10: ffff800088c2bd70 x9 : 000000000000513c
[Mon Dec 23 10:01:25 2024] x8 : 0000000000000000 x7 : ffff800088c2bd90 x6 : 0000000000000000
[Mon Dec 23 10:01:25 2024] x5 : 0000000000000000 x4 : ffff800088c2bd90 x3 : 0000000000000010
[Mon Dec 23 10:01:25 2024] x2 : ffff00010be6aa2c x1 : 00000001008c39b0 x0 : 00000001008c3985
[Mon Dec 23 10:01:25 2024] Call trace:
[Mon Dec 23 10:01:25 2024]  nft_offload_exit+0xcb0/0x55d4 [nf_tables]
[Mon Dec 23 10:01:25 2024]  process_one_work+0x178/0x2a4
[Mon Dec 23 10:01:25 2024]  worker_thread+0x35c/0x480
[Mon Dec 23 10:01:25 2024]  kthread+0x110/0x114
[Mon Dec 23 10:01:25 2024]  ret_from_fork+0x10/0x20
[Mon Dec 23 10:01:25 2024] Code: eb00003f 54fffa24 91003262 f9800051 (c85f7c40)
[Mon Dec 23 10:01:25 2024] ---[ end trace 0000000000000000 ]---

I believe this is related with firewall4: update to Git HEAD (2024-12-18).

Maybe somebody can verify this error.

Has anyone encountered intermittent XHR timeout in luci? I have been getting it even when I was on friendlyWRT. Flashed RC4 last night and I am still having that issue. No ping drops to the device but somehow getting that XHR timeout issues. I dont see anything suspect in the logs as well

already have uhttpd connection reuse set to 0. But :frowning: