NanoPI R6S with OpenWRT

Thank you.

This will help a lot.

Where can I find list of packages with info what they are doing to help me decide do I need them or not?

or maybe more simple solution

What is the core list of packages which should I include in this custom build?

Then over time I will add more packages if I will need them.

Thanks for the explanation. Can you also tell me how to build OpenWrt for R6s without IPv6?

1 Like

The core package list is specified in the firmware selector.

  • mtd is not applicable afaict so that can be dropped.
  • ubootenv-tools too as you have to be pretty sophisticated in order to use it.
  • ppp/ppp-mod-pppoe depends on your internet provider.
  • odhcp6c odhcpd-ipv6only if you do not use IPv6 locally.

But what you want to add is entirely up to you:

  • try the mj22226 build to figure out what you want. But then not every package is available here, although most of it is. Multiple sdcards come in pretty handy.
  • try software from the web interface or the package table

Removing IPv6 is not possible afaik because its heavily integrated, but you can:

  • remove these package: odhcp6c odhcpd-ipv6only
  • remove the interface: wan6
  • there should be a thread on this board about that, so you could search for that.
2 Likes

Thank you very much.

I will try it in next few days.

I already tried mj22226 build but they are fully loaded. Also noticed that I had much higher temp than comparing to latest builds from device maker.

I managed to remove some packages from device maker build. But I would feel much better having official OpenWrt build installed.

So... will try it in next few days.

Thanks again.

Thanks to your help I managed to create firmware for my FriendlyARM NanoPi R6S.

I have Luci working, Internet is also working.

I created very light version... but will need to add a few things.

So far I'm experimenting on micro SD card.

Will have to make list of packages which I need and try to make new build.

But now I understand how it work.

Many thanks for help.

Very good, have fun :wink:

Oh almost forgot to mention this, but SNAPSHOT builds are always under development so there will be a time when the ASU server does not work. You'll get a message like this:

ERROR: Build failed with status 500
The above errors are often due to the upgrade server lagging behind the
build server, first suggestion is to wait a while and try again.

Therefore I suggest when using OWUT/ASU that besides backing up up your settings, that you download and save a build. If a card gets corrupted or something else is messed up, you can always go back to that build. Instead of waiting a while for ASU to get fixed. I've been there and its not a fun place to be.

( Looking at your device, wondering: "why in the hell did I just press that [enter] key" :sweat_smile: )

2 Likes

Can I flash OpenWrt on both eMMC and SD card, then configure the boot order so that eMMC boots first?

I am not sure if R6S boot priority follows the same model of R5S (which also has eMMC).

In R5S, eMMc alwas has priority. So if you have a boot loader in eMMC, it will boot from eMMC even if you have a bootable SD card inserted. In this situation, in R5S it is possible to boot from the SD card by keeping the MASK button pressed while connecting the power supply.

I am not sure if R6S follows suit. You may want to check this thread, it seems that someone had to connect a UART to recover from a bad eMMC flash with R6S.

1 Like

Have you figured out how to boot from an SD card? I've been unable to boot an image on an SD card (even friendlywrt's rk3588-sd-friendlywrt-23.05-docker-20241112.img.gz). I've tried holding down the mask button while powering up, but I get a solid SYS light that never blinks and can't ping the device. I could try https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S#Unbricking_Method to install a friendlywrt image to eMMC and then try booting from an SD card and/or go nuts and try Locked out of device - #10 by thisisliam, but that seems a bit overkill.

FYI that I have mj2226's firmware installed on eMMC.

Ultimately I'd like to run a snapshot build but am nervous to go strait to eMMC without first testing via an sd card.

You can clear out the eMMC using the dd command. I also had this problem where if mainline OpenWrt U-Boot is installed on the eMMC, it completely ignores the SD card unless it fails to boot. By clearing the partitions OpenWrt is installed in, the problem resolved for me. In my case it was in /dev/mmcblk2p1-2 and I used dd if=/dev/zero of=/dev/mmcblkp2p1 bs=8M count=1 to clear out the OpenWrt installed in the eMMC. After doing this I was able to boot from the SD card I plugged into the device.

4 Likes

Nope, I actually emailed FriendlyElec about this and their response is (translated from Chinese):
"if you use our official builds, then you can boot from SD card. Otherwise, you situation might vary. In any case, you can rescue a bricked machine with the procedure documented in the wiki"

1 Like

In my case /dev/mmcblkp2 gave an error, so I tried both /dev/mmcblkp0 and /dev/mmcblkp1, rebooted and it worked, not sure which was correct (I am now able to boot from SD card again).

Anyway, is there anyway to configure OpenWrt U-Boot to prioritize booting from SD if one is present? This is the default behavior of OEM FriendlyWrt and it is pretty useful.

I would like to keep my stable configuration in eMMC, but when a new OpenWrt version is available, I would like to boot from SD to try it out before moving to eMMC.

With the current official OpenWrt U-Boot this is not possible...

Installing OpenWrt with the emmc friendlywrt tool will retain the ability to boot from the SD card, using dd to install it will remove that behavior.

2 Likes

This in particular, right? https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S#Flash_third_party_OS_.28Image_file.29_to_eMMC

Interesting, thanks. It seems that FriendlyWrt eMMC flash tool does replace the OpenWrt u-Boot.

Do you know if this behavior (ability to boot from SD with OpenWrt installed this way in the eMMc) will survive a sysupgrade?

I think this is possible by editing the boot.scr file in the kernel partition of the eMMC (which is typically root partition number - 1). However I have no experience doing that and not really sure about the consequences. Perhaps there's a more feasible way?

For now the best solution is what @antoncycle mentioned, which is flashing official OpenWrt image to eMMC using OEM FriendlyELEC flash tools instead of dd.

I have not tested this approach yet, since my initial test was done flashing OpenWrt with dd, which disabled booting from SD (I had to erase eMMC via dd to be able to boot from SD again).

Which is exactly the reason for me not to use FriendlyElec's tools. I'd still be using their software. Who knows what it does ?

So I have a couple of sd-cards. My main card, a backup and two testers. I leave the emmc alone until the first stable is out. No need for me to press any button at all. I'm just swapping cards.

Besides you can always go in over the debug port using screen. This thing is almost impossible to brick imo.

That being said, I would very much have that feature brought into the next release. So we can use the mask button and user button. They are completely useless right now :smile:

2 Likes

Good points. I believe I will keep running OpenWrt (official) from an SD card for now.

Hopefully in the future OpenWrt u-Boot will support booting from SD if installed in the eMMC.

Just purchaed a R6S, arrives in a 2 weeks, hows the openwrt snapshot perfomance? any noticeable bugs?

Anyone using it with FriendlyWRT? worth using it and waiting for offcial openwrt?

I have 1Gb/1Gb internet, id like Adguard Home, Wiregaurd and SQM.

coming from opnsense with proxmox, im new to OpenWRT. If openwrt is recommended for the R6S, do i create a custom snapshot build from here, https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=rockchip%2Farmv8&id=friendlyarm_nanopi-r6s burn the ext4 to sd card and boot the R6S with the sd card to install it to eMMC?

thanks