xv6-riscv for HiFive Unmatched This is a port of xv6-riscv to the SiFive HiFive Unmatched board (FU740). See notes for the implementation details. Highlights Stability on actual hardware : usertests passed, resolving hardware-specific issues. : passed, resolving hardware-specific issues. Direct M-mode boot via U-Boot SPL : Replaced the standard OpenSBI with xv6 kernel, leveraging SPL for hardware initialization and minimizing kernel modifications. : Replaced the standard OpenSBI with xv6 kernel, leveraging SPL for hardware initialization and minimizing kernel modifications. SD card driver: Ported the SPI mode SD card driver (from SiFive sources) to replace VirtIO. Status Boot setup Boot setup UART output UART output SD card driver SD card driver Pass usertests Pass Validate via 6.1810 labs (local validation only; solutions will not be published) Running on HiFive Unmatched Prerequisites Host environment: Ubuntu 24.04 Install the required packages: sudo apt update sudo apt install git build-essential gdb-multiarch qemu-system-misc \ gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu sudo apt install flex bison libssl-dev python3-setuptools python3-dev \ swig device-tree-compiler u-boot-tools Building Build xv6 kernel Compile the xv6 kernel for the Unmatched target: git clone https://github.com/eyengin/xv6-riscv-unmatched cd xv6-riscv-unmatched make unmatched The unmatched target automatically converts the kernel ELF to a raw binary and packages it into a FIT image ( xv6-unmatched.itb ) using mkimage . This image includes the necessary metadata for U-Boot SPL to recognize it as a bootable firmware. Build U-Boot SPL This port uses U-Boot SPL to load the xv6 kernel directly (replacing OpenSBI in the standard flow). Clone and build v2023.01 (Note: newer versions failed to initialize CPU clocks correctly in the SPL phase): git clone https://github.com/u-boot/u-boot.git cd u-boot git checkout v2023.01 make sifive_unmatched_defconfig # Build SPL (only u-boot-spl.bin is needed...
First seen: 2026-01-11 14:58
Last seen: 2026-01-11 17:58