Flash OpenWRT to NanoPi R5S without EFlasher

Recently bought a FriendlyARM NanoPi R5S with 4GB RAM to replace the router and firewall functions of GL.iNet GL-MT6000 (Flint 2) that has 1GB RAM only. FriendlyARM provides FriendlyWRT official image, a fork of OpenWRT. I prefer OpenWRT official image for a vanilla experience.

The easiest way to flash OpenWRT is to use EFlasher utility provided by FriendlyARM, but dd actually works just fine. I found this R6S post to be useful as the guide is also applicable to R5S.

Download and flash OpenWRT to SD card.

curl -LO "https://downloads.openwrt.org/releases/25.12.6/targets/rockchip/armv8/openwrt-25.12.6-rockchip-armv8-friendlyarm_nanopi-r5s-ext4-sysupgrade.img.gz"
gunzip -c "openwrt-25.12.6-rockchip-armv8-friendlyarm_nanopi-r5s-ext4-sysupgrade.img.gz" | sudo dd of=/dev/sdaX bs=1m

Insert the SD card to R5S to boot up OpenWRT. SSH into R5S, download and flash OpenWRT to eMMC (“/dev/mmcblk1”). SD card is identified as “/dev/mmcblk0” in OpenWRT.

curl -LO "https://downloads.openwrt.org/releases/25.12.6/targets/rockchip/armv8/openwrt-25.12.6-rockchip-armv8-friendlyarm_nanopi-r5s-ext4-sysupgrade.img.gz"
gunzip -c "openwrt-25.12.6-rockchip-armv8-friendlyarm_nanopi-r5s-ext4-sysupgrade.img.gz" | sudo dd of=/dev/mmcblk1 bs=1m

df -h shows the eMMC root partition (/dev/mmcblk1p2) is only ~150MB not 16GB, so the partition needs to be expanded. resize2fs may prompt to fix partition alignment, proceed with it.

“/dev/mmcblk1p1” is the boot partition, leave it as is.

apk update
apk add parted resize2fs
resize2fs /dev/mmcblk1p2

df -h should now show the root partition is 16GB.

Remove the SD card and reboot. R5S should now boot OpenWRT from the eMMC.