feat(video): Move the console to the framebuffer once the adapter is graphical

bochs_vbe_init switches the adapter into graphics mode at boot step [5/14], and
from that point the VGA text buffer is no longer scanned out. This kernel boots
to a TTY, so every message after that -- and the whole shell session -- was
invisible in the emulator window and reached only the serial line.

The console now moves to the framebuffer at that transition, which also makes
the nano editor render correctly: it positions with tty_set_cursor() rather than
escape sequences, and the TTY driver dispatches that to fbcon.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01L5yKJT4Wo2cV3rfPrwY5MP
This commit is contained in:
subhobhai943andClaude Opus 5 committed 2026-08-25 02:08:37 +05:30
1 parent 7dd8f2219a
commit 4d9223c8cc
2 files changed
+11

No files matched your search

+7
View File
@@ -88,6 +88,7 @@
#include <init/service.h>
#include <init/version.h>
#include <init/bootlogo.h>
#include <drivers/fbcon.h>
#include <userland/lazybox.h>
#include <userland/sh.h>
#include <userland/shell.h>
@@ -135,6 +136,11 @@ static void subos_modular_core_boot(void) {
// The ASCII logo printed at the top of boot covers the default case.
if (init_has_param("splash") && !init_has_param("nosplash")) {
boot_logo_splash_begin();
} else {
// The adapter is in graphics mode from here on, so the VGA text buffer
// is no longer scanned out. Move the console to the framebuffer or the
// rest of the boot log is visible only on the serial line.
fbcon_enable(true);
}
// Network Subsystem, NetFilter, HTTPD & SSH Server
@@ -248,6 +254,7 @@ static void subos_modular_core_boot(void) {
// Return the screen to the console before handing over to the shell.
boot_logo_splash_end();
fbcon_enable(true);
// Launch Shell
shell_run();