Opvolger/starfiveVisionFive2/Ubuntu2410_outofthebox.md
2025-02-24 22:54:26 +01:00

3.1 KiB

Ubuntu 24.10

It is using the 6.11 kernel. This has the PCI-e controller of StarFive VisionFive 2 + AMDGPU drivers that are working with RISC-V

Flash Ubuntu 24.10 to eMMC

download from the site the image 24.10.

I used "balenaEtcher" to flash this to my eMMC (with an USB to eMMC adapter).

Create/download u-boot without PCI-e initialization and flash to SD

We need a custom u-boot that will not try to initialize the PCI-e controller (scan for m.2 device). Some of the AMDGPU's don't like that (fan 100% and not detected anymore in the kernel)

So on build we need to set CONFIG_PCI_INIT_R and CONFIG_CMD_PCI to n (no).

I all ready create this builds and they can be found here:

Insert you SD-card in you computer

wget https://github.com/Opvolger/ansible-riscv-sd-card-creater/releases/download/0.1.0/release.tgz
tar -xvzf release.tgz
# check where your SD-card is with lsblk, in this example it is /dev/sdb
# delete MBR of SD-Card
sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1 conv=notrunc
# we will create the needed partitions to boot from SD-card
sudo sgdisk --clear \
    --set-alignment=2 \
    --new=1:4096:8191 --change-name=1:spl --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
    --new=2:8192:16383 --change-name=2:uboot --typecode=2:BC13C2FF-59E6-4262-A352-B275FD6F7172 \
    /dev/sdb
# now "flash" the firmware on the sd-card
sudo dd if=release/ubuntu-24-10/u-boot-spl.bin.normal.out of=/dev/sdb1
sudo dd if=release/ubuntu-24-10/u-boot.itb of=/dev/sdb2

If booting ubuntu is not working (you can see it with serial-connection for example screen -L /dev/ttyUSB0 115200), go back to default settings in u-boot with:

how to set the default is explained also in the ubuntu site. The only different is that I am using the sd-card and not the onboard flash.

StarFive #

env default -f -a
env save

Reboot you board (power off/on)

First boot Ubuntu

login with ubuntu/ubuntu (you have to change the password!)

sudo timedatectl set-timezone Europe/Amsterdam
# check if the date is correct (now)!
date
sudo apt update
sudo apt upgrade
# add repo for firefox
sudo add-apt-repository ppa:mozillateam/ppa
# install what default stuff + install kde + firefox + some c dev tools (so you can compile some stuff)
sudo apt install software-properties-common sddm sddm-theme-breeze kde-standard build-essential libxml2 libcurl4-gnutls-dev neofetch ubuntu-dev-tools libopenal-dev libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev libedit-dev python-is-python3 m4 clang sddm-theme-breeze firefox

I did get a configuration i had to fill in: Please enter the default mirror you want to be used by pbuilder. I hit enter and get the question again, so i filled in: http://archive.ubuntu.com/ubuntu and it was installing again.

# now reboot
sudo reboot