NanoPI R6S with OpenWRT

Personally I don't use FriendlyWRT (among many reasons it is a bloated build and it uses a package repository in China).

I am using 24.10 snapshot with the R6S (with Wireguard and AdguardHome) and it is pretty stable. The first 24.10.0-rc1 is about to be released tomorrow (2024-12-02), so I would recommend you starting with this build.

I never used OpenSense, so I cannot say much about it. OpenWrt may require some learning for advanced configurations, but IMHO it is worth (and can be fun!).

Regarding ext4 vs squashfs, I really prefer squashfs since it is more "SD friendly" (less wear). You may look here for more details.

Anyway, you can pick either the ext4 or squashfs image, image it to an SD and boot your R6S.

Notice that the R6S has 32GB of eMMC. It comes with FriendlyOpenWrt pre-installed in the eMMC, so if you start it without an SD card it will load FriendlyOpenWrt.

BTW, as far as I can tell eMMC will also take priority over SD card as a boot device. The default FriendlyOpenWrt u-boot will be loaded from eMMC, but it will check if there is an SD card and it will boot from the SD card.

What I did was to boot OpenWrt from the SD card (since FriendlyElec eMMC boot loader will check the SD card), and then I erased the eMMC so next time it will use OpenWrt boot loader from the SD card (see posts above in this topic for more details).

2 Likes

My recommendations:

  1. Buy a couple of 8gb industrial cards, they are super-cheap and rock-solid.
    ( but any micro sdcard will do that has a (10) )
  2. Clear the emmc (first 16mb iirc), so it will boot from sdcard by default.
  3. Create an image via the firmware-selector, save the webpage as pdf and save the images . Then you have something to fall back on. ( no router, no internet :wink: ) .
  4. Write the squashfs image to 2 sdcards, squashfs is much easier to reset , backup and restore .
  5. Setup a basic configuration, eg: password/public key, time/zone and network
  6. Create a backup, once accessible.
  7. Poweroff, swap cards.
  8. Perform a restore, so you get familiar with the process.
  9. Configure the rest of the router to your liking, and make a backup again.
  10. If you need to update or test something in the future, just swap out the card.

Once the mask button is implemented consider writing an image to the emmc. I found writing to emmc did not improve performance and was quite cumbersome without the buttons if I wanted to boot from sdcard.

image image

4 Likes

thank you! will Squashfs give me the full disk space on the SD card? what sie would you recommend? performance wise, i assume it runs ok from the sd card over the eMMC?

Amazing! thank you! il grab them sd cards.

when i create the image, the default shows:

apk-mbedtls base-files ca-bundle dnsmasq dropbear e2fsprogs firewall4 fstools kmod-gpio-button-hotplug kmod-nft-offload libc libgcc libustream-mbedtls logd mkf2fs mtd netifd nftables odhcp6c odhcpd-ipv6only partx-utils ppp ppp-mod-pppoe procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd kmod-r8169 luci

Are there any that I do not need or need to add?

No, I think you can only resize when you do a custom build. It would be a nice addition to the firmware-selector though. I made request here .

First of all, you can always add stuff later, so there is no need to be 100% accurate at this time.
That being said based on your wish-list, I'd say:

luci-proto-wireguard luci-app-sqm adguardhome

1 Like

thank you!

How do i go adding more space to the sd card build then? is it a command i need to run once the R6S is up and running? is the default size enough to run wireguard, AGH and sqm?

What I meant to say was: if you compile OpenWRT you can specify that option when running make config. But that's not available in the firmware-selector.

So I made a request to add that function to the firmware-selector.

2 Likes

For some reason my R6S simply refuses to boot from SD card: I tried FriendlyWrt images, the OpenWrt 24.10-rc2 image and Fedora ARM64 image, all failed. The R6S keeps booting the default FriendlyWrt image in eMMC.

Instead I flashed OpenWrt 24.10-rc2 image with the FriendlyWrt web UI, so far it seems to work. But the HDMI outputs no signal (I can access OpenWrt web UI though), is this normal?

1 Like

thank you! will Squashfs give me the full disk space on the SD card?

There is an available script at Expanding root partition and filesystem that will expand either ext4 or squashfs images. The page indicates it is for x86 target, but I have successfully used it on some ARM targets.

2 Likes

I couldn't get it working on squashfs.
In order to use the whole sd card space I followed instructions here https://openwrt.org/docs/guide-user/installation/installation_methods/sd_card

My regards

4 Likes

If im using they firmware builder to build 24.10.0-rc2, do I need to also run the CPU affinity fix? as below:

also, do i need software offloading on or off?

Thanks

You would need software offloading to be off and how does Waveform bufferbloat test look like without those optimizations?

1 Like

Personnaly im using kmod-r8125-rss (remove 8169) and add luci-app-irqbalance.

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

add the above to 40-net-smp-affinity under the r6s.

Software offloading off if using SQM, if not you can leave it on.

2 Likes

Dude. This performs so much better than what I had before. Thank you.

If anybody's interested, here's a github gist that contains the full set of packages I'm currently using for rc2 (largely based off of mj22226's builds) - https://gist.github.com/chase-miller/684a6ac7385791a0c5bad19722733d42

2 Likes

Thanks! can you add them lists of packages into the firmware builder for the RC2?

You can but you’ll likely get an error because there isn’t enough space on the default partition size. But you could give it a shot and see...I might be wrong.

1 Like

How do you remove the 8169?

thanks, yes it error-ed out lol

base-files busybox ca-bundle dnsmasq dropbear e2fsprogs firewall4 fstools kmod-gpio-button-hotplug kmod-nft-offload libc libgcc libustream-mbedtls logd mkf2fs mtd netifd nftables odhcp6c odhcpd-ipv6only opkg partx-utils ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd kmod-r8125-rss luci luci-app-irqbalance irqbalance

paste this into the installed packages on the firmware selector, its is basic packages you will need.

1 Like

@Antec I would also add -

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

into local startup

1 Like