universalisos/kernel
Fábio Coutada b8af1e6ec2 feat(universalisos): Add comprehensive agent system and context monitoring
## Agent System
- **Plan Maintainer Agent**: Manages session context and verifies todo lists
- **Aurelio Agent**: Imports Claude Code sessions and syncs to backend

## Universalisos Kernel Run Skill
- **Build & Launch**: Automated kernel build and QEMU execution
- **Driver Script**: Test automation with output validation
- **Fixed Issues**: Section directive errors, exception handlers, stack symbols

## Context Monitoring System
- **Measurement**: Real-time token counting and usage tracking
- **Continuous Monitoring**: Background compaction to prevent data loss
- **Automatic Compaction**: Preserves important context to memory
- **Alert System**: Desktop notifications for threshold events
- **Historical Tracking**: Usage trends and optimization recommendations

## Kernel Enhancements
- **Fixed boot.S**: Corrected section directives and stack symbol naming
- **Exception Handlers**: Added C stubs for ARM exception handling
- **RISC-V Support**: Added boot and exception handling for RISC-V
- **Core Components**: IPC, scheduler, heap manager, safety framework

## Integration
- **Aurelio Backend**: PortugalFuturista MCP synchronization
- **Memory System**: Context preservation before compaction
- **Automated Testing**: Driver scripts for all components

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-07 15:44:26 +01:00
..
arch feat(universalisos): Add comprehensive agent system and context monitoring 2026-07-07 15:44:26 +01:00
include/universalisos feat(universalisos): Add comprehensive agent system and context monitoring 2026-07-07 15:44:26 +01:00
src feat(universalisos): Add comprehensive agent system and context monitoring 2026-07-07 15:44:26 +01:00
kernel.cpp feat(universalisos): Add comprehensive agent system and context monitoring 2026-07-07 15:44:26 +01:00
linker.ld feat(universalisos): Add comprehensive agent system and context monitoring 2026-07-07 15:44:26 +01:00
Makefile refactor(kernel): rewrite Stage 1 kernel in C++ 2026-07-06 22:53:50 +01:00
README.md refactor(kernel): rewrite Stage 1 kernel in C++ 2026-07-06 22:53:50 +01:00

Universalisos Kernel — Stage 1 Bare-Metal Skeleton (C++)

This is the first bootable type-1 hypervisor milestone for Universalisos: a minimal bare-metal kernel written in C++ 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 debugging
  • kernel.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 C++ 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.cpp PL011 UART driver
arch/arm/uart.h UART interface
kernel.cpp 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.