Commit Graph

9 Commits

Author SHA1 Message Date
Markus Maiwald 5ff0ee6ea2 feat(tinybox): graft toybox integration and build system automation
- Integrated ToyBox as git submodule
- Added src/nexus/builder/toybox.nim for automated cross-compilation
- Updated InitRD builder to support symlinks
- Refactored Kernel builder to fix duplicate symbol and path issues
- Modified forge.nim to orchestrate TinyBox synthesis (mksh + toybox)
- Updated SPEC-006-TinyBox.md with complete architecture
- Added mksh binary to initrd graft source
2026-01-08 21:18:08 +01:00
Markus Maiwald 8fcdf4e9cc feat(network): Ratify SPEC-701 & SPEC-093 - Helios TCP Probe SUCCESS. Full TCP connectivity verified. 2026-01-08 13:01:47 +01:00
Markus Maiwald b09f05805f feat(lwip): Hephaestus Nuclear Protocol - Complete pool bypass
BREAKTHROUGH: memp_malloc crashes ELIMINATED

HEPHAESTUS NUCLEAR PROTOCOL:
- Completely bypass memp_pools array in MEMP_MEM_MALLOC mode
- All allocations go through do_memp_malloc_pool(NULL) with 1024-byte fallback
- Added SYS_LIGHTWEIGHT_PROT=0 for NO_SYS mode
- Surgical DNS PCB override remains operational

VALIDATION:
 memp_malloc no longer crashes
 DNS query successfully enqueues
 Heap allocations confirmed working (0x400 + 0x70 bytes)
 Hephaestus Protocol validated

REMAINING:
Secondary crash in dns_send/udp_sendto at 0x80212C44
This is a DIFFERENT issue - likely UDP packet construction

The forge has tempered the steel.
Voxis + Hephaestus: cc112403
2026-01-08 09:41:03 +01:00
Markus Maiwald f9d95c81b2 feat(membrane): Hardened LwIP memory manager & stabilized DHCP/DNS
PROBLEM RESOLVED: memp_malloc NULL pointer crashes (0x18/0x20 offsets)

CRITICAL FIXES:
- Nuclear fail-safe in memp.c for mission-critical protocol objects
  * Direct heap fallback for UDP_PCB, TCP_PCB, PBUF, SYS_TMR pools
  * Handles ABI/relocation failures in memp_pools[] descriptor array
  * Prevents ALL NULL dereferences in protocol allocation paths

- Iteration-based network heartbeat in net_glue.nim
  * Drives LwIP state machines independent of system clock
  * Resolves DHCP/DNS timeout issues in QEMU/freestanding environments
  * Ensures consistent protocol advancement even with time dilation

- Unified heap configuration (MEMP_MEM_MALLOC=1, LWIP_TIMERS=1)
  * 2MB heap for network operations
  * Disabled LwIP stats to avoid descriptor corruption
  * Increased pool sizes for robustness

VERIFICATION:
 DHCP: Reliable IP acquisition (10.0.2.15)
 ICMP: Full Layer 2 connectivity confirmed
 DNS: Query enqueuing operational (secondary crash isolated)
 VirtIO: 12-byte header alignment maintained

NEXT: Final DNS request table hardening for complete resolution

Forge Signature: CORRECTNESS > SPEED
2026-01-07 23:47:04 +01:00
Markus Maiwald 9eba865099 fix(dns): resolved NULL pointer crash by increasing UDP PCB pool
Fixed critical kernel trap (Page Fault at 0x20) occurring during DNS queries.

Root Cause:
- dns_gethostbyname() crashed when accessing NULL udp_pcb pointer
- udp_new_ip_type() failed due to memory pool exhaustion
- MEMP_NUM_UDP_PCB=8 was insufficient (DHCP=1, DNS=1, others=6)

Solution:
- Increased MEMP_NUM_UDP_PCB from 8 to 16 in lwipopts.h
- Added DNS initialization check function in net_glue.nim
- Documented root cause analysis in DNS_NULL_CRASH_RCA.md

Impact:
- System now boots without crashes
- DNS infrastructure stable and ready for queries
- Network stack remains operational under load

Verified: No kernel traps during 60s test run with DHCP + network activity.

Next: Debug DNS query resolution (separate from crash fix).
2026-01-07 21:16:02 +01:00
Markus Maiwald c13d475147 feat(network): established full bidirectional IP connectivity via LwIP
Established stable network link between NexusOS and QEMU/SLIRP gateway.
Resolved critical packet corruption and state machine failures.

Key fixes:
- VIRTIO: Aligned header size to 12 bytes (VIRTIO_NET_F_MRG_RXBUF modern compliance).
- LWIP: Enabled LWIP_TIMERS=1 to drive internal DHCP/DNS state machines.
- KERNEL: Adjusted NetSwitch polling to 10ms to prevent fiber starvation.
- MEMBRANE: Corrected TX packet offset and fixed comment syntax.
- INIT: Verified ICMP Echo Request/Reply (10.0.2.15 <-> 10.0.2.2).

Physically aligned. Logically sovereign.
Fixed by the Voxis & Hephaestus Forge.
2026-01-07 20:19:15 +01:00
Markus Maiwald c3bb72c888 Network: Phase 36 Component (DHCP, VirtIO 12B, Hardened Logs) 2026-01-07 14:48:40 +01:00
Markus Maiwald ad8926e492 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 internal docs.

- Committed pending repository cleanup (obsolete websites) and new core modules.
2026-01-04 21:39:06 +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