diff options
author | Danny Holman <dholman@gymli.org> | 2025-01-12 01:17:36 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2025-01-12 01:19:11 -0600 |
commit | 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf (patch) | |
tree | c8c35347b50477929727fa5be9f5d0f55cbe18fd /kernel/init.c | |
parent | 5e166f3042a8e7b3031aae4da7006f80caa53ecc (diff) |
PROJECT RESTRUCTURING
Move the entire kernel into its own directory. Create new directories
for system commands, libraries and other required essentials for a
complete Unix-like operating system.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'kernel/init.c')
-rw-r--r-- | kernel/init.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/kernel/init.c b/kernel/init.c deleted file mode 100644 index d4a3638..0000000 --- a/kernel/init.c +++ /dev/null @@ -1,35 +0,0 @@ -#include <libk/io.h> -#include <libk/string.h> -#include <libk/kmalloc.h> -#include <kernel/sched.h> -#include <kernel/kthread.h> -#include <kernel/pci.h> -#include <kernel/serial.h> - -void jump_userspace(void); - -char rootfs[1024]; -char init_bin[1024]; -int gdbstub = 0; - -void process_cmd(char *cmdline) { - char *token = strtok(cmdline, " "); - while (token != NULL) { - if (strncmp(token, "root=", 5) == 0) - strcpy(rootfs, &token[5]); - if (strncmp(token, "init=", 5) == 0) - strcpy(init_bin, &token[5]); - if (strncmp(token, "gdb", 3) == 0) - gdbstub = 1; - token = strtok(NULL, " "); - } -} - -void kernel_main(char *cmdline) { - kprintf("Box kernel version %s\n", VERSION); - process_cmd(cmdline); - - serial_init(); - sched_init(); - //pci_check_buses(); -} |