How to create a bootable #AlpineLinux SD-card for VisionFive2 #RISCV:
1) Partition the card. In this example I use /dev/sde. WARNING: Make sure you have the right device.
doas parted /dev/sde --script mklabel gpt \
mkpart primary 2MiB 4MiB set 1 bios_grub on \
mkpart primary 4MiB 6MiB \
mkpart primary 6MiB 100% set 3 boot on
2) Create vfat filesystem on 3rd partition:
doas mkfs.vfat /dev/sde3
3) Mount the boot partition and extract Alpine tarball:
doas mount /dev/sde3 /mnt
curl -s https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/riscv64/alpine-uboot-3.21.1-riscv64.tar.gz | doas tar -C /mnt -zxv
4) Install U-Boot
Write SPL to partition 1 and ITB to partition 2:
doas dd if=/mnt/u-boot/starfive_visionfive2/u-boot-spl.bin.normal.out of=/dev/sde1
doas dd if=/mnt/u-boot/starfive_visionfive2/u-boot.itb of=/dev/sde2
5) Unmount the SD card and boot it.
doas umount /mnt
You should be able to see it boot from a debug UART
@jarkko it is the only board I know that runs nicely with vanilla 6.12 kernel, which is also why we officially can support it