Ancestors

Written by Natanael Copa on 2025-01-06 at 21:20

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

=> More informations about this toot | More toots from ncopa@fosstodon.org

Written by Natanael Copa on 2025-01-06 at 21:20

  1. Create vfat filesystem on 3rd partition:

doas mkfs.vfat /dev/sde3

=> More informations about this toot | More toots from ncopa@fosstodon.org

Written by Natanael Copa on 2025-01-06 at 21:21

  1. 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

=> More informations about this toot | More toots from ncopa@fosstodon.org

Toot

Written by Natanael Copa on 2025-01-06 at 21:23

  1. 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

=> More informations about this toot | More toots from ncopa@fosstodon.org

Descendants

Written by Natanael Copa on 2025-01-06 at 21:24

  1. Unmount the SD card and boot it.

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

Written by Jarkko Sakkinen on 2025-01-06 at 21:32

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

Written by Jarkko Sakkinen on 2025-01-06 at 21:49

@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

Written by Natanael Copa on 2025-01-06 at 22:11

@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

Written by Haelwenn /элвэн/ :triskell: on 2025-01-06 at 21:45

@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

Written by Haelwenn /элвэн/ :triskell: on 2025-01-14 at 12:00

@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

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113783511699949339
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
319.746581 milliseconds
Gemini-to-HTML Time
2.80907 milliseconds

This content has been proxied by September (3851b).