mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
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:
1 parent
7dd8f2219a
commit
4d9223c8cc
2 files changed
+11
No files matched your search
@@ -33,6 +33,10 @@
|
||||
- **4-bit palette-indexed asset**: 160x160 pixels in 12.5 KB rather than 100 KB, with a transparency mask so the mark composites onto the background instead of a flat rectangle.
|
||||
- **Regenerable**: `python3 scripts/mklogo.py path/to/logo.png` rewrites `init/logo_data.c` from source artwork.
|
||||
- 🔤 **Shared 8x8 Console Font (`lib/font8x8.c`)**: one glyph table behind the framebuffer console and the 2D canvas rasterizer, replacing divergent private copies.
|
||||
- 🖵 **Framebuffer Console (`drivers/video/fbcon.c`)**:
|
||||
- Once the VBE adapter is in graphics mode the VGA text buffer stops being scanned out, so the console would be invisible on the display even though it still reaches serial. fbcon renders the console into the framebuffer instead, the way Linux fbcon does.
|
||||
- **VT100 subset**: SGR colours, cursor addressing, relative moves, erase-display and erase-line, save/restore — enough for full-screen curses-style programs such as the **nano** editor to render correctly.
|
||||
- Presents a fixed **80x25** grid (matching `TTY_WIDTH`/`TTY_HEIGHT`, which the userland assumes) with the glyph cell scaled to fill whatever resolution is active. `video=WIDTHxHEIGHT` on the kernel command line selects the mode, defaulting to `1280x720`.
|
||||
- 🧵 **Kernel Concurrency Core (`kernel/wait.c`, `kernel/futex.c`, `kernel/rcu.c`)**:
|
||||
- **Wait Queues & Completions**: Sleeper parking with timed waits, one-shot completion barriers, and a static entry pool so a blocking path never re-enters the allocator (`waitinfo`).
|
||||
- **Futex Hash Table**: 32 buckets with value re-check on the slow path, requeue support, and an `fmutex_t` sleeping mutex built on the uncontended-fastpath protocol (`futexinfo`).
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user