Arch Linux Image for VisionFive 2 cwt24 Release
This release introduces the cwt24 image, which includes significant updates and components to enhance functionality and compatibility. The major changes are as follows:
Major Components:
- Arch RISC-V rootfs-2024-09-22 from https://riscv.mirror.pkgbuild.com/
- Kernel based on StarFive’s JH7110_VF2_6.12_v5.14.0
- with patches and configuration from GitHub - cwt-vf2/linux-cwt-starfive-vf2: PKGBUILD for Linux kernel (-cwt) Image on StarFive VisionFive 2
- GPU driver from GitHub - cwt-vf2/img-gpu-vf2: IMG_GPU driver for VisionFive2
- Mesa wrapper for PVR DDK 1.19 from GitHub - cwt-vf2/mesa-pvr-ddk119: Mesa wrapper for PVR DDK 1.19 blobs (StarFive JH7110)
- Inclusion of all WiFi and Bluetooth firmwares from StarFive
Major changes:
- Kernel 6.12 with incremental patches applied to update it to 6.12.18
- Mainline U-Boot v2025.01 built with mainline OpenSBI
- Mesa wrapper for PVR DDK 1.19 replaces the old mesa-pvr-vf2
- StarFive OpenMAX IL Shim Layer is provided as
/usr/lib/libsf-omx-il.so
Here the links to download:
- GitHub Release: Releases · cwt-vf2/archlinux-image-vf2 · GitHub
Login and password:
rootpassword isarchriscv
userpassword isuser
useris sudoer, and it can run sudo without password.
Maximize the partition:
After flashing the image to an SD card of at least 4 GB, please edit partition 4 and expand it to the rest of the available space. Then use the following command to maximize the partition.
$ sudo btrfs filesystem resize max /
Packages and sources:
- The kernel and GPU driver packages are included in the
/root/pkgs/directory. - Sources are on GitHub:
- Build script: GitHub - cwt-vf2/archlinux-image-vf2: Build script to create Arch Linux image for VisionFive 2
- Kernel, headers, and StarFive’s soft_3rdpart: GitHub - cwt-vf2/linux-cwt-starfive-vf2: PKGBUILD for Linux kernel (-cwt) Image on StarFive VisionFive 2
- GPU driver: GitHub - cwt-vf2/img-gpu-vf2: IMG_GPU driver for VisionFive2
- Mesa wrapper for PVR DDK 1.19: GitHub - cwt-vf2/mesa-pvr-ddk119: Mesa wrapper for PVR DDK 1.19 blobs (StarFive JH7110)
- U-Boot: GitHub - cwt-vf2/u-boot-starfive-vf2: U-Boot for StarFive RISC-V VisionFive 2 Board
How to boot directly from NVMe SSD:
Warning: Following these steps will destroy any data on your NVMe SSD.
In theory, you could just
ddyour micro SD to the NVMe SSD, but I would not recommend doing so while the mounted storage is in use.
- Ensure that
SPLandU-Booton your board are up to date. - Copy or download the cwt24 image to
/tmpor any directory of your choice. - Discard all data on your NVMe SSD (whole disk trimming):
$ sudo blkdiscard /dev/nvme0n1 - Use
ddto copy the image to the NVMe SSD:$ zstd -c -T0 -d ArchLinux-VF2_6.12_v5.14.0-cwt24.img.zst \ | sudo dd of=/dev/nvme0n1 bs=32M \ iflag=fullblock oflag=direct \ status=progress - Shutdown your device, set the DIP switch to flash mode (0-0), remove the SD card, and then power it on.
- Maximize the partition.
How to update the previous image without rewrite the SD card:
You should upgrade the onboard firmware (SPL and U-boot) to the latest version first.
Make sure you are going to write the firmware to the right MTD partition.
$ cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00001000 "spl"
mtd1: 00010000 00001000 "uboot-env"
mtd2: 00300000 00001000 "uboot"
mtd3: 00100000 00001000 "data"
In this case, spl is mtd0, and uboot is mtd2.
Please note that the MTD partitions have been rearranged and resized in the past, and now
ubootis located onmtd2. Therefore, it is important to always check withcat /proc/mtdbefore performing the firmware upgrade.
$ sudo pacman -U /root/pkgs/u-boot-starfive-vf2-2025.01-1-riscv64.pkg.tar.zst
$ sudo flashcp -v /usr/share/u-boot-starfive-vf2/u-boot-spl.bin.normal.out /dev/mtd0
$ sudo flashcp -v /usr/share/u-boot-starfive-vf2/u-boot.itb /dev/mtd2
You can download the Kernel and GPU packages and then update the previous cwt image efortlessly.
$ wget https://raw.githubusercontent.com/cwt-vf2/linux-cwt-starfive-vf2/6.12/kernel-update.sh
$ chmod 755 kernel-update.sh
$ ./kernel-update.sh
The img-gpu binary hasn’t changed since the last build, so just use the old one. If you are running on an image older than cwt19, please execute the following commands.
$ wget https://github.com/cwt-vf2/img-gpu-vf2/releases/download/cwt19-1.19.6345021-6/img-gpu-vf2-1.19.6345021-6-riscv64.pkg.tar.zst
$ sudo pacman -U *.tar.zst
$ sudo reboot