From 37bc52988c9141bd019cf060090bef8e753c983e Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 16 Oct 2023 01:41:01 +0300 Subject: [PATCH] Kernel: Don't require framebuffer Initializes virtual tty only if framebuffer is initialized --- kernel/kernel/kernel.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/kernel/kernel.cpp b/kernel/kernel/kernel.cpp index 3dd2a67c8d..2a88287a84 100644 --- a/kernel/kernel/kernel.cpp +++ b/kernel/kernel/kernel.cpp @@ -117,8 +117,8 @@ extern "C" void kernel_main() dprintln("PageTable initialized"); g_terminal_driver = VesaTerminalDriver::create(); - ASSERT(g_terminal_driver); - dprintln("VESA initialized"); + if (g_terminal_driver) + dprintln("VESA initialized"); Heap::initialize(); dprintln("Heap initialzed"); @@ -147,8 +147,11 @@ extern "C" void kernel_main() dprintln("Serial devices initialized"); } - auto vtty = MUST(VirtualTTY::create(g_terminal_driver)); - dprintln("Virtual TTY initialized"); + if (g_terminal_driver) + { + auto vtty = MUST(VirtualTTY::create(g_terminal_driver)); + dprintln("Virtual TTY initialized"); + } MUST(Scheduler::initialize()); dprintln("Scheduler initialized");