HiFive Unleashed

From ALT Linux Wiki
Revision as of 14:51, 9 November 2021 by IvanMelnikov (talk | contribs)
Stub.png
Under construction.
This page is not finished yet and may lack substantial information.


SiFive HiFive Unleashed is a RISC‑V development board featuring the Freedom U540 SoC. Its production is discontinued, but it's still supported by Sisyphus riscv64 port.

Regular Images and Simply Linux 9 were released for this board.

Quick start

TBD.

Manual setup

To run the SiFive HiFive Unleashed (FU540) SoC with one of the rootfs images one could proceed through the following steps:

Step 0. Through this manual it is assumed that microSD card is at /dev/sdb. Let us create file systems at the microSD:

root$ sgdisk -g --clear \
        --new=2::+32K    --change-name=2:'fsbl'          --typecode=2:5B193300-FC78-40CD-8002-E86C45580B47 \
        --new=3::+8M:    --change-name=3:'opensbi-uboot' --typecode=3:2E54B353-1271-4842-806F-E436D6AF6985 \
        --new=1::-0      --change-name=1:'root'          --typecode=1:0FC63DAF-8483-4772-8E79-3D69D8477DE4 \
        /dev/sdb
root$ mkfs.ext4 /dev/sdb1
root$ mount /dev/sdb1 /mnt
root$ tar -xpvf hifive-unleashed-riscv64.tar.xz -C /mnt

Step 1.а. The First Stage BootLoader (FSBL) and OpenSBI are placed inside the unpacked /mnt tree. Let us write them to the 2 and 3 partitions respectively, and then unmount /mnt partition.

root$ dd if=/mnt/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M
root$ dd if=/mnt/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M
root$ sync; umount /mnt

Step 1.б. Alternative option: download and install the First Stage BootLoader (FSBL) and OpenSBI for FU540.

For example:

root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm
root$ curl -O http://ftp.altlinux.org/pub/distributions/ALTLinux/ports/riscv64/Sisyphus/noarch/RPMS.classic/opensbi-firmware-fu540-0.6-alt1.noarch.rpm
root$ rpm -i fu540-bootloaders-0-alt1.git54bfc90.noarch.rpm
root$ rpm -i opensbi-firmware-fu540-0.6-alt1.noarch.rpm
root$ dd if=/usr/share/fu540_boot/fsbl.bin of=/dev/sdb2 bs=1M
root$ dd if=/usr/share/opensbi/sifive/fu540/firmware/fw_payload.bin of=/dev/sdb3 bs=1M
root$ sync; umount /mnt

Step 3. System at microSD is ready to boot. For a graphical system, the system setup is performed through VNC.