Commit Graph

6 Commits

Author SHA1 Message Date
Markus Maiwald a38bc523a8 feat(build): dual-arch build system — build_nim.sh, build_full.sh, run_aarch64.sh 2026-02-15 19:59:26 +01:00
Markus Maiwald 5c57341b81 fix(rumpk): Fix LwIP kernel build for RISC-V freestanding
- Rebuild liblwip.a from clean sources (removed initrd.o contamination)
- Add switch.o to provide cpu_switch_to symbol
- Add sys_arch.o to provide sys_now and nexus_lwip_panic
- Add freestanding defines to cc.h (LWIP_NO_CTYPE_H, etc.)
- Compile sys_arch.c with -mcmodel=medany for RISC-V

Fixes duplicate symbol errors and undefined reference errors.
Kernel now builds successfully with: zig build -Dtarget=riscv64-freestanding
2026-01-08 19:21:02 +01:00
Markus Maiwald 6e78b7f458 Rumpk Stability, NipBox Boot, and Repository Cleanup
- Fixed Rumpk RISC-V Trap Handler (SSCRATCH swap, align(4), SUM bit) to prevent double faults.

- Stabilized Userland Transition (fence.i, MMU activation) allowing NipBox execution.

- Restored Forge pipeline to build NipBox from source.

- Documented critical RISC-V trap mechanics in .agent/tips.

- Committed pending repository cleanup (obsolete websites) and new core modules.
2026-01-04 21:39:06 +01:00
Markus Maiwald 8aa50eb3ef feat(rumpk): Phase 3.5b Zicroui HUD Integration
- Vision: Updated VISION.md with Zicroui TUI/GUI Hybrid strategy
- Logic Graft: Integrated microui.c directly into Rumpk kernel
- HAL: Added hal/ui.zig (Zig Adapter) and hal/framebuffer.zig (Stub)
- Build: Updated build.sh to compile microui with freestanding headers (libs/microui/include)
- Stubs: Implemented vsnprintf, snprintf, sprint, strtod, qsort in cstubs.c for microui support
- Scheduler: Added dedicated UI Fiber (The Face) to kernel.nim
- Result: Immediate Mode GUI logic running on bare metal RISC-V
2025-12-31 20:18:49 +01:00
Markus Maiwald 46e7be6837 feat(rumpk): Phase 7 Verified - Subject Zero Launch
- Implemented Sovereign Syscall Table at 0x801FFF00
- Added cooperative yielding (s_yield) for Guest/Kernel concurrency
- Initialized Guest RX Ring and flows in Kernel
- Bridged LwIP in Guest via net_glue and ion_client overrides
- Validated TCP handshake and data transmission (Subject Zero -> Host)
- Confirmed 'Hello from the Membrane!' via UART and Network
2025-12-31 20:18:48 +01:00
Markus Maiwald 694a753bed feat: Initialize Rumpk Modular Unikernel
STRATEGIC PIVOT: From Project to Doctrine
==========================================

This commit initializes Rumpk - a ground-zero Zig+Nim unikernel with
POSIX-hostile design, hard ABI barriers, and military-grade security.

DOCUMENTATION (3 New Specs)
---------------------------
• SPEC-008-RUMPK-ARCHITECTURE.md
  - L0 (Zig): Boot, PMM, IRQ, HAL
  - L1 (Nim): LWKT Scheduler, Fibers, Disruptor Ring
  - L2 (ABI): struct HAL function pointers (future Janus socket)
  - L3 (Payload): NPL/NPK loaders, optional POSIX shim
  - SipHash IDs + Ed25519 signed execution

• SPEC-009-RUMPK-IO.md
  - Disruptor Ring: Lock-free O(1) inter-fiber communication
  - Adaptive Governor: War Mode (polling) ↔ Peace Mode (interrupts)
  - Zero VM-exit design (Rumkv does NOT touch packets)

• SPEC-010-SOVEREIGN-HIERARCHY-V2.md
  - /Cas: Immutable Content-Addressable Storage
  - /Cell: Active Containers (Driver/, App/, Sensor/)
  - /Bus: Active Interfaces (replaces /dev)
  - /Data: Mutable Persistence (User/, Volume/)
  - 'The Unix Lie' compatibility layer for legacy apps

VISION.MD UPDATE
----------------
• Added dedicated Rumpk section differentiating from Rumk
• Documented 4-layer architecture with ASCII diagram
• Listed key innovations: Adaptive I/O, Disruptor, SipHash, Ed25519

REPOSITORY STRUCTURE (core/rumpk/)
----------------------------------
core/rumpk/
├── boot/header.zig      # Multiboot2/EFI entry
├── hal/abi.zig          # L0→L1 ABI contract (struct HAL)
├── core/kernel.nim      # kmain() entry point
├── core/ring.nim        # Disruptor ring buffer
├── io/governor.nim      # Adaptive War/Peace I/O
├── build.zig            # Zig build orchestration
└── README.md            # Feature index

DESIGN DECISIONS
----------------
• Hard ABI barrier: Zig exports C-compatible struct to Nim
• Language-agnostic: L1 can be swapped for Janus later
• No shared state: Fibers communicate via Channels only
• No JIT, No W^X violations: Code sections immutable

NEXT STEPS
----------
• Phase 1: Boot on QEMU (print 'Hello Rumpk')
• Phase 2: Nim runtime on bare metal
• Phase 3: Two fibers switching (Ping/Pong)
• Phase 4: NPL loading with signature verification
• Phase 5: VisionFive 2 hardware validation

This is the foundation for the 'OS Factory' vision.
Rumpk + Rumkv + NPL = Independent from Unix/Linux.

Tested: Directory structure validated
Status:  SCAFFOLD COMPLETE
2025-12-31 20:18:47 +01:00