Running system on sparcv8leon-generic-qemu ¶
These instructions describe how to run a Phoenix-RTOS system image for the sparcv8leon-generic-qemu target
architecture.
Note that the build artifacts, including the system image, should be first provided in the _boot directory.
If you haven’t run the build.sh script yet, run it for sparcv8leon-generic-qemu target.
See Building chapter.
Running the system image¶
Support for the leon3_generic machine in QEMU has been greatly improved in QEMU 9.0.0. It is recommended to use QEMU
version 9.0.0 or later to run the Phoenix-RTOS system image for the sparcv8leon-generic-qemu target architecture.
To obtain QEMU in this version on Ubuntu 22.04, you must build it from source.
How to build QEMU on Ubuntu
Download QEMU 9.0.2 (or later) source code from the official repository and build for the
sparc-softmmutarget:sudo apt update && \ sudo apt install -y ninja-build \ libglib2.0-dev && \ git clone https://gitlab.com/qemu-project/qemu.git -b v9.0.2 && \ cd qemu && \ git submodule update --init --recursive && \ ./configure --target-list=sparc-softmmu && \ make && \ sudo make install
Check if QEMU is properly installed:
qemu-system-sparc --versionQEMU emulator version 9.0.2 (v9.0.2) Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
To run the image under QEMU, use the following script provided in the phoenix-rtos-project repository:
./scripts/sparcv8leon-generic-qemu.sh
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 use command:
help

To get the list of working processes use command:
ps

If you want to quit, you should click on the terminal window, press ctrl + a, release it, and next press the x key.