Skip to content

Conversation

@ryanbreen
Copy link
Owner

Summary

  • Implements complete interactive shell framebuffer rendering using noto-sans-mono-bitmap font library
  • Routes shell stdout/stderr to QEMU display while keeping kernel logs on COM2/file only
  • Enables PS/2 keyboard input with echo to framebuffer for interactive QEMU sessions
  • Removes debug markers from assembly hot paths (timer_entry.asm, syscall/entry.asm) that caused log spam
  • Fixes boot stage 54 regression with one-time AtomicBool-gated marker

Key Changes

Framebuffer System:

  • kernel/src/logger.rs: ShellFrameBuffer struct with font rendering, cursor tracking, scrolling
  • kernel/src/syscall/handlers.rs: write_to_stdio routes to framebuffer in interactive mode
  • kernel/src/ipc/stdin.rs: Keyboard echo to framebuffer for user input visibility

Build Configuration:

  • kernel/Cargo.toml: Added noto-sans-mono-bitmap with unicode-basic-latin, unicode-specials features
  • Feature flag interactive gates all framebuffer code paths

Bug Fixes:

  • Removed debug serial output markers (<EE>!SYS, @@12Q!CR3) from assembly files
  • Fixed dead_code warning for is_initialized() in per_cpu.rs
  • Fixed unused variable warnings in process/manager.rs

Test plan

  • Boot stages test passes 78/78
  • Build completes with zero warnings
  • Interactive mode (cargo run -p xtask -- interactive) shows shell output on QEMU display
  • Keyboard input echoes to framebuffer
  • Kernel logs go to COM2 only (not mixed with shell output)

🤖 Generated with Claude Code

ryanbreen and others added 2 commits December 30, 2025 09:26
Initial implementation of keyboard→stdin→userspace pipeline:

Kernel infrastructure:
- kernel/src/ipc/stdin.rs: Ring buffer for stdin with blocked reader tracking
- keyboard.rs: Route decoded characters to stdin buffer
- syscall/handlers.rs: Blocking read() for fd 0 with thread blocking/waking

Userspace:
- init_shell.rs: Minimal interactive shell with REPL loop
  - Built-in commands: help, echo, ps, uptime, clear, exit
  - Line editing with backspace support
  - Yields on EAGAIN and retries
- stdin_test.rs: Test program for stdin reading

Build system:
- xtask: Added interactive mode and stdin test support
- userspace build: Include new test programs

Documentation:
- docs/planning/interactive-shell/IMPLEMENTATION_PLAN.md: Full architecture and phased plan

Status: Compiles but not yet tested. Thread blocking infrastructure needs verification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of interactive shell implementation:

- Add ShellFrameBuffer for direct framebuffer text rendering
  - Uses noto-sans-mono-bitmap for glyph rendering
  - Supports scrolling, backspace, line wrapping
  - Separate from kernel log output

- Route shell output to framebuffer in interactive mode
  - sys_write() calls write_to_framebuffer() for stdout/stderr
  - Keyboard echo also goes to framebuffer
  - Kernel logs go to COM2 only (not framebuffer)

- Remove debug markers from assembly hot paths
  - Removed all serial output from timer_entry.asm
  - Removed all serial output from syscall/entry.asm
  - Fixes log spam that was flooding the console

- Add xtask interactive command
  - Uses -display cocoa for PS/2 keyboard input
  - Serial output goes to log files for debugging

- Fix boot stage 54 regression
  - Added one-time scheduler boot marker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ryanbreen ryanbreen merged commit baa9530 into main Dec 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants