kernel: implement tty driver system
This commit is contained in:
19
init/main.c
19
init/main.c
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user