Arch Linux Image for VisionFive 2

New release for mesa-pvr-vf2 Release v22.1.3-3 · cwt/aur-mesa-pvr-vf2 · GitHub.

As @sajattack tested and found a lot of segfaults from LLVM-15, the LLVM JIT was disabled in this release.

2 Likes

Runs kde plasma-wayland now :smiley:

5 Likes

wave5 decoding via gstreamer v4l2h264dec somewhat works, but not fully stable. Got a kernel oops after 11% into the file.

gst-play can’t select a specific hardware decoder, so it needs a pipeline.

gst-launch-1.0 -e filesrc location=1080p.x264.mkv ! matroskademux ! h264parse ! v4l2h264dec capture-io-mode=2 ! kmssink driver-name=starfive
Unable to handle kernel paging request at virtual address fffffffffffffd6c
Oops [#1]
Modules linked in: nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs fscache lockd grace sunrpc mousedev wave5 v4l2_mem2mem goodix imx708 cfg80211 rfkill sch_fq_codel fuse dm_mod zram zsmalloc bpf_preload ip_tables x_tables
CPU: 1 PID: 5147 Comm: matroskademux0: Not tainted 5.15.2-cwt-3.6.1-1 #1 88b3c5b07c93cb445813c4c8c63e06c3da5574d4
Hardware name: StarFive VisionFive V2 (DT)
epc : wave5_handle_bitstream_buffer+0x64/0x2fc [wave5]
 ra : wave5_handle_bitstream_buffer+0xf6/0x2fc [wave5]
epc : ffffffff01c58ffc ra : ffffffff01c5908e sp : ffffffd00494bad0
 gp : ffffffff819d9c98 tp : ffffffe14e8b24c0 t0 : ffffffe0fb00d060
 t1 : ffffffff80c02b82 t2 : 0000000000000000 s0 : 000000000001ae73
 s1 : 0000000000000100 a0 : ffffffe107dd7cf0 a1 : 0000000000000001
 a2 : 46a1033837412a00 a3 : 0000000000000000 a4 : ffffffe1074b53a8
 a5 : ffffffff80917204 a6 : 0000000000000001 a7 : 0000000000000001
 s2 : ffffffe1077d1c68 s3 : ffffffe1077d0000 s4 : ffffffd02ab0c000
 s5 : ffffffff819df0b8 s6 : 000000000001ae73 s7 : 0000000000000001
 s8 : 0000000000000100 s9 : ffffffe1077d0010 s10: ffffffe0c6797828
 s11: ffffffffffffffed t3 : 0000000000000000 t4 : 0000000100005a3a
 t5 : 0000000000000040 t6 : 0000000000040000
status: 0000000200000120 badaddr: fffffffffffffd6c cause: 000000000000000d
[<ffffffff01c58ffc>] wave5_handle_bitstream_buffer+0x64/0x2fc [wave5]
[<ffffffff01c5a2a6>] wave5_vpu_dec_buf_queue+0x74/0x384 [wave5]
[<ffffffff809115b4>] vb2_core_qbuf+0x13a/0x3da
[<ffffffff809145a4>] vb2_qbuf+0x74/0xaa
[<ffffffff01c45ec0>] v4l2_m2m_qbuf+0x58/0x11a [v4l2_mem2mem]
[<ffffffff808e8458>] __video_do_ioctl+0x240/0x316
[<ffffffff801a77e4>] kvmalloc_node+0x5e/0xae
[<ffffffff8021e26e>] __check_object_size+0x140/0x352
[<ffffffff808e8214>] video_ioctl2+0xc/0x10
[<ffffffff808e801c>] video_usercopy+0x2c8/0x3d8
[<ffffffff808e76e2>] v4l2_ioctl+0x2e/0x42
[<ffffffff802359d4>] sys_ioctl+0x85a/0x96e
[<ffffffff800465ca>] irqtime_account_irq+0x44/0x10a
[<ffffffff80235176>] vfs_fileattr_set+0x20a/0x20e
[<ffffffff80003a56>] check_syscall_nr+0x1e/0x22
---[ end trace 8be00a8ef299139c ]---

How do I install this? The github doesn’t mention anything, and sudo mv * /usr destroyed my system.

https://wiki.archlinux.org/title/Pacman#Additional_commands

Install a ‘local’ package that is not from a remote repository

pacman -U */path/to/package/package_name-version.pkg.tar.zst

1 Like

ah thanks this helped. I didn’t realize that that file was the package and not some compressed archive.

New AUR build today. No obvious llvm dependencies I could see.

And WOW! A whole pile of Clutter / Cogl stuff that crashed big time previously, now works.

2 Likes

Yeah I tweaked the flags and removed some things the hardware didn’t seem to support and it seems to be working pretty good now. I’m still not totally sure whether glx should be enabled or not. Seems like KDE needs it but it also seems to make lots of things fall back to swrast. I’ll keep tinkering.

1 Like

Also tweaked the retroarch package to support opengles
retroarch-1.15.0-3-riscv64.pkg.tar.zst (5.2 MB)

2 Likes

New kernel is released to fix the missing vdso files. So now you can build an external module using just the kernel headers package.

By the way, if you want to build the external module with non-root user, please add that user to group root first.

$ sudo usermod -a -G root <username>

And then logout and login again.

Thank you. I’m gonna try building colabora wave5 kmod again. Maybe it comes down to a few steps. It would still need the v42l patch though.

Should we unify compiler and compile flags across the builds?

Considering this very limited set of targets, the use of optimization flags is really an option.

https://github.com/archlinuxarm/PKGBUILDs/blob/master/README.md

Arch Linux ARM has some extra bitflag for specific targets.

I don’t understand what they are trying to do. Is that a place for all customized packages for ArchLinux ARM? I believe we have almost the same thing (or at least the same concept) at GitHub - felixonmars/archriscv-packages: Modified Arch Linux packages for archriscv.

They build images for a wide range of arm sbc with great docu as well

https://archlinuxarm.org/wiki/Raspberry_Pi

Given the similarities, it might be a useful resource to build upon.

1 Like

New kernel release to support FIDO security key on VF2:

I also create an issue on Starfive’s linux repo:

I appreciate you making this project, I’ve just started experimenting with RISC-V and decided I wanted to try booting an old game.

I was able to get Halo 1 working with an RX580 attached, using the WINE-CE project mentioned on this website, using this Arch Linux image with a re-compiled kernel using AMDGPU.

Really cool! A little more power and we can see old games being playable fairly easily :slight_smile:

2 Likes

Starfive is porting SDK to 6.1kernel with downstream driver. I think we could replace them with upstream stuff?
Besides, upstream u-boot is completely usable now (CMA might not be handled since upstream kernel doesn’t have that)

1 Like

I’m running the kernel from the StarFive 6.1 branch on one of my VF2, but it has one major problem: it often fails or is very slow to reboot, which makes the board go offline for too long if I try to reboot it remotely. This refrains me from publishing the new kernel package.

Edit: I just see that there is a new tag for 6.1: VF2_6.1_v3.7.5. I’m building it and will test this one.

3 Likes

Hmm… not sure that it gonna help the reboot problem, but at least they ported the Eswin USB WiFi driver to 6.1 and also fix compatibility problem with WD NVMe SSD.

https://github.com/starfive-tech/linux/compare/VF2_6.1_v3.7.1...VF2_6.1_v3.7.5.diff

$ cat VF2_6.1_v3.7.1...VF2_6.1_v3.7.5.patch |grep "^Subject:"
Subject: [PATCH 1/8] driver: pci: Update reset timing as the requirement in
Subject: [PATCH 2/8] riscv: drm: panel: update radxa panel startup process and
Subject: [PATCH 3/8] net: wireless: eswin: proting esiwn wifi driver
Subject: [PATCH 4/8] net: wireless: eswin: update eswin wifi driver for kernel
Subject: [PATCH 5/8] display : hdmi: fix hotplug hang
Subject: [PATCH 6/8] uart: 8250: add reset operation in runtime PM
Subject: [PATCH 7/8] Mosaic cursor: Revert commit
Subject: [PATCH 8/8] Enlarge flush cache size to avoid flick on
2 Likes