Skip to content

Compiling the kernel

Menix has external submodules as dependencies, to initialize them either run:

Terminal window
git clone https://github.com/menix-os/menix --recurse-submodules

or if you’ve already cloned the repository:

Terminal window
git submodule update --init --recursive

To build the kernel you will need:

  • cargo
  • rustc
  • clang (Used for bindgen)
  • lld

Make sure you have a full nightly toolchain installed, including the rust-src component.

The following commmand will build the kernel and all drivers for x86_64:

Terminal window
cargo +nightly build --release --target toolchain/x86_64-kernel.json