NanoPI R6S with OpenWRT

Can you safely upgrade from friendlywrt 23.05.5 to 24.10 and keep all settings and installed apps in tact?

There is never 23.05.5 support on this device if I remember correctly??

Not on Official OpenWRT, but there are forks with 23.05 support.

Then they are not a compatible build and setting migration most likely will have problem.

Hey I figured out why I was having bad bufferbloat despite the tweaks. So this is how I had my set up configured. Eth1 is wan. Eth2 was for my Access point and then I had my gaming pc connected to eth0. Well eth1 and eth2 both use kmod-r8125-rss and eth0 uses the embedded driver which is st_gmac. With eth0 I couldn’t get bufferbloat minimized at 1400mbps. I would get huge download active spikes. So then I decided to switch my gaming pc from eth0 to eth2 thinking maybe it’s the driver. Well guess what..it was. The moment I switched to eth2 I got an A plus on bufferbloat tests with 0 increase in latency on both download and upload active. It is really weird that on openwrt release the R6S’s embedded driver for eth0 doesn’t behave well. For now I have stuck to eth2 but I would’ve rather much had my WiFi AP connected to that 2.5G port since I have many devices. But for the sake of performance for gaming I am sticking to eth2 for my gaming pc as that port handles bufferbloat extremely well and from what I’ve experienced. It is 100% the driver, at least for my R6S.

3 Likes

