kernel: implement tty driver system

This commit is contained in:
2023-06-10 21:41:07 +01:00
parent e10f11af88
commit d09ad5838e
9 changed files with 198 additions and 54 deletions

View File

@@ -12,6 +12,10 @@
#include <socks/machine/init.h>
#include <socks/cpu.h>
#ifdef KEXT_NET_DOORSTUCK_SOCKS_FBCON
#include <socks/fbcon.h>
#endif
extern unsigned long get_rflags(void);
extern char __pstart[], __pend[];
@@ -186,24 +190,17 @@ void kernel_init(uintptr_t arg)
create_kernel_thread(background_thread);
struct object *fb;
struct object *kbd;
run_all_tests();
#ifdef KEXT_NET_DOORSTUCK_SOCKS_FBCON
struct object *fb;
status = object_get("/dev/video/fb0", &fb);
if (status == KERN_OK) {
struct device *fb_dev = cast_to_device(fb);
struct framebuffer_device *fb_info = FRAMEBUFFER_DEVICE(fb_dev);
printk("fb: mode=%ux%ux%u type=%u cells=%ux%u",
fb_info->fb_varinfo.fb_xres, fb_info->fb_varinfo.fb_yres, fb_info->fb_varinfo.fb_bpp,
fb_info->fb_varinfo.fb_flags,
fb_info->fb_varinfo.fb_xcells, fb_info->fb_varinfo.fb_ycells);
} else {
printk("fb: unavailable");
start_console_on_framebuffer(cast_to_device(fb));
}
#endif
status = object_get("/dev/input/input0", &kbd);
if (status != KERN_OK) {