Support for FriendlyELEC NanoPi R5S rk3566 SBC

Your current installation of 22.03.0-rc2 on the eMMC cannot be an official OpenWrt image. OpenWrt does not support the R5C/R5S in 22.03 or 23.05 stable, and has only recently added support in main snapshot (which incidentally means the next stable OpenWrt release will also support the R5C/R5S).

Do you know where the current OS flashed to your R5S came from? My guess is it is a custom compiled community fork of OpenWrt, but that is just a guess. Without knowing what you are actually running, it is hard to say what would be supported.

1 Like

Thanks for the reply. I set it up 2 years ago when I first got the R5S and don't remember where I got the image. Does this help? OpenWrt 22.03.0-rc2 r19374-34b6abf5a8 / LuCI openwrt-22.03 branch git-22.140.66268-ef99568

The firmware version is OpenWrt...., not FriendlyWrt..., so we should be able to rule out FriendlyElec having moved their eMMC tools from an unknown menu on your firmware to the location they now point to in their web instructions.

Best guess is that you grabbed the image from an OpenWrt community member who created an informal port of OpenWrt to the R5S. To install it the first time from the default FriendlyWrt image installed by the OEM, you would have had to go to their eMMC tools menu 2 years ago to flash the OpenWrt image.

If this is triggering your memory and sounds right, then you probably have an OpenWrt compatible image installed. FriendlyElec's image can sysupgrade to an OpenWrt image as well, so this is a pretty safe bet. In which case, you should be able to simply flash a current main snapshot image from the second menu shown in your post.

You cannot flash a 23.05.3 snapshot image - the R5S is not supported by OpenWrt stable yet. But you can flash a current main snapshot image. Save a backup of your configuration files as a guide. Then I recommend you get the main snapshot image from the firmware selector. Next click the "Customize installed packages and/or first boot script" drop down and add any packages you would like to be included before clicking the "Request Build" button. When it's done, download the squashfs image and flash it.

You will be asked if you want to keep your settings. Most likely you could, but I still don't recommend it. The reason is that you are upgrading from a two year old version, and upgrading to the snapshot release after a main stable release newer than what you are running. That is a lot of opportunity for there being changes to the default configuration files that may be necessary in the current snapshot version, so overwriting that with your two year old configuration files by keeping settings may not work out so well for you. Doubly so if you installed a community build two years ago - there is no telling if that build's configuration files are compatible with the current official OpenWrt main snapshot configuration files.

The safe option is to NOT keep your configuration, and then restore it manually using the backup you made as a guide (don't restore the backup, just refer to it in a text editor is what I mean by using it as a guide).

1 Like

Does this look normal? I'm thinking the previous image was EXT4. The R5S has 2GB RAM, 8GB eMMC

If this were your SD card, I would say go for it, but it is not. With the warning you are getting, and since it is your eMMC, better safe than sorry. Let's ask someone who knows far more about this than I do.

@anaelorlinski can you take a look at this and provide some counsel?

Also @1715173329 can help

1 Like

I already said that in my commit message.
For the first-time installation, simply write the uncompressed image to SD/eMMC using dd command.

2 Likes

All - helping a buddy setup is network with his router as the R5S (excellent performance by the way) and have an odd issue hoping for help:

  1. FriendlyWrt - works great, kernel 6.1, docker, samba, etc. The root fileystem comes expanded to use the full 32GB SD card and internal 32GB eMMC by default which is fantastic. It also has a LuCI page for copying SD to eMMC, and a great Docker page. Problem of course it's not official OpenWrt.

  2. OpenWrt - Docker page doesn't work and no LuCI page for eMMC. I know "dd" is a CLI solution, but we don't nickname it "disk destroyer" for nothing so hoping to avoid that.

Now for the main issue ---

On OpenWrt snapshot I can't expand root filesytem on SD or eMMC without completely trashing the drive. I tried this script on the wiki and it does nothing, not even after a reboot it isn't working for me.

Second, I tried these commands here, reading the script it doesn't look specific to his build, so used it on a snapshot. It completely trashed the SD card, making it unusable until reformatted. So DO NOT use those with a snapshot.

So, does anyone know how to expand root fs and storage on SD and eMMC with OpenWrt? I'm looking to avoid using FriendlyWrt. I'll update the R5S wiki once we figure this out.

Thanks in advance.

I use cfdisk to expand the root fs, basically for the snapshot you need
opkg install luci blockd block-mount mount-utils cfdisk fdisk
cfdisk /dev/mmcblk1 for eMMC, cfdisk /dev/mmcblk0 for SD card

Create a new primary partition from the 28.7G free space.

Format the new created partition as ext4

mkfs.ext4 /dev/mmcblk1p3

On the LuCI web interface mount the newly created partition on the overlay , save and apply, in case system hang reboot manually.

After reboot all previous packages installed need to be reinstalled if snapshot are used.

Sc4

2 Likes

Did you get this to work?
I use a Nano PI R6S, with the same issue, currently using Immortal Snapshot until Offical Openwrt release.

Yes @Ieo method above works on mine, however it's complex since it requires package reinstall like he said. This work around is messy compared to FriendlyWrt firmware which expands both by default. I'm thinking the right solution is the script on the wiki I linked above to expand the storage, but it isn't working for me.

Has anyone looked at or have any ideas about getting support for the NPU in openwrt?

My first guess is that you’d maybe need to use the bsp kernel; but haven’t seen folks doing that and before I dig too deep wanted to see if anyone had any ideas.

Wondering about this as well. I don't think the M.2 slot works in OpenWRT, but I am curious what distros support it. There must be some, Mcuzone doesn't tell.

I am using a similar card with MT7922 and it's not being recognized.

1 Like

I have the older version from you:

Kernel Version:5.15.118
Model:FriendlyElec NanoPi R5S
Architecture:ARMv8 Processor rev 0
Firmware Version:AO Build@2023.06.28

And I am looking to upgrade to the latest. I have seen and read what everyone does, but I want to know how you complete the upgrades on your deployment and keep a base configuration (if possible or recommended). I have a good part of configuration in the DHCP settings (static entries), using 4to6 for IPv6, AdGuardHome, 2.5G network ports and a few other things on an expanded EXT4 sd card. Not using the eMMC but would like to and also get the performance updates based on your build. Thanks in advance and for all your work!

I am not sure that sysupgrade would work with those images due to the size of partitions, I would advise to save /etc/config and restore it to the new image. Probably some software like adblockhome also store config in /etc

1 Like

I have noticed that the kmod-ath12k packages are missing from the snapshot rockchip builds ? Actually ath9k and ath10k are missing too ?

I can find firmware for ath12k-7850, but not the kmod-ath12k.

Or am I missing something simple ?

They are available for Mediatek and Raspberry Pi

Edit: Ah, I think it was fixed now - great! :slight_smile:

anyone have any new news about expanding the partition in 24.10?

https://openwrt.org/docs/guide-user/advanced/expand_root still doesn't seem to be the solution

I used @anaelorlinski his build on 23.0.5. Is this still needed , or can we use the default buid of openwrt right now of 24.10.0?

I don't see any update on github of de @anaelorlinski builds

24.10.0 has been running well on my R5C FWIW. I don't use ext4 images to create enlarged partitions - no need for my use case. I've been using squashfs images so that settings are retained on sysupgrade.

Also using 24.10, no problem so far.
I expanded squashfs to use the whole eMMC