ARM_OS is a small educational operating system for ARM, currently targeting the
QEMU vexpress-a9 machine with a Cortex-A9 CPU.
The project is built from scratch and includes a custom boot path, high-half kernel, basic memory management, user-space process support, syscalls, a framebuffer-backed TTY, an initramfs, and an early VFS/filesystem layer.
- ARMv7 Cortex-A9 target
- QEMU
vexpress-a9support - Custom bootloader
- High-half kernel mapping
- MMU setup
- Physical and virtual memory management
- Kernel heap
- User task loading and scheduling
- Basic syscall layer
- User-space programs
- Initramfs support
- Early VFS layer
- Dummy filesystem and dummy disk image
- Console backend abstraction
- Framebuffer console using PL111
- TTY-backed standard input/output/error
- UART RX interrupt-driven input
- Kernel log output through UART
- Kernel log ring buffer exposed through
/dev/klog - User-space
dmesg-style log reader - Timer-based scheduling
- Sleep syscalls
- Basic kernel watchdog
- Minimal libc-like user library
bootloader/ Early boot code
kernel/arch/arm/ ARM-specific startup, vectors, IRQ, MMU code
kernel/core/ Kernel entry, scheduler, panic, watchdog, boot info
kernel/mm/ Physical memory, virtual memory, heap, user access
kernel/proc/ User task and program loader support
kernel/sys/ Syscall dispatch and syscall implementations
kernel/fs/ VFS, initramfs, dummy filesystem, dummy disk
kernel/drivers/ UART, framebuffer and low-level device drivers
kernel/console/ Kernel/user-visible console support
kernel/time/ Kernel time and sleep support
userlib/ Minimal libc-like user-space library
user/programs/ User-space programs
tools/ Host-side image generation tools
You need an ARM bare-metal toolchain and QEMU:
arm-none-eabi-gcc
arm-none-eabi-as
arm-none-eabi-ld
arm-none-eabi-objcopy
qemu-system-arm
python3
makeOn macOS, these are typically available through Homebrew.
makeThis builds:
- the bootloader
- the kernel
- user-space programs
- the initramfs image
- the final boot image
Serial-only mode:
make runFramebuffer mode:
make run-fbOn macOS, run-fb uses QEMU Cocoa fullscreen mode because the PL111 window may
otherwise open too small.
Start QEMU paused with a GDB server:
make debugThen connect with an ARM-capable GDB:
arm-none-eabi-gdb build_kernel/kernel.elf
target remote :1234The system currently builds a small set of user-space programs into the initramfs:
/init/bin/console/bin/cp/bin/echo/bin/mv/bin/print/bin/dmesg
User-space is linked against userlib, a small libc-like library adapted for
this OS.
Planned work includes:
- Cleaner kernel subsystem boundaries
- Better boot diagnostics and hardware reporting
- Device abstraction for character and block devices
- Block device abstraction
- FAT12 and FAT16 filesystem support
- exFAT support
- Network device abstraction
- Ethernet, ARP, IPv4 and ICMP
- UDP support
- TCP/IP stack
- More complete userland
This is an experimental operating system under active development. Interfaces and internal structure are expected to change frequently.