Skip to content

Commit 94d27ab

Browse files
author
Nathan
committed
v0.10.1: T61 hardware optimization - matrix rain on all tiers, HDA audio fix (AD1984/CX20549 EAPD + power-on delay), GitHub Pages site
Desktop: - Removed aggressive cpu_limited threshold (3GHz->1.5GHz) that locked Core 2 Duo to Minimal tier - Matrix rain now renders on ALL tiers: Full=4 layers, Standard=2, Minimal=1 - Auto-tier grace period extended to 120 frames for slower hardware startup Audio (HDA): - AD1984/CX20549 codec power-on delay increased to 100ms (was 1ms) for ICH8 chipset - EAPD fix: write 0x02 (enable only) instead of 0x06 (enable+L/R swap) which caused silence - AFG (node 1) powered first with 10ms delay before widget power-on - AFG master output amp unmuted - 5ms delay after DAC format change for converter stabilization - Added diagnostic serial logging for pin/DAC/EAPD configuration SEO: - Added docs/index.html for GitHub Pages (JSON-LD, Open Graph, Twitter Card)
1 parent fc2ef3a commit 94d27ab

8 files changed

Lines changed: 2495 additions & 51 deletions

File tree

‎README.md‎

Lines changed: 90 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,45 @@
11
<div align="center">
22

3+
<!-- To add a logo: place a logo.png in media/ and uncomment the line below -->
4+
<!-- <img src="media/logo.png" alt="TrustOS" width="200"/> -->
5+
36
# TrustOS
47

58
### The OS you can actually read.
69

7-
**A bare-metal operating system written entirely in Rust — 257,000 lines, zero C, zero binary blobs, zero secrets.**
10+
**A bare-metal operating system written entirely in Rust — 261,000+ lines, zero C, zero binary blobs, zero secrets.**
811

912
*Built by one developer. Auditable by anyone.*
1013

