A modular OS-Kernel model written in Rust. It's a base on which We study how to use components to construct various kernels.
Many original components come from ArceOS.
Current target is to construct a monolithic kernel which is compatible with Linux-ABI, i.e. any linux binary user-app can work on lkmodel directly.
Install cargo-binutils to use necessary tools:
cargo install cargo-binutilsInstall qemu:
# for Debian/Ubuntu
sudo apt install qemu-systemInstall gcc-riscv64-linux-gnu:
sudo apt install gcc-riscv64-linux-gnuInstall ltp - Linux Test Project (a forked version with minor fixes).
Put it into the same parent directory with lkmodel itself.
git clone git@github.com:shilei-massclouds/ltp.git
cd ltp
make autotools
./mk_riscv64.shDirectory layout is just as below:
ParentDir
|
+---lkmodel
|
+---ltp
|
make prepare
make runA monolithic kernel with initial user-app hello starts as below:
[userland]: Hello, Init! Sqrt(1048577) = 35190The full form of building command:
make run LOG=<log> INIT=path/to/user_app<log> should be one of off, error, warn, info, debug, trace.
Run btp tests (internal tests):
make prepare
make run INIT=/btp/sbin/runbtpRun ltp tests (work in process):
make prepare
make run INIT=/btp/sbin/runltpRun all base components tower-tests:
./test_all.sh