blob: 98ac05c0f727c923a749c4e94a5351978f58404b (
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
26
27
28
29
30
31
|
#include <kernel/io.h>
#include <kernel/sched.h>
#include <kernel/kmalloc.h>
#include <kernel/string.h>
#include <kernel/serial.h>
void jump_userspace(void);
char rootfs[1024];
int start_init(int argc, char* argv[]) {
while (1);
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) {
kmalloc_init();
kprintf("Box Kernel version %s\n", VERSION);
serial_init();
sched_init();
//jump_userspace();
}
|