1114
[![Build](https://img.shields.io/badge/build-passing-brightgreen?style=for-the-badge)]()
1215
[![Rust](https://img.shields.io/badge/100%25%20Rust-F74C00?style=for-the-badge&logo=rust&logoColor=white)]()
13-
[![Lines](https://img.shields.io/badge/code-257%2C000%2B%20lines-blue?style=for-the-badge)]()
16+
[![Lines](https://img.shields.io/badge/code-261%2C000%2B%20lines-blue?style=for-the-badge)]()
1417
[![Architectures](https://img.shields.io/badge/arch-x86__64%20%7C%20ARM64%20%7C%20RISC--V-blueviolet?style=for-the-badge)]()
15-
[![Version](https://img.shields.io/badge/version-0.9.5-orange?style=for-the-badge)]()
18+
[![Version](https://img.shields.io/badge/version-0.10.0-orange?style=for-the-badge)]()
1619
[![Tests](https://img.shields.io/badge/tests-96%2F96%20(100%25)-brightgreen?style=for-the-badge)]()
1720
[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=for-the-badge)](LICENSE)
1821
[![Author](https://img.shields.io/badge/created%20by-Nated0ge-ff69b4?style=for-the-badge&logo=github&logoColor=white)](https://github.com/nathan237)
1922

2023
[![Watch the demo](https://img.shields.io/badge/%E2%96%B6%20Watch%20Demo-YouTube-red?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/RBJJi8jW1_g)
2124

22-
[What's New](#-whats-new-in-v095) | [Download](#-download) | [Why TrustOS](#-why-trustos) | [JARVIS AI](#-jarvis----on-device-ai) | [Features](#-features) | [Quick Start](#-quick-start) | [Changelog](#-changelog)
25+
<img src="media/screenshots/screenshot_desktop.png" alt="TrustOS Desktop" width="720"/>
26+
27+
[What's New](#-whats-new-in-v0100) | [Download](#-download) | [Why TrustOS](#-why-trustos) | [JARVIS AI](#-jarvis----on-device-ai) | [Features](#-features) | [Quick Start](#-quick-start) | [Changelog](#-changelog)
2328

2429
---
2530

2631
</div>
2732

28-
## 🆕 What's New in v0.9.5
33+
## 🆕 What's New in v0.10.0
2934

30-
> **March 13, 2026** — Hardware Compatibility Hardening
35+
> **March 13, 2026** — Real Hardware Stability (Lenovo T61 Tested)
3136
32-
- 🔧 **Serial port safe on all hardware** — UART 16550 loopback detection at init: systems without a serial controller skip serial output entirely instead of hanging. Write timeout (100K iterations) prevents stuck UART from blocking the kernel.
33-
- 🔧 **APIC timer never stalls** — If PIT-based LAPIC calibration returns 0 ticks (PIT absent/broken), a conservative fallback (1000 ticks/ms) is used. `start_timer()` also self-heals: if called with uncalibrated tpm, it applies the fallback and starts anyway. Preemptive scheduling is now guaranteed.
34-
- 🖥️ **4K OOM protection** — Backbuffer allocation capped at 16 MB (~2560×1600). On 4K+ displays the OS falls back to direct framebuffer rendering instead of OOM-panicking the kernel heap.
35-
- 🖥️ **BPP validation** — Framebuffer bpp is now stored and checked; non-32bpp framebuffers log a warning (Limine always provides 32bpp, but firmware edge cases are handled).
36-
- 📊 **257,000+ lines** across 473 source files, 3 architectures.
37+
- 🔧 **Desktop freeze fixed** — Root cause: `serial::read_byte()` didn't check `SERIAL_PRESENT` on hardware with no cable. UART noise caused the keyboard loop to spin forever. Now gated + loop capped at 32 keys/frame.
38+
- 🔊 **HDA audio on real hardware** — ICH8 codec wake timeout raised to 50ms, Analog Devices AD198x / Conexant CX205xx quirks, EAPD enable, proper amp unmute for L+R channels.
39+
- 🛡️ **SIMD/FPU safe on real BIOS** — `fninit` + `ldmxcsr 0x1F80` in `enable_sse()` masks all SIMD/FPU exceptions (real BIOS leaves dirty state). New IDT handlers for #NM, #SS, #MF, #XM.
40+
- 🖥️ **Fallible buffer allocations** — Framebuffer double buffer, background cache, and OpenGL depth buffer now use `try_reserve_exact` instead of panicking on OOM.
41+
- 🔧 **Serial/APIC/4K hardening (v0.9.5)** — UART loopback detection, APIC timer fallback, backbuffer capped at 16 MB, BPP validation.
42+
- 📊 **261,000+ lines** across 476 source files, 3 architectures.
3743

3844
---
3945

@@ -51,15 +57,55 @@
5157
qemu-system-x86_64 -cdrom trustos.iso -m 512M -cpu max -smp 4 -display gtk -vga std -serial stdio
5258
```
5359

54-
> 💡 Or flash to a USB drive and boot on real hardware — TrustOS runs bare-metal on x86_64 PCs (UEFI or Legacy BIOS), ARM64 phones/tablets, and RISC-V boards.
55-
>
56-
> **Flash to USB with [Rufus](https://rufus.ie/):**
57-
> 1. Open Rufus → select your USB drive → click **SELECT** → pick the `.iso`
58-
> 2. Rufus will ask: **ISO mode** or **DD Image mode** → pick **DD Image mode**
59-
> 3. Click **START** — the target system field stays greyed out, that's normal in DD mode
60-
> 4. Boot your PC from USB (F12 / DEL at startup) — works on both UEFI and Legacy BIOS
61-
>
62-
> On Linux: `dd if=trustos.iso of=/dev/sdX bs=4M status=progress`
60+
### 💾 Flash to USB with [Rufus](https://rufus.ie/)
61+
62+
TrustOS runs bare-metal on x86_64 PCs (UEFI or Legacy BIOS), ARM64 phones/tablets, and RISC-V boards. Flash the ISO to a USB drive and boot on real hardware:
63+
64+
<details>
65+
<summary><b>🔹 UEFI Boot (modern PCs, 2012+)</b></summary>
66+
67+
1. Download & open [**Rufus**](https://rufus.ie/) (no install needed)
68+
2. **Device** → select your USB drive
69+
3. **Boot selection** → click **SELECT** → pick `trustos.iso` or `trustos-jarvispack.iso`
70+
4. Rufus will ask: **ISO mode** or **DD Image mode** → pick **DD Image mode**
71+
5. **Click START** — the partition scheme / target system fields stay greyed out in DD mode, that's normal
72+
6. Wait for the write to finish (~30 seconds)
73+
7. Reboot your PC → press **F12** / **F2** / **DEL** at startup to open the boot menu
74+
8. Select your USB drive (it may appear as `UEFI: <USB name>`)
75+
9. TrustOS boots! 🚀
76+
77+
> ⚠️ If your PC has **Secure Boot** enabled, you may need to disable it in BIOS settings first (Security → Secure Boot → Disabled). TrustOS does not use signed bootloaders.
78+
79+
</details>
80+
81+
<details>
82+
<summary><b>🔹 Legacy BIOS Boot (older PCs, pre-2012 or CSM mode)</b></summary>
83+
84+
1. Download & open [**Rufus**](https://rufus.ie/) (no install needed)
85+
2. **Device** → select your USB drive
86+
3. **Boot selection** → click **SELECT** → pick `trustos.iso` or `trustos-jarvispack.iso`
87+
4. Rufus will ask: **ISO mode** or **DD Image mode** → pick **DD Image mode**
88+
5. **Click START** — the partition scheme / target system fields stay greyed out in DD mode, that's normal
89+
6. Wait for the write to finish (~30 seconds)
90+
7. Reboot your PC → press **F12** / **F2** / **DEL** at startup to open the boot menu
91+
8. Select your USB drive (non-UEFI entry, usually just the drive name without `UEFI:` prefix)
92+
9. TrustOS boots via Legacy/CSM! 🚀
93+
94+
> 💡 On some PCs, you need to enable **CSM** (Compatibility Support Module) or **Legacy Boot** in BIOS settings for the Legacy option to appear.
95+
96+
</details>
97+
98+
<details>
99+
<summary><b>🔹 Linux / macOS (dd)</b></summary>
100+
101+
```bash
102+
# Replace /dev/sdX with your USB device (use lsblk to find it)
103+
sudo dd if=trustos.iso of=/dev/sdX bs=4M status=progress conv=fsync
104+
```
105+
106+
</details>
107+
108+
> **Why DD Image mode?** TrustOS uses a hybrid ISO (Limine bootloader) that embeds both UEFI and Legacy BIOS boot sectors directly in the image. DD mode writes the raw image byte-for-byte, preserving both boot paths. ISO mode would reformat the drive and break the hybrid layout.
63109
64110
All releases: [**github.com/nathan237/TrustOS/releases**](https://github.com/nathan237/TrustOS/releases)
65111

@@ -75,7 +121,7 @@ JARVIS is a **4.4-million-parameter transformer** running in Ring 0 — bare-met
75121
### ⚡ A compiler that generates native machine code — inside the OS
76122
TrustLang compiles your programs to **raw x86_64 Intel instructions** and executes them, all from within the kernel. No LLVM. No GCC. No external toolchain. Write code → native binary → execute. The entire compiler is 3,555 lines of Rust.
77123

78-
### 🔍 257,000 lines — and you can read every single one
124+
### 🔍 261,000 lines — and you can read every single one
79125
No binary blobs. No proprietary drivers. No hidden telemetry. **Every driver, every protocol, every pixel, every encryption algorithm, every line of AI** is open Rust. One developer built it. Anyone can audit it.
80126

81127
### 🌐 Self-replicating distributed AI
@@ -109,7 +155,7 @@ trustlang bench → Benchmark native vs VM (shows speedup)
109155
trustlang test → 55+ automated test suite
110156
```
111157

112-
3,555 lines. Lexer → Parser → AST → Bytecode OR native x86_64. Dual execution backends.
158+
3,612 lines. Lexer → Parser → AST → Bytecode OR native x86_64. Dual execution backends.
113159

114160
### 2. Kernel-Resident AI Transformer (JARVIS)
115161

@@ -228,7 +274,7 @@ kernel/src/jarvis_hw/ # 3,111 lines — hardware intelligence
228274
- Full pipeline: Lexer → Parser → AST → Compiler → Bytecode VM **+ native x86_64 backend**
229275
- 20 builtin functions: `print`, `pixel`, `fill_rect`, `draw_circle`, `screen_w`, `sleep`…
230276
- REPL, file execution, syntax checker, native benchmark
231-
- 3,555 lines, dual execution mode (interpreted + native)
277+
- 3,612 lines, dual execution mode (interpreted + native)
232278

233279
### Network Stack (all from scratch)
234280
- VirtIO-net driver, TCP/IP (ARP, DHCP, DNS, TCP, UDP, ICMP), IPv6 + ICMPv6
@@ -279,12 +325,12 @@ Port scanner, packet sniffer, banner grabber, host discovery, traceroute, vulner
279325

280326
| | |
281327
|---|---|
282-
| **257,000+ lines** of pure Rust | **96/96** self-tests passing (100%) |
283-
| **473** source files | **144 FPS** SIMD desktop |
328+
| **261,000+ lines** of pure Rust | **96/96** self-tests passing (100%) |
329+
| **476** source files | **144 FPS** SIMD desktop |
284330
| **3** architectures (x86_64, ARM64, RISC-V) | **< 1 sec** boot time |
285331
| **4.4M** AI parameters in kernel space | **0** lines of C |
286332
| **14,443** lines of AI code (24 modules) | **0** binary blobs |
287-
| **3,555** lines of TrustLang (dual backend) | **0** external ML frameworks |
333+
| **3,612** lines of TrustLang (dual backend) | **0** external ML frameworks |
288334

289335
---
290336

@@ -342,11 +388,11 @@ cd TrustOS
342388

343389
```
344390
TrustOS/
345-
kernel/ # Core bare-metal kernel (253K+ lines)
391+
kernel/ # Core bare-metal kernel (258K+ lines)
346392
src/
347393
jarvis/ # JARVIS AI (14,443 lines, 24 modules)
348394
jarvis_hw/ # Hardware intelligence (3,111 lines)
349-
trustlang/ # TrustLang compiler + native x86_64 (3,555 lines)
395+
trustlang/ # TrustLang compiler + native x86_64 (3,612 lines)
350396
shell/ # 200+ commands
351397
desktop.rs # COSMIC2 desktop manager
352398
network/ # TCP/IP, TLS 1.3, DHCP, DNS
@@ -378,6 +424,21 @@ TrustOS/
378424

379425
## 📋 Changelog
380426

427+
### v0.10.0 — Real Hardware Stability (March 13, 2026)
428+
429+
- **T61 desktop freeze fixed** — `serial::read_byte()` now checks `SERIAL_PRESENT`; UART noise no longer spins the keyboard loop. Desktop input loop capped at 32 keys/frame.
430+
- **HDA audio on ICH8** — Codec wake timeout 50ms with retry, AD198x/CX205xx quirks, EAPD, proper L+R amp unmute.
431+
- **SIMD/FPU safety** — `fninit` + `ldmxcsr` in `enable_sse()` masks all SIMD/FPU exceptions from dirty BIOS state. New IDT handlers for #NM(7), #SS(12), #MF(16), #XM(19).
432+
- **Fallible buffer allocs** — Double buffer, background cache, GL depth buffer use `try_reserve_exact` (no OOM panic).
433+
- **Diagnostic framework** — Step-by-step visual diagnostics written directly to raw framebuffer for hardware debugging.
434+
435+
### v0.9.6 — T61 Desktop Crash Fix (March 13, 2026)
436+
437+
- **MXCSR/FPU init** — Real hardware BIOS leaves dirty SIMD/FPU state; now clean-initialized.
438+
- **Missing IDT handlers** — Added #NM, #SS, #MF, #XM exception handlers.
439+
- **Fallible framebuffer allocs** — `init_double_buffer` / `init_background_cache` use `try_reserve_exact`.
440+
- **Autocomplete bounds check** — Shell autocomplete no longer panics on edge cases.
441+
381442
### v0.9.5 — Hardware Compatibility Hardening (March 13, 2026)
382443

383444
- **Serial port detection** — Loopback test + write timeout; no-UART systems boot without hangs.
@@ -427,7 +488,6 @@ TrustOS/
427488
- **Desktop border refinement** — window borders thickened to 4px for a bolder, more modern look.
428489
- **Shell commands**: `trustlang compile`, `trustlang test`, `trustlang bench`.
429490
- **Selftest integration** — native compiler smoke test added to the 96-test diagnostic suite.
430-
- 257,000+ lines, 473 source files, 3 architectures.
431491

432492
### v0.7.0 — checkm8 & JARVIS (March 2026)
433493

@@ -523,7 +583,7 @@ Apache License 2.0 — see [LICENSE](LICENSE).
523583

524584
Created by [Nated0ge](https://github.com/nathan237) — March 2026
525585

526-
257,000+ lines | Native x86_64 compiler | JARVIS AI (4.4M params) | x86_64 + ARM64 + RISC-V | Zero C
586+
261,000+ lines | Native x86_64 compiler | JARVIS AI (4.4M params) | x86_64 + ARM64 + RISC-V | Zero C
527587

528588
[Report Bug](https://github.com/nathan237/TrustOS/issues) | [Request Feature](https://github.com/nathan237/TrustOS/issues) | [Watch Demo](https://youtu.be/RBJJi8jW1_g)
529589

0 commit comments

Comments
 (0)