Skip to content

Build System

Node1 edited this page Jun 18, 2026 · 3 revisions

Build System

Purpose

This page describes the build-system direction for XAI OS.

Contents

Host

macOS is the first host for bring-up. QEMU on macOS is for correctness and boot architecture, not performance claims.

The host bootstrap script should check QEMU, LLVM/Clang, LLD, Python, Git, image tools, and OVMF availability.

Toolchain

Early kernel code should be freestanding C99 plus minimal architecture assembly. C++ is allowed in userspace, runtime, and AI components, not early kernel core.

The build should use LLVM/Clang, LLD, QEMU, Git, Python for host tooling where useful, and deterministic image scripts.

QEMU Commands

The repository should eventually provide:

  • make all;
  • make image;
  • make qemu;
  • make test;
  • scripts/run-qemu-x86_64.sh;
  • scripts/run-qemu-aarch64.sh.

Disk Images

Disk image creation must be scripted. Build artifacts should live only under ignored output directories.

Expected artifact paths:

build/
out/
dist/

Generated .img, .iso, .efi, .elf, .bin, .map, and .log files must not be committed.

CI Strategy

CI should run formatting, host-side unit tests, image creation, and QEMU smoke boots when available.

Directory Layout

The target source layout is described in Implementation Plan. Keep the main repo clean until implementation files are introduced.

Minimum implementation tree:

boot/uefi/
kernel/arch/x86_64/
kernel/core/
kernel/mm/
kernel/irq/
kernel/dev/
kernel/net/
userspace/init/
runtime/include/xaios/
ai/runtime/
bench/
tests/
scripts/

Acceptance Criteria

  • make all builds the active target.
  • make image creates a bootable image.
  • make qemu starts QEMU on macOS.
  • make test runs host-side checks.
  • Missing tools produce actionable errors.

Related Pages

Clone this wiki locally