On the Friendlywrt version, there`s an option in the firewall named Full Cone Nat, how to we add that to the official version.
Also the scaling_governor has more option, how do we add those as well ?

Official OpenWrt does not support full cone NAT. You will need custom builds to enable it (this repo has an old patch for 22.03 just as reference - you can google it for more info).

About scaling governor, you can select different governors in OpenWrt official, but you will need to learn how to do your own builds and learn how to use make kernel-menuconfig, which will allow you to access the following CPU governor configurations such the options below as an example:

CPU Power Management -> CPU Frequency Scaling -> Default CPUFreq governor (schedutil)

BTW, why do you need a Full Cone NAT? IMHO it is a major security risk. If you need to expose any specific service on your LAN to the internet, just create a firewall port forward rule.

Thank you for the info.
Dont need it for general use, just when gaming. Ill probably do with port forwarding rule.

I have R6S with OpenWRT 24.10.1 installed on eMMC.

But from 32GB space only 100MB is being used.

When I installed OpenWRT I used this image:

friendlyarm_nanopi-r6s-ext4-sysupgrade.img.gz

from here

In the past when I used Intel NUC with SSD drive... I just removed drive and connected it to Linux PC to use gparted to expand ext4 partition. Everything was easy.

I can't remove eMMC drive from R6S so I was thinking that I will use Armbian for it.

But now is the part which I don't understand.

I can boot from microSD card with Armbian on it in following scenarios:

1 - eMMC is erased and is empty

2 - Armbian is installed on eMMC drive

3 - any FriendlyElec software (Android TV, Ubuntu, FriendlyWRT etc) is installed on eMMC drive

But when OpenWRT is installed - then I can't boot from microSD card.

My guess is that OpenWRT will ignore microSD slot during boot for some reasons which I don't understand. Please correct me if I'm wrong.

But... how can I today expand ext4 partition on eMMC drive of R6S from 100MB to larger size ???

Could someone please explain to me how to do it?

PS.

I also discovered that the only way to remove OpenWRT from R6S (as it keep ignoring microSD slot during boot) is to using OpenWrt GUI flasher - install FriendlyWRT and then gain option to boot R6S from microSD again.

But... I can't find a way to get access to ext4 partition with OpenWRT installed to expand it.

since Official OpenWrt u-boot cannot boot from SD - but why... ???

Will this be changed or fixed... ???

What is the reason to do this that way... ???

  1. You can remove OpenWrt from eMMC by erasing the SD bootloader in the eMMC (erasing the first 1MiB should suffice, but this command will erase the first 16MiB to be sure: dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=16
  2. Read this or this to learn how to expand ext4
  3. OpenWrt SD card bootloader does not support booting from SD when flashed to eMMC. To change this, either you can make this change by yourself and submit it to OpenWrt, or wait for someone else to do this. This is how open source works.
  4. A much simpler solution is doing what I am doing. Install and boot OpenWrt from SD card (squashfs), install block-mount (see here), format eMMC with ext4 and mount it in OpenWrt. Then you should have the full eMMC size to store anything you would like.
OpenWrt booted from SD card with eMMC mounted on /mnt/emmc using block-mount
root@router:~# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0          7:0    0 498.1M  0 loop /overlay
mmcblk1      179:0    0  28.9G  0 disk
└─mmcblk1p1  179:1    0  28.9G  0 part /mnt/emmc
mmcblk1boot0 179:32   0     4M  1 disk
mmcblk1boot1 179:64   0     4M  1 disk
mmcblk0      179:96   0  29.7G  0 disk
├─mmcblk0p1  179:97   0    16M  0 part
└─mmcblk0p2  179:98   0   512M  0 part /rom

Thank you for detailed answer. I appreciate your time.

I have 2 x R6S - first one as OpenWRT router. Second one for tests. So I'm doing some experiments to learn more about this device. This is my first ARM adventure.

1 - the worse case scenario - OpenWRT is dead but bootloader is still there. So I can't access eMMC in any way to erase the beginning of eMMC to be able boot from microSD.

I tried today FriendlyElec software and MASK mode. I established connection between PC and R6S but no matter what I tried to do I got error as result.

  1. Thanks... I will read this and try to do it.

  2. So... from what I understand... the problem is well known as it was discussed in this thread. I don't have skills to do the change myself. But I can help with testing some solutions as I have spare R6S now. This is the only way that I can contribute.

  3. Nice idea... I was thinking to use Kingston Industrial grade microSD cards. I have few of them in certain devices already. Even with ext4 OpenWRT that card should last for decades. So I would go for ext4 and this would make much easier for me to expand the ext4 partition.

Now the whole question (or more like guessing) is

Will someone fix the problem and one of next updates will let me boot from microSD with OpenWRT installed on eMMC?

or... I will order 16GB microSD card industrial grade from Kingston.

This is less elegant solution but... is cheap... is taking minimum time... is solving all the problems.

One more time... thank you for your answer. Now I have few more options to check.

I think many users of R6S will be disappointed. Because for now they can find lots of knowledge and discussion in one place.

Maybe better option would be to ask admins of this forum to turn off notifications on your account for this thread.

Previous thread was closed today...

Time for new thread.

I like NanoPi R6S with OpenWRT.
I use it for over 1 year now. First with FriendlyWRT and for some time with OpenWRT.

Nothing is perfect...

There is one and I think serious and well known problem related to R6S and OpenWRT.

When OpenWRT is installed on eMMC then R6S will ignore microSD slot during boot.

Some people suggested to erase eMMC and install OpenWRT on microSD card.

I followed this idea to avoid problems in the future. Also in case of emergency have easier way to fix it.

First I used OpenWRT GUI to flash FriendlyElec. This restored the option to boot from MicroSD card.

Then I used Armbian to erase eMMC. Then flashed OpenWRT 24.10.1 to MicroSD card.
Kingston Industrial Grade MicroSD card 16GB.

Then after first start of OpenWRT I turned off R6S removed card... then connected it to PC with Linux and expanded user partition from 100MB to 14.5GB.

Then plugged card again to R6S and turned it on.

Now I feel more comfortable in case something bad will happen.

But... the pain is that nice 32GB eMMC internal drive is empty.

Does anyone knows that OpenWRT developers are aware of the problem... ???

Is there a plan to fix it in the future... ???

I'm just curious what we can expect in the future.

TLDR

Isn't it a boot loader issue?

Are you sure they share your view of it being a problem?

The problem only exist when OpenWRT is installed on eMMC.

Problem don't exist when FriendlyWRT, or any other software from FriendlyElec or Armbian is installed on eMMC.

This is what I would like to know...

It would be great to hear OpenWRT developers voice and statement about the situation.

are they aware of the situation... and do they see a problem with it...

Because for now if someone will install OpenWRT on eMMC and then something will go wrong.

It may be difficult to erase bootloader from eMMC for some people to restore option to boot from MicroSD card again.

So I decided to move my OpenWRT from eMMC to MicroSD card.

But like I mentioned above... I would be more happy using eMMC and having option to boot from MicroSD card in case of emergency.

The "problem" that I described above... is not a problem if you know how to deal with it.

The "problem" after installing OpenWRT to eMMC - no more boot from MicroSD

I did experiment on my spare R6S.

I installed OpenWRT 24.10.1 to eMMC of R6S. Then tried to boot from Armbian on MicroSD card. It didn't work as every time I tried R6S ignored card and started from eMMC.

Then I followed steps from this tutorial:

It was relatively easy... I erased eMMC drive on my R6S and then I was able to boot from MicroSD card with Armbian.

So... the "problem" is not the problem anymore.

You can install OpenWRT to eMMC drive (but it will use only 100MB) then if something will go wrong... just follow the steps from tutorial and you will erase eMMC drive and will be able boot from MicroSD again.