Skip to content

guoweikang/x-kernel

Repository files navigation

X-Kernel

Supported Architectures

  • RISC-V 64
  • LoongArch64
  • AArch64
  • x86_64 (work in progress)

Supported Platforms

Features

  • Tee support

Quick Start

1. Install dependencies

# Rust toolchain
rustup target add aarch64-unknown-none-softfloat

# QEMU (Debian/Ubuntu)
sudo apt install qemu-system

Musl toolchain

Architecture GCC Version Musl Version Origin Link
x86_64 11.2.1 git-b76f37f (2021-09-23) musl.cc
aarch64 11.2.1 git-b76f37f (2021-09-23) musl.cc
riscv64 11.2.1 git-b76f37f (2021-09-23) musl.cc
loongarch64 13.2.0 1.2.5 LoongsonLab

2. Prepare rootfs

Directly run the following commands to build the root filesystem image for the desired architecture:

# Default target: riscv64
make rootfs
# Explicit target
make ARCH=riscv64 rootfs
make ARCH=loongarch64 rootfs

Or you can build your own root filesystem image(only supported ext4 and musl for now)

3. Configuration kernel

You can configure the kernel from the starter configuration with the following command:

make menuconfig

or you can directly copy your own .config file to the kernel source directory,

cp platforms/aarch64-qemu-virst/defconfig .config

3. Build and run on QEMU

You can build and run the kernel on QEMU with the following commands:

# Default target: riscv64
make build
# Explicit target
make ARCH=riscv64 build
make ARCH=loongarch64 build

# Run on QEMU (also rebuilds if necessary)
make ARCH=riscv64 run
make ARCH=loongarch64 run

4. Build for other platforms

You can build the kernel for other supported platforms with the following commands:

make ARCH=xxx PLAT=[platforms/xxxxx] build

License

This project is now released under the Apache License 2.0. See the LICENSE and NOTICE files for details.

About

test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 34

Languages