i have extended my little image builder framework which i use to build images for quite a few arm chromebooks, sbcs and other systems to also support riscv64 and the starfive visionfive2 now and created a first experimental image with it.
it is debian sid/unstable based on the debian riscv64 port and has some small extra features i usually use in my images plus some patches to the kernel applied as well, but is otherwise not that fancy as it does not contain any drivers, libraries etc. for the special hardware like gpu, encoders/decoders, npu etc. - its just a plain debian unstable. it has a working frambuffer console and xorg is configured to use that - slow but working for now
some notes/features:
based on debian sid/unstable riscv64 port
the v5.15 kernel used is based on VF2_v2.6.0 of the starfive visionfive2 kernel tree and some patches from the icenowy star64 kernel tree plus some more drivers enabled
a framebuffer console has been added (part of the patches mentioned above)
a v5.15 backport of mglru added (multigen lru mm patches, which were merged into v6.1 mainline and improve performance especially in low memory situations)
has some features typical for my images: btrfs rootfs with zstd compression, zswap with zstd compression, mgrlu enabled by default
i guess it requires at least the v2.5.0 u-boot and sbi update in the spl to work properly
username/password is as usual linux/changeme
i plan to improve it slowly over time - this is just a spare time project, so i’ll work on it whenever i have some time and feel like it - maybe it fits the use case of someone here …
the kernel and the image were exclusively built on the vf2 running the debian 96 image and i must say that i’m positively impressed by the hardware and software: i did not have any problems with the hardware or software during all that time and the performance was also quite ok … i tried to rebuild the kernel and the image on a booted instance of the image itself, but ran into problems (assembler and debootstrap errors) which i guess are part of the “unstable” of debian sid and one needs to hit a good day where most of the packages are in a good shape
what is super frustrating about all this is the 5.15 kernel. The thing dropped in 2022 without hardware, it should be on 6.x branch of kernel. Limiting everyone to 5.15 seems like a problem and seems like a lot of hardware like this, will be abandoned. It’s not like there is an armbian for riscv is there?
the regular xorg from debian sid is working using the fbdev driver but not using the usual modesetting driver which i guess is required for anykind of gpu accel via glamor
it will simply take some time until everything is mainlined, but mainline is in progress as i understand it: JH7110 Upstream Status | RVspace and just look at the different branches of GitHub - starfive-tech/linux … mainlining is nothing which is there in a short time and at least the vf2 tree is cleanly v5.15 based (it can even be patched up to the latest v5.15.90 with a bit of effort i think) and not one of those forward patched since v2.xy you can see from rockchip, allwinner etc. … so maybe just a bit of patience is required to have vf2 supported in mainline …
I did run into something strange - my 1 GbE connection isn’t working (the 100 MbE works). I tried everything I could think of and have ruled out everything on my end. Am I the only one with this problem? (SBL & OpenSBI updated to 2.8.0).
ADD: the experience is as if there were nothing plugged in - it never gets an IP assigned by DHCP. The other, the 100 MbE, works but as my home lives on NFS, 100 Mb/s is painfully slow.
@tommythorn - i did not test the 1gb interface myself yet - one potential idea might be some missing firmware in /lib/firmware maybe for the gb eth interface which is not part of the default linux firmare packages in debian? is there maybe an info about missing firmware in dmesg? other option might be that the debian 69 image is doing something special which a default debian is not doing … will have to look into this …
I just find out the google has already done more test on this, check LPC2022 report, and phoronix test suite is a good comparsion on this. any other benchmark tool we could refer to?
@cwt - as i understand it the patch changes quite a few parts of the arch independent mm and swap code which will work on any linux system - on top of that there are some extra optimizations for x86_64 and aarch64 which are not there for riscv64, but that should not make a big difference.
i did not run any benchmarks with the patch, but i have very good experiences with it on other systems and mglru is production tested on millions of systems as chromebooks, i think android and afew other systems use mglru for years already in their trees
The other systems that have been tested, primarily x86_64 and arm64, are the reason for my skepticism. However, I remain highly interested in trying it on RISC-V anyway.
I’ve been using your sid experimental image for a couple of days:
-both ethernet ports can connect
-ssh works without issues
-apt-get update/upgrade work without issues.
wget https://phoronix-test-suite.com/releases/phoronix-test-suite-10.8.4.tar.gz
tar zxvf phoronix-test-suite-10.8.4.tar.gz
cd phoronix-test-suite
apt-get install php-cli php-xml pkg-config
./phoronix-test-suite help
./phoronix-test-suite interactive
Supported Sensors For This System
cpu.freq CPU Frequency (CPU0): 750.00 Megahertz
cpu.freq CPU Frequency (CPU1): 750.00 Megahertz
cpu.freq CPU Frequency (CPU2): 750.00 Megahertz
cpu.freq CPU Frequency (CPU3): 750.00 Megahertz
cpu.peak-freq CPU Peak Freq (Highest CPU Core Frequency): 750 Megahertz
cpu.usage CPU Usage (CPU0): 0.00 Percent
cpu.usage CPU Usage (CPU1): 0.00 Percent
cpu.usage CPU Usage (CPU2): 0.00 Percent
cpu.usage CPU Usage (CPU3): 0.00 Percent
cpu.usage CPU Usage (Summary): 0.00 Percent
gpu.fan-speed GPU Fan Speed: 100 Percent
hdd.read-speed Drive Read Speed (mmcblk1): 0.00 MB/s
hdd.write-speed Drive Write Speed (mmcblk1): 0.00 MB/s
memory.usage Memory Usage: 150 Megabytes
swap.usage Swap Usage: 0 Megabytes
sys.iowait System Iowait: 0.00 Percent
sys.temp System Temperature: 52.4 Celsius
Unsupported Sensors For This System
- Ambient Temperature
- Cgroup Cpu Usage
- CPU Fan Speed
- CPU Power Consumption
- CPU Temperature
- CPU Voltage
- GPU Frequency
- GPU Memory Usage
- GPU Power Consumption
- GPU Temperature
- GPU Usage
- GPU Voltage
- Drive Temperature
- Memory Temperature
- System Fan Speed
- System Power Consumption
- System Voltage
1)Run a test
254(pts/sysbench)…It’s still early days. Couldn’t install sysbench to run it.
The installer exited with a non-zero exit status.
ERROR: lj_arch.h:357:2: error: #error "No target architecture defined"
LOG: /var/lib/phoronix-test-suite/installed-tests/pts/sysbench-1.1.0/install-failed.log
[PROBLEM] pts/sysbench-1.1.0 is not installed.