Skip to content

Latest commit

 

History

History
182 lines (129 loc) · 4.42 KB

README.md

File metadata and controls

182 lines (129 loc) · 4.42 KB

A9N_header

A9N Microkernel

Contributor Covenant

LLVM C C++ LLVM EDK2

A9N is a Capability-Based Microkernel that supports a variety of hardware platforms through appropriate HAL.
It is implemented with an object-oriented interface, making it easy to use and extend.
It combines high portability, stability, and scalability.

A9N Components list

.
├── src
│   ├── kernel
│   ├── hal
│   │    └── include/hal/interface
│   │    └── {ARCH}
│   ├── boot
│   ├── liba9n
└── test

src/kernel

The main hardware-independent part of the A9N microkernel.

src/hal

A Hardware Abstraction Layer (HAL) is implemented to provide a portable interface to the underlying hardware.
The {ARCH} directory is referenced during the make process.

src/boot

A basic bootloader implementation is provided to load the kernel.
This bootloader is currently only implemented for the x86_64 by EDK2.

Note

The bootloader binary is separated from the kernel binary.

src/liba9n

The A9N base library. Used by the kernel, and HAL.

test

This directory contains the kernel test code, which uses the Google Test framework.
The tests are automatically built and run when you run make.
You can also build them explicitly by running make test.

Important

Currently, tests are failing due to a major kernel specification change and are unavailable.

Architecture Status

Currently supported architectures:

  • x86_64 (Long Mode)

Requirements

Kernel

  • Clang
  • Clang++
  • lld

HAL

x86_64

  • NASM

Boot

x86_64

Test

Run

  • QEMU

Build (with Docker)

docker build -t a9n-build .
docker run --rm -v $(pwd):/A9N a9n-build bash -c "./scripts/setup.sh && make -j8"

Build (Local)

Building with Docker is recommended; This method is deprecated.

sudo apt update && sudo apt install -y \
    bash \
    llvm \
    clang \
    lld \
    libc++-16-dev \
    libc++abi-16-dev \
    nasm \
    make \
    cmake \
    build-essential \
    uuid-dev \
    iasl \
    git \
    python-is-python3 \
    ovmf
./scripts/setup.sh
make -j8

Build (CMake; Experimental)

mkdir build
cmake -B build -DARCH={target_arch} -DCMAKE_TOOLCHAIN_FILE=./src/hal/{target_arch}/toolchain.cmake -DCMAKE_BUILD_TYPE={Debug|Release}
cmake --build build

Note

Currently, the CMake build supports only the kernel binary.

Usage

./scripts/run_qemu.sh

Author

horizon2k38 ( Rekka "horizon" IGUMI )

Email : rekka728 "at" gmail.com
X : @horizon2k38
Mastodon : @horizon2k38@mstdn.jp
Misskey : @horizon

Acknowledgements

MITOU JR : This project was supported by the MITOU Junior program.

  • @kyasbal : My mentor during the MITOU Junior program, who provided valuable advice.
  • @nuta : Gave me a advice on the implementation.

MITOU IT : This project was supported by the MITOU IT program.

  • @sowawa : My mentor during the MITOU IT program, who provided valuable advice.

And I would also like to thank everyone who supported this project.

License

MIT License