# Support for NanoPi R2C?

**URL:** https://dietpi.com/forum/t/support-for-nanopi-r2c/6369
**Category:** Requests
**Created:** [25 February 2022 16:01 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369 "2022-02-25T16:01:41Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [25 February 2022 16:01 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/1 "2022-02-25T16:01:41Z")

</div>

Hi all,  
I just got a new **NanoPi R2C PLUS** (seems to be the successor of NanoPi R2S. The PLUS type has additional internal 8GB flash).  
[https://wiki.friendlyelec.com/wiki/index.php/NanoPi\_R2C\_Plus](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2C_Plus)

I started with the image for R2S and got no network connection.

Connected to TTY debug port and found this here in “dmesg”:  
[10.764767] rk\_gmac-dwmac ff540000.ethernet eth0: no phy at addr -1  
[10.765340] rk\_gmac-dwmac ff540000.ethernet eth0: stmmac\_open: Cannot attach to PHY (error: -19)

The reason is probably that the R2C uses a new PHY device YT8521S instead of the RTL8211E-VB-CG they used with the R2S.  
This means with the image “DietPi\_NanoPiR2S-ARMv8-Bullseye.img” for R2S the WAN port cannot be used.

Also I found no way to access the built in 8GB Flash. I expected to see it in /dev/mmcblk1 but nothing 😢

Is there a chance for a workaround or new image for the NanoPi R2C that fixes that? Would be really great 😃  
I am not skilled enough to fix it by myself.

Best DrCWO

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [25 February 2022 17:00 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/2 "2022-02-25T17:00:56Z")

</div>

> [@](#):
>
> This means with the image “DietPi\_NanoPiR2S-ARMv8-Bullseye.img” for R2S the WAN port cannot be used.

It worked when I tested last. The question is which chip is assumed for which adapter. There is a dedicated R2C bootloader available, can you try that one:

```plaintext
apt update
apt install linux-u-boot-nanopi-r2c-current
. /usr/lib/u-boot/platform_install.sh
write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")"
reboot

```

If it doesn’t work, probably the edge kernel and bootloader does:

```plaintext
apt purge linux-u-boot-nanopi-r2c-current
apt install linux-{image,dtb}-edge-rockchip64 linux-u-boot-nanopi-r2c-edge
. /usr/lib/u-boot/platform_install.sh
write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")"

```

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [26 February 2022 11:13 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/3 "2022-02-26T11:13:28Z")

</div>

Hi MichaIng,  
thanks’ for the quick reply.

I ran the first three lines where I had to a+x the platform\_install.sh script before.  
It started but gave no response. Is this correct?

I had no luck with the command:  
write\_uboot\_platform “$DIR” “$(lsblk -npo PKNAME “$G\_ROOTFS\_DEV”)”

It said:  
bash: write\_uboot\_platform: command not found

Also with a global find I was not able to discover write\_uboot\_platform

Did I miss anything?  
Best DrCWO

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [26 February 2022 14:40 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/4 "2022-02-26T14:40:44Z")

</div>

Don’t forget the dot (which is separated by a space) in at the beginning of the 3rd command. This script is not executed but sourced (hence no execute bit required). It loads the function which is the 4th command.

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [26 February 2022 16:05 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/5 "2022-02-26T16:05:33Z")

</div>

Thank you, now I understood. For me this is shell magic 😉  
I did as was told. No change with the first approach.  
Second approach I see a change (first bold) but this does not fix the issue (seconf bold) 😢 ☹  
See dmesg and uname outputs.

**[8.066903] r8152 5-1:1.0: Direct firmware load for rtl\_nic/rtl8153b-2.fw failed with error -2  
[8.066935] r8152 5-1:1.0: unable to load firmware patch rtl\_nic/rtl8153b-2.fw (-2)**  
[8.074629] r8152 5-1:1.0 eth1: v1.12.12  
[8.083224] usbcore: registered new interface driver btusb  
[8.181769] random: crng init done  
[8.181788] random: 7 urandom warning(s) missed due to ratelimiting  
**[8.405453] rk\_gmac-dwmac ff540000.ethernet eth0: no phy at addr -1  
[8.406040] rk\_gmac-dwmac ff540000.ethernet eth0: stmmac\_open: Cannot attach to PHY (error: -19)**  
[8.496352] Bluetooth: BNEP (Ethernet Emulation) ver 1.3  
[8.496374] Bluetooth: BNEP filters: protocol multicast  
[8.496391] Bluetooth: BNEP socket layer initialized  
[8.519551] NET: Registered PF\_ALG protocol family  
[12.075731] IPv6: ADDRCONF(NETDEV\_CHANGE): eth1: link becomes ready  
[12.076497] r8152 5-1:1.0 eth1: carrier on  
root@rooExtend-X:/home/pi# uname -a  
Linux rooExtend-X 5.15.18-rockchip64 #trunk.0023 SMP PREEMPT Sat Jan 29 16:01:11 UTC 2022 aarch64 GNU/Linux  
root@rooExtend-X:/home/pi#

Best DrCWO

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [26 February 2022 19:18 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/6 "2022-02-26T19:18:50Z")

</div>

Okay, thanks for testing. Just to be sure, the R2C U-Boot is the only one installed now, right?

```nohighlight
dpkg -l | grep 'linux-'

```

And the LAN adapter (eth1) works fine, right?

In case I’ll report to Armbian.

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [26 February 2022 19:48 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/7 "2022-02-26T19:48:37Z")

</div>

Please don’t thank me!  
It is my joy to thank you for getting into my issue.

This is what I get from your command:

```nohighlight
root@rooExtend-X:/home/pi/rooExtend# dpkg -l | grep 'linux-'
ii binutils-aarch64-linux-gnu 2.35.2-2 arm64 GNU binary utilities, for aarch64-linux-gnu target
ii linux-base 4.6 all Linux image base package
ii linux-dtb-current-rockchip64 21.08.2 arm64 Linux DTB, version 5.10.63-rockchip64
ii linux-dtb-edge-rockchip64 22.02.0-trunk.0023 arm64 Armbian Linux DTB, version 5.15.18-rockchip64 edge
ii linux-image-current-rockchip64 21.08.2 arm64 Linux kernel, version 5.10.63-rockchip64
ii linux-image-edge-rockchip64 22.02.0-trunk.0023 arm64 Linux kernel, armbian version 5.15.18-rockchip64 edge
ii linux-libc-dev:arm64 21.08.6 arm64 Armbian Linux support headers for userspace development
ii linux-u-boot-nanopi-r2c-edge 21.08.8 arm64 Uboot loader 2021.07

```

And yes, the LAN adapter name “LAN” printed on the box and originally named lan0 in the dietpi setup works fine.  
I renamed it to eth0 in /etc/udev/rules.d/70-persistent-net.rules

Best DrCWO

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [26 February 2022 19:53 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/8 "2022-02-26T19:53:17Z")

</div>

By the way,  
I checked the wiki for both the R2S and R2C.

The R2C uses a new PHY device YT8521S for eth0 instead of the RTL8211E-VB-CG they used with the R2S.

In my opinion this is what creates the issue.

Best DrCWO

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [27 February 2022 09:45 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/9 "2022-02-27T09:45:33Z")

</div>

I found some resources regarding YT8521S but no idea how to use them. Hope this helps.  
[https://github.com/Poco-Ye/rk-ethernet/blob/master/YT8521S.zip](https://github.com/Poco-Ye/rk-ethernet/blob/master/YT8521S.zip)  
Best DrCWO

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [27 February 2022 15:28 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/10 "2022-02-27T15:28:34Z")

</div>

And here are the driver sources:  
[https://github.com/cnxsoft/YT8521S/tree/main/motorcom-phy-sdk-linux/linux/drivers/net/phy](https://github.com/cnxsoft/YT8521S/tree/main/motorcom-phy-sdk-linux/linux/drivers/net/phy)

Who is able or willing to integrate it in the kernel?  
I am not able 😢 Never compiled a kernel…

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [27 February 2022 16:16 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/11 "2022-02-27T16:16:49Z")

</div>

From DietPi side we don’t create nor provide any kernel. We always use the one provided by the underlying base image.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [28 February 2022 00:59 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/12 "2022-02-28T00:59:27Z")

</div>

I just found the PR indicating that it’s is or was supposed to work already: [https://github.com/armbian/build/pull/3138](https://github.com/armbian/build/pull/3138)

Ah, you needed to use udev rules to rename the adapter to eth0, right we accidentally added unintended double quotes in /etc/armbianEnv.txt around net.ifnames=0 setting. Removing those makes the udev rule obsolete. They are removed automatically with next DietPi update.

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [28 February 2022 10:28 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/13 "2022-02-28T10:28:11Z")

</div>

As I can’t understand most of the things in your the conversation with igorpecovnik but I removed the double quotes.

Removing the double quotes in /boot/armbianEnv.txt (i can’t find the file in /etc ?) did not change the situation.  
I removed it in my latest installation after the updates and I also did a fresh install from  
DietPi\_NanoPiR2S-ARMv8-Bullseye.img and removed the double quotes before flashing it on the SD-Card.  
Still the same error 😢

I encountered one more minor issue I like to report:  
Booting with serial terminal (putty) attached, it looks like the serial bitrate of the bootloader is wrong (I see cryptic characters). If I press CR after the boot I get the login prompt and can login. My putty settings are 115200/8/1/no parity

As I am really interested to make it run, I would be happy if you might give me more tips how it can be improved. I will test as soon as I receive your feedback.

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [28 February 2022 11:00 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/14 "2022-02-28T11:00:05Z")

</div>

Next on the fresh install without the double quotes I tested the new Uboot and new kernel.

Linux DietPi 5.15.18-rockchip64 #trunk.0023 SMP PREEMPT Sat Jan 29 16:01:11 UTC 2022 aarch64 GNU/Linux

Still the same issue…

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [1 March 2022 06:35 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/15 "2022-03-01T06:35:23Z")

</div>

Hi MichaIng,  
I also wrote some lines in the Githup explaining the issue a bit. Maybe his will help.  
Did you achieve any further success?

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [1 March 2022 12:07 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/16 "2022-03-01T12:07:55Z")

</div>

Hi MichaIng,  
the git discussion was closed.

We don’t support 3rd party users since we can’t possibly ours and support is in general very limited. Migrate to Armbian and use procedure as we are requesting: [https://www.armbian.com/bugs/](https://www.armbian.com/bugs/) (this saves us some time)

As I am a 3rd party user I am not supported and therefor not able to be helpful any more. 😢

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [1 March 2022 15:13 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/17 "2022-03-01T15:13:03Z")

</div>

You basically posted on the wrong PR 🙂. We already know that that patch didn’t broke the WAN chip, since it was merged long after the kernel packages were built. With some luck, that patch may even fix it.

Also note that Armbian, as you recognised, is very sensitive about who they “officially” support, and which SBC, and the NanoPi R2C never was officially support, there are no Armbian images for it, no download page, no support form, which is the reason I asked carefully on the other PR, more as a report, in case the author of the original R2C “support” (only unofficially, kernel-wise) patch is still around and can verify that it broke somewhere between September and January.

Just as a last attempt to rule anything else out, you could try the latest Armbian R2S image: [https://redirect.armbian.com/nanopi-r2s/Bullseye\_current](https://redirect.armbian.com/nanopi-r2s/Bullseye_current)

If that doesn’t work, go though the steps as [before](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/2), first flashing the “current” R2C U-Boot, then the “edge” versions of kernel and U-Boot. But since the R2C is not officially supported, the bug report suggested by Igor cannot be done anyway, but we need to wait for an official Armbian NanoPi R2C maintainer: [https://forum.armbian.com/staffapplications/application/8-single-board-computer-maintainer/](https://forum.armbian.com/staffapplications/application/8-single-board-computer-maintainer/)

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [1 March 2022 17:36 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/18 "2022-03-01T17:36:14Z")

</div>

Thank you your your support and sorry that I behaved the wrong way in the tread.  
I will leave home for a holiday tomorrow and will be back in three weeks.  
Probably I won’t find time today to test your approach.

When I am back I’l test and let you know. If there might be news regarding this until then please let me know.  
Best DrCWO

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [3 March 2022 23:08 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/19 "2022-03-03T23:08:02Z")

</div>

No problem. Let’s see whether the contributors of the R2C support code respond, or probably Armbian finds a maintainer for this SBC and ships an official image (and assured kernel support).

---

<div class="post-metadata">

### Author: ![DrCWO](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@DrCWO](https://dietpi.com/forum/u/DrCWO)
#### Post date: [4 March 2022 17:18 UTC](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369/20 "2022-03-04T17:18:39Z")

</div>

Her you can see the maintainer of R2S [https://www.armbian.com/nanopi-r2s/](https://www.armbian.com/nanopi-r2s/)😉😉

[Next page](https://dietpi.com/forum/t/support-for-nanopi-r2c/6369.md?page=2)
