Expand description
§StarryOS
A monolithic kernel based on ArceOS.
§Quick Start
§1. Install Build Dependencies
Install cargo-binutils to use rust-objcopy and rust-objdump tools:
cargo install cargo-binutils
§Dependencies for C apps
Install libclang-dev:
sudo apt install libclang-dev
Download & install musl toolchains:
# download
wget https://musl.cc/aarch64-linux-musl-cross.tgz
wget https://musl.cc/riscv64-linux-musl-cross.tgz
wget https://musl.cc/x86_64-linux-musl-cross.tgz
# install
tar zxf aarch64-linux-musl-cross.tgz
tar zxf riscv64-linux-musl-cross.tgz
tar zxf x86_64-linux-musl-cross.tgz
# exec below command in bash OR add below info in ~/.bashrc
export PATH=`pwd`/x86_64-linux-musl-cross/bin:`pwd`/aarch64-linux-musl-cross/bin:`pwd`/riscv64-linux-musl-cross/bin:$PATH
§Dependencies for running apps
# for Debian/Ubuntu
sudo apt-get install qemu-system
# for macos
brew install qemu
Notice: The version of qemu should be no less than 8.2.0.
Other systems, arch and version please refer to Qemu Download
§2. Build & Run
# Clone the base repository
./scripts/get_deps.sh
# Build user applications
make user_apps ARCH=<arch> AX_TESTCASE=<testcases>
# Build kernel
make ARCH=<arch> LOG=<log> AX_TESTCASE=<testcases> build
# Run kernel
make ARCH=<arch> LOG=<log> AX_TESTCASE=<testcases> run
Where testcases are shown under the apps/ folder.
<arch> should be one of riscv64, aarch64, x86_64.
<log> should be one of off, error, warn, info, debug, trace.
More arguments and targets can be found in Makefile.
For example, to run the nimbos testcases on qemu-system-x86_64 with log level info:
make ARCH=x86_64 LOG=info AX_TESTCASE=nimbos run
Note: Arguments like NET, BLK, and GRAPHIC enable devices in QEMU, which take effect only at runtime, not at build time.
Modules§
Macros§
- Macro to generate syscall body
 
Functions§
- main 🔒