Arch Linux Image for VisionFive 2 cwt21.2 Release
This release introduces the cwt21.2 image, which includes significant updates and components to enhance functionality and compatibility. The major changes are as follows:
Major Components:
The cwt21.2 image includes the following major components:
- Arch RISC-V rootfs-2024-03-30 from https://riscv.mirror.pkgbuild.com/
- Kernel based on StarFive’s JH7110_VF2_515_v5.11.3 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 for PowerVR GPU from GitHub - cwt-vf2/mesa-pvr-vf2: Used to be a clone of https://aur.archlinux.org/mesa-pvr-vf2.git to host the binary package
- Inclusion of all WiFi and Bluetooth firmwares from StarFive
Major changes:
- The
linux-firmware
package is installed. - A missing Wave5 firmware has been added.
- The AppArmor service is installed and enabled.
- The image compression has been changed from xz to zstd.
Here the links to download:
- GitHub Release: Releases · cwt-vf2/archlinux-image-vf2 · GitHub
- The previous images are kept in my Google Drive and Naver MyBox for now.
- Google Drive: VisionFive2 - Google 云端硬盘
- Naver MyBox: 네이버 MYBOX
Login and password:
root
password isarchriscv
user
password isuser
user
is 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.
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 for PowerVR GPU: GitHub - cwt-vf2/mesa-pvr-vf2: Used to be a clone of https://aur.archlinux.org/mesa-pvr-vf2.git to host the binary package
How to boot directly from NVMe SSD:
Warning: Following these steps will destroy any data on your NVMe SSD.
In theory, you could just
dd
your micro SD to the NVMe SSD, but I would not recommend doing so while the mounted storage is in use.
- Ensure that
SPL
andU-Boot
on your board are up to date. - Copy or download the cwt21.2 image to
/tmp
or any directory of your choice. - Discard all data on your NVMe SSD (whole disk trimming):
blkdiscard /dev/nvme0n1
- Use
dd
to copy the image to the NVMe SSD:
zstd -c -T0 -d ArchLinux-VF2_5.15.2_v5.11.3-cwt21.2.img.zst | dd of=/dev/nvme0n1 bs=32M 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.
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 in the latest StarFive kernel, the MTD partitions have been rearranged, and now
uboot
is located onmtd2
. Therefore, it is important to always check withcat /proc/mtd
before performing the firmware upgrade.
$ mkdir fw && cd fw
$ wget https://github.com/starfive-tech/VisionFive2/releases/download/JH7110_VF2_515_v5.11.3/u-boot-spl.bin.normal.out
$ wget https://github.com/starfive-tech/VisionFive2/releases/download/JH7110_VF2_515_v5.11.3/visionfive2_fw_payload.img
$ sudo flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
$ sudo flashcp -v visionfive2_fw_payload.img /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/5.15/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