How to create a bootable #AlpineLinux SD-card for VisionFive2 #RISCV:
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
=> More informations about this toot | More toots from ncopa@fosstodon.org
doas mkfs.vfat /dev/sde3
=> More informations about this toot | More toots from ncopa@fosstodon.org
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
=> More informations about this toot | More toots from ncopa@fosstodon.org
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
=> More informations about this toot | More toots from ncopa@fosstodon.org
doas umount /mnt
You should be able to see it boot from a debug UART
[#]Linux #VisionFive2 #RISC-V #AlpineLinux
=> More informations about this toot | More toots from ncopa@fosstodon.org
The very first thing with this board is set the pins to SDIO mode ;-) Figure 4-10 in https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf
=> More informations about this toot | More toots from jarkko@social.kernel.org
@ncopa It's really my recommended board for testing RISC-V kernel. And the reason for this is that it is aging ;-) Also BuildRoot upstream boots it nicely.
=> More informations about this toot | More toots from jarkko@social.kernel.org
@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
=> More informations about this toot | More toots from ncopa@fosstodon.org
@ncopa Maybe this should be in the wiki or something like install.txt file in https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/riscv64/ ?
Meanwhile I reused the script at https://arvanta.net/alpine/alpine-on-visionfive/ as a base because I didn't want some kind of installer dance as I don't have a spare eMMC or M.2 SSD (although I guess the installer could be booted from USB).
=> More informations about this toot | More toots from lanodan@queer.hacktivis.me
@ncopa Also not sure if stock boards have OpenSBI+u-boot flashed but that allows to skip flashing u-boot to SD/eMMC (and NVMe when u-boot is properly configured).
So in the installer case just using one partition that u-boot can read (fat/ext3/ext4) is fine.
=> More informations about this toot | More toots from lanodan@queer.hacktivis.me This content has been proxied by September (3851b).Proxy Information
text/gemini