But we need one for R2C, which is the whole point here?
Cross linking the GitHub issue: https://github.com/MichaIng/DietPi/issues/5392
I purchased one of these devices and for the past few weeks have been struggling to get armbian image to work with the new driver. You can find some info in: Add support for NanoPi R2C - Feature Requests - Armbian Community Forums
I have been able to boot armbian with a single NIC card (usb gigabit driver) using the test nanopi-r2c option in the armbian/build menu in the thread linked above.
I’m trying to run homeassistant on this device, so I don’t really need or depend on two NICs working on the image.
Are there any tips / guidance here on how I can convert an armbian image to dietpi - and also how to disable the other NIC so only the one that works is eth0 ?
Generally the conversion can be done with DietPi-Installer: Supported hardware - DietPi.com Docs
I think the Ethernet interface cannot be disabled competely, but with udev rules the naming can be fixed. We’d need to find some unique attributes for the filtering:
udevadm info -a /sys/class/net/eth0
udevadm info -a /sys/class/net/eth1
thank you. After spending another 12 hours troubleshooting and building ‘current’ and ‘edge’ armbian builds I gave up on the ‘nanopi r2c’ as i couldn’t figure it out how to fix the NIC card.
I ended up returning the r2c and getting a r2s instead which i am now using. Hopefully someone in armbian forum will eventually figure out whats broken and fix upstream (nanopi-r2c img in armbian-build is listed but is broken, IMO it should be removed if it hasnt been tested)
Not sure why we focused on the bootloader instead of testing a different device tree. Can someone test this on R2C and/or R2C Plus:
ip l # verify that only one Ethernet interface is visible
G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3328-nanopi-r2-rev06.dtb' /boot/dietpiEnv.txt
reboot
ip l # after reboot, check whether there are now two Ethernet interfaces visible
Hello,
Just to inform you, I tried your command that modifies the file /boot/dietpiEnv.txt but it still doesn’t work. However, there is a difference before and after.
IP A :
root@DietPi:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 42:f4:2c:62:dd:5b brd ff:ff:ff:ff:ff:ff
altname end0
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 42:f4:2c:62:dd:7b brd ff:ff:ff:ff:ff:ff
inet 10.23.2.127/24 brd 10.23.2.255 scope global dynamic eth1
valid_lft 42768sec preferred_lft 42768sec
inet6 fe80::40f4:2cff:fe62:dd7b/64 scope link
valid_lft forever preferred_lft forever
Before the command :
root@DietPi:~# dhclient eth0
RTNETLINK answers: No such device
^C
After the command :
root@DietPi:~# dhclient eth0
RTNETLINK answers: Connection timed out
^C
Journalctl :
Mar 04 14:44:01 DietPi kernel: rk_gmac-dwmac ff540000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
Mar 04 14:44:01 DietPi kernel: yzhang..read phyaddr=3, phyid=0000011a
Mar 04 14:44:01 DietPi kernel: yt8521_config_init, 8521 init call out.
Mar 04 14:44:01 DietPi kernel: rk_gmac-dwmac ff540000.ethernet eth0: PHY [stmmac-0:03] driver [YT8521 Ethernet] (irq=POLL)
Mar 04 14:44:01 DietPi kernel: rk_gmac-dwmac ff540000.ethernet: Failed to reset the dma
Mar 04 14:44:01 DietPi kernel: rk_gmac-dwmac ff540000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
Mar 04 14:44:01 DietPi kernel: rk_gmac-dwmac ff540000.ethernet eth0: __stmmac_open: Hw setup failed
Mar 04 14:44:01 DietPi dhclient[1094]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
Mar 04 14:44:01 DietPi dhclient[1094]: send_packet: Network is down
Mar 04 14:44:01 DietPi dhclient[1094]: dhclient.c:2600: Failed to send 300 byte long packet over eth0 interface.
Mar 04 14:44:01 DietPi dhclient[1094]: receive_packet failed on eth0: Network is down
I also tried with this Debian image for the R2C-Plus board (01_SD card images – Google Drive) and it works very well, both interfaces are detected and functional.
However, when I execute the script to convert the image to DietPi, the board fails at boot.
(I am currently investigating the source of the problem.)
I was successful with the NanoPi R2S image using the @Michalng technique on two different boarrds.
OrangePi R1 Plus LTS: fdtfile=rockchip/rk3328-orangepi-r1-plus-lts.dtb
NanoPi R2C: fdtfile=rockchip/rk3328-nanopi-r2-rev06.dtb
After boot you must add an eth0 stanza to /etc/network/interfaces
allow-hotplug eth0
iface eth0 inet dhcp
then sudo ifup eth0 will get a lease on wan port.