Ethernet over USB kernel modules (usbnet) not available in Starfive Software 3.0.4 for VisionFive 2

I found that on one USB hub of mine with Ethernet port there is no Ethernet over USB kernel module there. Only the USB ports are available as devices, the Ethernet port is not there as device as it seems no USB subsystem support is compiled into the VisionFive 2 kernel.

Yes, that is unfortunately the case for the time being, but it has already been mentioned here in the forum as a desirable improvement.

2 Likes

With the “USB hub with Ethernet” connected what does “lsusb” show

You may need to “sudo apt install usbutils -y” first, to be able to execute lsusb[*].

I’m basically wondering what the 8 hexadecimal digits of VendorID:ProductID are so that I can look up what the hardware is at http://www.linux-usb.org/usb-ids.html to know what driver it expects to find that is not there.

The reason I ask is because I suspect that the device you mean is not a “Ethernet Gadget” (Ethernet emulation over USB), but a “USB Ethernet Adaptor”. (real physical Eathernet) Something like the below, but the main chip used inside it soldered internally to the board of a USB HUB and using one of the USB ports. The image below is just to to help clarify the kind of device that it ultimately is (but without the USB HUB)

[*]

user@starfive:~$ which lsusb
/usr/bin/lsusb
user@starfive:~$ sudo dpkg -S /usr/bin/lsusb
usbutils: /usr/bin/lsusb
2 Likes

And “usbnet” is something else again.
http://www.linux-usb.org/usbnet/

@ ThomasKorimort Maybe you can tell us which of these three interfaces you mean.

  1. usbnet
  2. USB Ethernet Adapter
  3. Ethernet over USB (USB Ethernet Gadget)
2 Likes

I just read the title of this post:
“Ethernet over USB kernel modules (usbnet) not available in Starfive Software 3.0.4 for VisionFive 2”

It probably just needs “CONFIG_USB_USBNET=m” or “CONFIG_USB_USBNET=y” added to linux/arch/riscv/configs/starfive_visionfive2_defconfig and the kernel recompiled. That config option will be picked up by linux//drivers/net/usb/Kconfig and enable any supported usbnet devices (click on the Kconfig link for the list of currently supported devices). You will also need to add the specific device (listed in Kconfig) or all of them as well. Probably as modules (m) would be more efficient than permanently in the kernel (y) wasting RAM on machines that do not have the hardware.

2 Likes

The “Offical Kernel” is not enabled a lot of modules… :face_exhaling:

1 Like

Yes. Compiling ones kernel oneself seems to be part of the whole riscv open-source architecture concept. StarFive provides their kernel sources and SDK for the Vision Five 2 platform (VisionFive 2 Debian User Guide | RVspace) on Github. The section in the Debian User guide for Vision Five 2 is a screen page long and it seems the procedure of compiling ones kernel oneself is not too hard taking care of syncing the tdbs manually.

I am curious whether the ip4_forwarding routing functions are compiled into the kernel. In the official advertising video the Vision Five 2 is advertised as being capable of gateway functions. On the Raspberry Pi platform i never succeeded to get this working under Raspberry Pi OS. Maybe it would have been possible by compiling ones kernel oneself, but i could not advance that far. It took me quite some while till i understood that routing functionality was intentionally taken out of the Raspberry Pi OS kernel. Too much obstruction for any serious use of the Raspberry Pi computers on a private level. I hope that the Vision Five 2 will open more opportunities for application like out-of-the-box DMZ functionality. Otherwise, i like the Vision Five 2 till now.

The Vision Five 2 platform itself is built well: The only component on it, that has no standard driver support is the GPU, which has an open-source driver too. Theoretically, one should be able to expect, that eventually a native stock debian will work. This has been postponed till Debian 13 Trixie release in two years. Officially, Debian Bookworm unstable sid is the Debian image provided for download by StarFive. The QSPI flash firmware is based on OpenSBI and U-Boot. Theoretically, this should allow for all U-Boot supported operating systems to be installed in their RISC-V available versions - if there are. Let us hope that there is no strange “magic” in the firmware of the Vision Five 2. On the other side the Debian project has dropped quite a lot of good and necessary packages (like e.g. the RTP and TCP modules packages for the PulseAudio sound server), which looks a little bit as if there is also some corruption and DRM wars going on, and who knows what Trojan horses and backdoors are hidden in the linux kernel and the firmware itself…Let us hope for some light at the end of the tunnel.

USB Ethernet adapter and USB hub with 3 USB 3.0 slots and 1 Gigabit Ethernet slot. I think the USB subsystem modules of the kernel are needed for this to work, but the standard Vision Five 2 kernel does not have those modules.