Issues with official Ubuntu 23.04 image and fixes for USB and v1.2a Ethernet

The latest kernel builds have the Docker changes incorporated. I made a defconfig (visionfive2_docker_defconfig) for this, so if you don’t want the additional modules needed for Docker you can always use the original visionfive2_defconfig.

1 Like

No worries, I’ll get that merged.

You didn’t build kernel modules?

Current build script only seems to package the kernel and not the additional modules. I need to look into it.

Try make modules before build .deb, succeeded in my testing.

Thanks, that did it.

Can we get CONFIG_NET_CLS_CGROUP and CONFIG_XFRM_USER included for docker support.

The kernel you have does work with docker in legacy iptables mode but looks like you need these last two modules to work with netfilter.

2 Likes

Thanks for the info. I’ve updated the config to reflect those changes.

@dns - It doesn’t seem that those options were the complete solution, and I’m yet to find anything definitive about using modern NFTables with Docker rather than legacy IPTables. Do you have an sources you can point me towards to look into this further?

1 Like

It was trial and error, basically running check-config.sh from the docker project against the linux config and one by one adding more modules until it stops complaining.
So the two things it looks like you are missing are CONFIG_NET_CLS_CGROUP and CONFIG_XFRM_USER. I think CONFIG_XFRM_USER may have a few other dependencies that also need to be enabled for that module to compile.

I compile a few more things as modules than you but I’m not sure what ones are important. You can compare my config with your config with diffconfig.

I’ve gone back and added those modules and checked against the script you mentioned but it still doesn’t want to work with me with NFTables. Using “update-alternatives” and setting iptables to iptables-legacy and ip6tables to ip6tables-legacy is the only way I’ve been successful getting Docker to run.

4 Likes

Hi, agreenbhm,

I just installed ubuntu on my VF2 and found myself in the similar shoes as you are: USB not working, one of the ether ports works, but not the other.

I really need to get USB working. It appears your link does not work anymore. Do you have a new place hosting the USB fix?

Thanks!

@diamond_wolf please see this thread for current links Daily Ubuntu Kernel Builds - Now With 100% More APT Repo!. I only just became able to edit posts on this forum so the OP of this thread was outdated (though I just updated it so others don’t run into the same issue you did).

3 Likes

I noticed that Ubuntu appears to have open for the beta; any reason I shouldn’t try do-release-upgrade -d? Is it likely to interfere with your kernel?

I’m just guessing, but it probably would be ok.

Hello! I get this error on a 1.2A board with ubuntu 23.04 and the 6.4 kernel.

Anyone knows if both ethernet ports are supported and which distro? I also have the 1.3B board with two-gigabit ports but haven’t tried it yet.

starfive-dwmac 16030000.ethernet: Failed to reset the dma
starfive-dwmac 16030000.ethernet end0: stmmac_hw_setup: DMA engine initialization failed
starfive-dwmac 16030000.ethernet end0: __stmmac_open: Hw setup failed
starfive-dwmac 16040000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0
starfive-dwmac 16040000.ethernet end1: PHY [stmmac-1:00] driver [Generic PHY] (irq=POLL)
dwmac4: Master AXI performs fixed burst length
starfive-dwmac 16040000.ethernet end1: No Safety Features support found
starfive-dwmac 16040000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported

1 Like

I’ve tried the 1.3B board and it seems both Gbit ports work out of the box but on the 1.2A only the 100Mb port works.

1 Like

Where is /dev/mtd1? If I load the mtd modules in /lib/modules/6.2.0-19-generic/kernel/drivers/mtd I can get /dev/mtd0, /dev/mtd0ro, and mtdblock0 but not /dev/mtd1.
ubuntu@ubuntu:~$ cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00020000 “mtdram test device”
ubuntu@ubuntu:~$

Due to a clock issue, QSPI controller won’t work and fix patches are under review: [v1,0/3] Add initialization of clock for StarFive JH7110 SoC - Patchwork

Presumably this hasn’t been merged yet? I just tried the daily kernel build and still have no mtd devices.

root@ubuntu:~# cat /proc/mtd
dev: size erasesize name
root@ubuntu:~# ls /dev/mtd*
ls: cannot access ‘/dev/mtd*’: No such file or directory
root@ubuntu:~#

1 Like