Fix UTM display: remove required framebuffer tag, add serial output, ls app

Display fixes for UTM/Mac black screen issue:
- Remove MULTIBOOT_HEADER_TAG_FRAMEBUFFER from multiboot2 header (was required,
  requesting text mode depth=0 which confused GRUB on some platforms)
- Add COM1 serial port (0x3F8) output alongside debugcon for UTM serial capture
- Change VGA background from black to dark blue for diagnostics
- Add early canary write to 0xB8000 ('COS' in magenta) before subsystem init
- print_hex now outputs to both debugcon and COM1

New ls command and SYS_READDIR syscall:
- SYS_READDIR (10): reads directory entries via VFS
- VFS root listing: vfs_readdir handles '/' by iterating mount table
- apps/ls: lists CWD contents, appends '/' for directories
- apps/libc/syscalls.h: readdir() wrapper
This commit is contained in:
AI
2026-02-23 13:36:34 +00:00
parent 993cf05712
commit e3d011da2f
9 changed files with 146 additions and 22 deletions

View File

@@ -344,10 +344,10 @@ void vga_put_dec(uint32_t val) {
void vga_show_mem_stats(void) {
uint32_t mem_kb = pmm_get_memory_size() + 1024;
vga_set_color(VGA_LIGHT_CYAN, VGA_BLACK);
vga_set_color(VGA_LIGHT_CYAN, VGA_BLUE);
vga_puts("=== ClaudeOS Memory Statistics ===\n");
vga_set_color(VGA_WHITE, VGA_BLACK);
vga_set_color(VGA_WHITE, VGA_BLUE);
vga_puts(" Total RAM: ");
vga_put_dec(mem_kb);
vga_puts(" KiB (");
@@ -369,9 +369,9 @@ void vga_show_mem_stats(void) {
vga_put_dec(kernel_size / 1024);
vga_puts(" KiB\n");
vga_set_color(VGA_LIGHT_CYAN, VGA_BLACK);
vga_set_color(VGA_LIGHT_CYAN, VGA_BLUE);
vga_puts("==================================\n");
vga_set_color(VGA_LIGHT_GREY, VGA_BLACK);
vga_set_color(VGA_LIGHT_GREY, VGA_BLUE);
}
/* ================================================================
@@ -443,11 +443,14 @@ int vga_init(void) {
offset_print(" VGA: unknown fb type, assuming text mode\n");
}
/* Use dark blue background so user can distinguish "rendering works
* but text invisible" from "framebuffer not working at all". */
vga_set_color(VGA_LIGHT_GREY, VGA_BLUE);
vga_clear();
vga_set_color(VGA_LIGHT_GREEN, VGA_BLACK);
vga_set_color(VGA_LIGHT_GREEN, VGA_BLUE);
vga_puts("ClaudeOS v0.1 booting...\n\n");
vga_set_color(VGA_LIGHT_GREY, VGA_BLACK);
vga_set_color(VGA_LIGHT_GREY, VGA_BLUE);
return 0;
}