Build and Toolchain - CKCHDX/PROJECT-AION GitHub Wiki
This Build & Toolchain page outlines prerequisites, environment setup, and build instructions for AION.
1. Prerequisites
-
Host OS: Linux or macOS (Ubuntu 20.04+, Debian 11+, or macOS Catalina+)
-
Build Tools:
- GNU Make (v4.3+)
- NASM (v2.15+)
- GCC cross-compiler targeting
i686-elf
(e.g.,gcc-10-i686-elf
) - QEMU (v5.0+ for emulation)
-
Optional:
- GDB for debugging in QEMU
- xxd, hexdump for inspecting binaries
2. Setting Up the Environment
-
Install Dependencies on Ubuntu
sudo apt update sudo apt install build-essential nasm gcc-10-i686-elf qemu-system-x86 gdb xxd
-
macOS via Homebrew
brew install nasm x86_64-elf-gcc qemu gdb
-
Clone the Repository
git clone https://github.com/your-org/AION.git cd AION
3. Build Instructions
-
Full Build
make all
-
Clean Build
make clean && make all
-
Individual Targets
make boot # builds bootloader make kernel # builds kernel binary make qemu # launches with QEMU
4. Running AION
-
In QEMU
make qemu
Launches QEMU with a 16MB RAM stick and VGA output to the terminal.
-
On Real Hardware
-
Write
aion.iso
to USB usingdd
:dd if=build/aion.iso of=/dev/sdX bs=4M status=progress
-
Boot from USB and watch the VGA text panel.
-
5. Debugging Tips
-
QEMU GDB Stub
qemu-system-i386 -cdrom build/aion.iso -S -s
Then in another terminal:
i686-elf-gdb build/kernel.bin (gdb) target remote :1234
-
Inspecting Binaries
xxd build/boot.o | head readelf -h build/kernel.bin