kexts: fbcon: implement VGA text mode tty driver

This commit is contained in:
2023-06-11 09:24:22 +01:00
parent abe4af093e
commit d10c89544c
4 changed files with 54 additions and 34 deletions

View File

@@ -188,12 +188,6 @@ void kernel_init(uintptr_t arg)
printk("kernel_init() running on processor %u", this_cpu());
create_kernel_thread(background_thread);
struct object *kbd;
run_all_tests();
#ifdef KEXT_NET_DOORSTUCK_SOCKS_FBCON
struct object *fb;
status = object_get("/dev/video/fb0", &fb);
@@ -202,6 +196,21 @@ void kernel_init(uintptr_t arg)
}
#endif
create_kernel_thread(background_thread);
struct object *kbd;
run_all_tests();
struct object *tty0;
status = object_get("/dev/tty/tty0", &tty0);
if (status == KERN_OK) {
size_t q;
object_write(tty0, "hello", 5, &q, 0);
} else {
printk("tty: unavailable");
}
status = object_get("/dev/input/input0", &kbd);
if (status != KERN_OK) {
printk("no keyboard available");