- Add kernel/arch/arm/boot.S with ARMv7 assembly entry, stack setup, BSS clear - Add kernel/arch/arm/linker.ld for QEMU virt memory layout (load at 0x40000000) - Add kernel/arch/arm/uart.c/uart.h for PL011 serial output - Add kernel/kernel.c with kernel_main() idle loop - Add kernel/Makefile for arm-none-eabi-gcc cross-compile and QEMU launch - Add kernel/README.md with build/run instructions - Ignore kernel build artifacts in .gitignore |
||
|---|---|---|
| .. | ||
| arch/arm | ||
| kernel.c | ||
| Makefile | ||
| README.md | ||
Universalisos Kernel — Stage 1 Bare-Metal Skeleton
This is the first bootable type-1 hypervisor milestone for Universalisos: a
minimal bare-metal kernel that runs on QEMU's ARM virt machine and prints to
the PL011 UART.
Building
Requires arm-none-eabi-gcc and qemu-system-arm.
cd kernel
make
Outputs:
kernel.elf— ELF image for debuggingkernel.bin— raw binary for QEMU-kernel
Running in QEMU
make run
This runs qemu-system-arm with the ELF image so that QEMU loads the kernel
at the address specified in the linker script.
Expected output:
Universalisos type-1 hypervisor booted.
Stage 1: bare-metal skeleton running on QEMU ARM virt.
Press Ctrl+A then X to exit QEMU.
Inspecting the binary
make dump
Layout
| File | Purpose |
|---|---|
arch/arm/boot.S |
Assembly entry point, stack/BSS setup |
arch/arm/linker.ld |
Memory layout for QEMU virt (load at 0x40000000) |
arch/arm/uart.c |
PL011 UART driver |
arch/arm/uart.h |
UART interface |
kernel.c |
kernel_main() entry point |
Design notes
- The kernel is loaded by QEMU at RAM base
0x40000000. - A 64 KiB stack is reserved immediately after the BSS section.
- Interrupts are disabled in the boot stub; the kernel idles with
wfi.