Experimental debian sid image

UPDATE: there is a new version of this image available now - see: Experimental debian sid image - #51 by hexdump0815

hi *,

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.

in case you want to have a look at it, it can be found here: Release 230115-01 - experimental debian sid image for the starfive visionfive2 riscv64 sbc · hexdump0815/imagebuilder · GitHub

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 :slight_smile:

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 :slight_smile:

best wishes and good luck - hexdump

17 Likes

just a little update: compiling the vf2 kernel on debian sid works with this little patch: linux-starfive-visionfive2-kernel/make-newer-binutils-work.patch at main · hexdump0815/linux-starfive-visionfive2-kernel · GitHub … it looks like debian sid comes with a newer version of binutils which seems to have slightly changed option and extension handling

might be interesting for others building on other distributions as well maybe sooner or later

best wishes - hexdump

4 Likes

Can you start X with the framebuffer enabled?

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?

2 Likes

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 …

7 Likes

Thanks, this is great.

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.

Try the ethernet in u-boot (via using the CLI on the UART), as that runs before Linux does, it does not depend on anything Linux.

u-boot has networking support, and you should be able to bring it up, ping and so on. Works fine on my board.

Maybe I wasn’t clear; my 1 GbE interface works with debian69 with exactly the same firmware, cable, switch etc. The only difference is the OS.

1 Like

@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 …

best wishes - hexdump

@hexdump0815 where and which patches did you cherry pick

2 Likes

@Michael.Zhu - the mglru author yu zhao was so nice to provide a v5.15 backport - see kernel-extra-patches/readme.txt at main · hexdump0815/kernel-extra-patches · GitHub … due to the fact that the vf2 kernel tree is very clean for such a bringup kernel that patch applies without a single conflict and it seems to work perfectly fine so far

best wishes - hexdump

3 Likes

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?

@hexdump0815 the patch appears to have no effect on arch/riscv , so its effects you felt may have been a placebo?

@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

best wishes - hexdump

1 Like

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.

Thank you!

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.

Cheers and thank you again.

1 Like

You might want to install these afterwards as well:

apt-get install emacs-nox
apt-get install curl wget unzip mtd-utils usbutils bzip2
apt-get install aptitude emacs-nox build-essential pkg-config clang-tools-15 lld-15 llvm-15-tools git gitk

Yes, I was surprised that emacs isn’t installing (some conflict with GTK). Unstable indeed.

I’m going to try testing some phoronix stuff:

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.