blob: 86567a48e8777a68103f4eea796f284e6995b6de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <kernel/io.h>
#include <kernel/mem.h>
#include <kernel/string.h>
#include <kernel/serial.h>
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();
}
|