I have rebuilt the kernel from release v3.0.4 for cwt13 to include Btrfs and various other USB, network, and WiFi drivers. Additionally, it includes almost everything in the “Networking” section as I intend to use this board as a home server in the future. As such, I did not focus much on the GUI and GPU. However, I also built the JPU, VENC, and VDEC modules for this kernel.
I used the rootfs from https://riscv.mirror.pkgbuild.com/ to create my own initial image and subsequently updated all packages and installed NetworkManager, OpenSSH and other necessary components to make it ready for use.
Changelog for the cwt13 image:
- The default hostname has been changed to ArchVF2 to distinguish it from the official image.
- The kernel is built from the VF2_v3.0.4 tag, which includes the latest benefits and fixes from StarFive, and then update the kernel to version 5.15.2 plus some additional patches (The patches are in
/home/user/VisionFive2/patches/
). - The SPL and U-Boot were written (
dd
) into the first and second partitions on the SD image. Make sure to set the DIP switch to boot in SD mode. - The visionfive2-img-gpu driver from @trissylegs has been rebuilt with the new blob from StarFive, the
clinfo
andvulkaninfo
commands has been installed too.
Here the links to download:
-
Google Drive: VisionFive2 - Google 云端硬盘
-
Naver MyBox: 네이버 MYBOX
-
Make sure you got the corrected sha256sum:
- The xz compressed file: ArchLinux-VF2_5.15.2_v3.0.4-cwt13.img.xz
c86bfc4b44fa294c741977c6fff83807e586e6036fd59c961e84311782625487
- The raw image file: ArchLinux-VF2_5.15.2_v3.0.4-cwt13.img
bf282027ae095f2053adcd1a23026bbb22d543980dc87d19554cf5071d0eafe0
- The xz compressed file: ArchLinux-VF2_5.15.2_v3.0.4-cwt13.img.xz
Login and password:
root
is locked
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 /
The kernel source and other necessary components such as GPU drivers are already included in the /home/user/VisionFive2/
directory.
How to boot directly from NVMe:
- Make sure you understand everything I write here before running the commands on your board.
- Flash the new firmware:
pacman -S mtd-utils flashcp -A -v /home/user/VisionFive2/firmware/u-boot-spl.bin.normal.out /dev/mtd0 flashcp -A -v /home/user/VisionFive2/firmware/visionfive2_fw_payload.img /dev/mtd2
- Create the partitions layout the same as on the SD Image. However, I’m not certain about the need of first and second partitions, but I just set them accordingly and my board just booted successfully.
-
fdisk /dev/nvme0n1
and then set the NVMe partitions layout as below:- Disklabel type: gpt
- Partitions:
- start: 4096 end: 8191 type: 2E54B353-1271-4842-806F-E436D6AF6985
- start: 8192 end: 16383 type: 5B193300-FC78-40CD-8002-E86C45580B47
- start: 16384 end: 221183 type: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
- start: 221184 end: [the rest of it] type: 0FC63DAF-8483-4772-8E79-3D69D8477DE4
- Format the third and fourth partitions:
pacman -S dosfstools
mkfs.vfat -n EFI /dev/nvme0n1p3
mkfs.btrfs --checksum xxhash -L VF2_v3.0.4 /dev/nvme0n1p4
- Copy data and files to NVMe
dd if=/dev/mmcblk1p1 of=/dev/nvme0n1p1
dd if=/dev/mmcblk1p2 of=/dev/nvme0n1p2
-
mkdir /tmp/boot mount /dev/nvme0n1p3 /tmp/boot rsync -av /boot/ /tmp/boot/ sed -i -e 's/mmcblk1/nvme0n1/g' -e 's/.minimal//gI' /tmp/boot/extlinux/extlinux.conf umount /tmp/boot mkdir /tmp/nvme mount -o compress=zstd /dev/nvme0n1p4 /tmp/nvme btrfs subvolume create /tmp/nvme/arch btrfs subvolume create /tmp/nvme/home mount /mnt rsync -av /mnt/arch-minimal/ /tmp/nvme/arch/ rsync -av --exclude user/VisionFive2 /mnt/home/ /tmp/nvme/home/ sed -i -e 's/mmcblk1/nvme0n1/g' -e 's/-minimal//g' /tmp/nvme/arch/etc/fstab umount /tmp/nvme
- Shutdown, set DIP switch to flash mode (0-0), remove the SD card, and then power on.