Running system on riscv64-generic-spike

This version is designated for RISC-V 64 processor based spike machine implemented by the spike (riscv-isa-sim) emulator and qemu-system-riscv64. To launch this version two files should be provided - kernel file integrated with SBI firmware with embedded SBI console driver, dummyfs filesystem and psh shell, and disk image with ext2 filesystem.

The files are created as the final artifact of the phoenix-rtos-project building and are located in the _boot directory. See how to build the Phoenix-RTOS system image

Running image under the spike

Firstly, you need to install a spike simulator.

How to install spike simulator (Ubuntu 20.04)

  1. Clone the riscv-isa-sim Github repository in a 1.1.0 version.

git clone --branch v1.1.0 --single-branch

  1. Enter the downloaded repository

cd riscv-isa-sim

  1. Install the device-tree-compiler

sudo apt-get update && \ sudo apt-get install device-tree-compiler

  1. Install the Spike RISC-V ISA Simulator

mkdir build && \ cd build && \ ../configure --prefix=$RISCV && \ make && \ sudo make install

Then, to run the image under spike you should change the directory to phoenix-rtos-project and type:

spike _boot/riscv64-generic-spike/phoenix.bbl

Running image under qemu

Just like before, you first need to install the emulator.

How to get qemu (Ubuntu 20.04)

  • Install the required packages

sudo apt-get update && \ sudo apt-get install qemu-kvm \ qemu virt-manager \ virt-viewer libvirt-clients \ libvirt-daemon-system \ bridge-utils virtinst \ libvirt-daemon \ qemu-system-misc

  • Check if qemu is properly installed:

qemu-system-riscv64 --version

To run the system image under qemu you should type the following command from the phoenix-rtos-project directory.


Using Phoenix-RTOS

Phoenix-RTOS will be launched and the psh shell command prompt will appear in the terminal. To get the available command list please type:


To get the list of working processes please type:


See also

  1. Running system on targets
  2. Table of Contents