Skip to content

Instantly share code, notes, and snippets.

@kth5
Last active January 9, 2024 12:53
Show Gist options
  • Save kth5/119656250a90c70ba166205fe85e4193 to your computer and use it in GitHub Desktop.
Save kth5/119656250a90c70ba166205fe85e4193 to your computer and use it in GitHub Desktop.
Sopho 2042 / Milk-V Pioneer firmware build intructions

DRAFT status

This is very much a draft still as I go along. Everything in here is subhect to change heavily, could be wrong and your mileage may vary greatly.

Everything here assumes native building on Arch POWER.

Prerequisites

This gets a compatible GCC 13.2.1+patches & Binutils 2.41+patches along with newlib 4.1.0.

pacman -Sy base-devel riscv64-unknown-elf-newlib

ZSBL Build with recent GCC+Binutils

git clone https://github.com/milkv-pioneer/zsbl
KCFLAGS="-march=rv64gc_zicsr_zifencei -pipe" KAFLAGS="-march=rv64gc_zicsr_zifencei" make

Generated images are in the top level directory.

OpenSBI build

git clone https://github.com/milkv-pioneer/opensbi
make PLATFORM=generic -j2

Generated firmware is located in build/platform/generic/firmware/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment