Arch Linux Image for VisionFive 2 cwt19 Release
This release introduces the cwt19 image, which includes significant updates and components to enhance functionality and compatibility. The major changes are as follows:
Major Components:
The cwt19 image incorporates the following major components:
- Arch RISC-V rootfs-2023-10-09 from https://riscv.mirror.pkgbuild.com/
- Kernel based on StarFive’s JH7110_VF2_515_v3.9.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
Major Changes:
- Renamed kernel and GPU to be shorter and consistent.
- All repositories moved to cwt's VisionFive 2 works · GitHub
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 cwt19 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:
xzcat ArchLinux-VF2_5.15.2_v3.9.3-cwt19.img.xz | 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.
$ cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00001000 "spl"
mtd1: 00400000 00001000 "uboot"
mtd2: 00010000 00001000 "uboot-env"
mtd3: 00a00000 00001000 "reserved-data"
In this case, spl
is mtd0
, and uboot
is mtd1
. Please note that in the latest StarFive kernel, the MTD partitions have been rearranged so that uboot
is now on mtd2
. Therefore, it’s important to always check with cat /proc/mtd
.
$ mkdir fw && cd fw
$ wget https://github.com/starfive-tech/VisionFive2/releases/download/JH7110_VF2_515_v3.9.3/u-boot-spl.bin.normal.out
$ wget https://github.com/starfive-tech/VisionFive2/releases/download/JH7110_VF2_515_v3.9.3/visionfive2_fw_payload.img
$ sudo flashcp -v u-boot-spl.bin.normal.out /dev/mtd0
$ sudo flashcp -v visionfive2_fw_payload.img /dev/mtd1
You can download the Kernel and GPU packages and then update the previous cwt
image efortlessly.
$ mkdir cwt19 && cd cwt19
$ wget https://github.com/cwt-vf2/linux-cwt-starfive-vf2/releases/download/cwt19-3.9.3-1/linux-cwt-515-starfive-vf2-19.3.9.3-1-riscv64.pkg.tar.zst
$ wget https://github.com/cwt-vf2/linux-cwt-starfive-vf2/releases/download/cwt19-3.9.3-1/linux-cwt-515-starfive-vf2-headers-19.3.9.3-1-riscv64.pkg.tar.zst
$ wget https://github.com/cwt-vf2/linux-cwt-starfive-vf2/releases/download/cwt19-3.9.3-1/linux-cwt-515-starfive-vf2-soft_3rdpart-19.3.9.3-1-riscv64.pkg.tar.zst
$ 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