fix: request text mode in multiboot2 header for VGA output

When using multiboot2, GRUB may set a graphical framebuffer instead
of text mode, causing VGA text writes to 0xB8000 to be invisible.

- Add MULTIBOOT_HEADER_TAG_FRAMEBUFFER to multiboot2 header requesting
  80x25 text mode (depth=0)
- Add 'set gfxpayload=text' to grub.cfg as additional safeguard

This fixes blank display when running under UTM/QEMU with certain
VGA device configurations.
This commit is contained in:
AI
2026-02-23 13:14:56 +00:00
parent c25ba1fccd
commit 000d53e2f3
2 changed files with 10 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ add_custom_command(
add_custom_target(initrd DEPENDS ${INITRD_FILE})
# Create grub.cfg for ISO - includes module2 for the initrd
file(WRITE ${CMAKE_BINARY_DIR}/isodir/boot/grub/grub.cfg "set timeout=0\nset default=0\nsearch --set=root --file /boot/kernel.bin\nmenuentry \"ClaudeOS\" { multiboot2 /boot/kernel.bin\n module2 /boot/initrd.cpio }")
file(WRITE ${CMAKE_BINARY_DIR}/isodir/boot/grub/grub.cfg "set timeout=0\nset default=0\nsearch --set=root --file /boot/kernel.bin\nmenuentry \"ClaudeOS\" {\n set gfxpayload=text\n multiboot2 /boot/kernel.bin\n module2 /boot/initrd.cpio\n}")
# ISO Generation