summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/proc/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/proc/init.c')
-rw-r--r--arch/x86_64/proc/init.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/x86_64/proc/init.c b/arch/x86_64/proc/init.c
index 8003a6d..6c5c36e 100644
--- a/arch/x86_64/proc/init.c
+++ b/arch/x86_64/proc/init.c
@@ -11,8 +11,7 @@
#include "lib/printf.h"
#include "arch/x86_64/lib/elf.h"
#include "arch/x86_64/hal/paging.h"
-#include "boot/cmdline.h"
-#include "boot/initrd.h"
+#include "boot/boot.h"
static int
elf_is_valid(struct elf_header *ehdr)
@@ -52,15 +51,13 @@ init_setup(void)
kpanic("Kernel commandline is missing 'init' arg.\n");
}
- jove_owned_obj_t *initrd_obj = objdir_getlocal(_rootdir_obj, INIT_ROOTDIR_INITRD_I);
- jove_owned_obj_t *init_obj = initrd_seek(initrd_obj, init_path);
- if(init_obj == NULL) {
- kpanic("init: Cannot find file '%s' in initrd.\n", init_path);
+ jove_owned_obj_t *init_obj = boot_getmodule(init_path);
+ if(init_obj == 0) {
+ kpanic("Unable to get module %s : %s\n", init_path, errstr(errno));
}
- obj_release(initrd_obj);
- void *init_data = initrd_file_data(init_obj);
- obj_release(init_obj);
+ void *init_data = shmem_deref(init_obj);
+ kprintf("Found init at %p\n", init_data);
struct elf_header *init_ehdr = init_data;
if(init_ehdr == NULL) {