diff options
Diffstat (limited to 'kernel/init.c')
-rw-r--r-- | kernel/init.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/kernel/init.c b/kernel/init.c index 195ce92..86567a4 100644 --- a/kernel/init.c +++ b/kernel/init.c @@ -1,8 +1,25 @@ -#include <kernel/tty.h> #include <kernel/io.h> +#include <kernel/mem.h> +#include <kernel/string.h> #include <kernel/serial.h> -void kernel_main(void) { - tty_init(); - kprintf("Hello world\n"); +void jump_userspace(void); + +char rootfs[1024]; + +int start_init(int argc, char* argv[]) { + return 0; +} + +void process_cmd(char *cmdline) { + char *token = strtok(cmdline, " "); + while (token != NULL) { + if (strncmp(token, "root=", 5) == 0) + strcpy(rootfs, &token[6]); + } +} + +void kernel_main(char *cmdline) { + kprintf("Box Kernel version %s\n", VERSION); + serial_init(); } |