Added gKernelEntry variable; it's now set in load_kernel().
Removed start_kernel() function - it's now replaced by the platform_start_kernel() call. Fixed the kernel add-on boot module search path. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7265 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -65,6 +65,8 @@ load_kernel(stage2_args *args, Directory *volume)
|
||||
|
||||
puts("kernel loaded successfully");
|
||||
|
||||
gKernelEntry = image.elf_header.e_entry;
|
||||
|
||||
/* void *cookie;
|
||||
if (volume->Open(&cookie, O_RDONLY) == B_OK) {
|
||||
char name[B_FILE_NAME_LENGTH];
|
||||
@@ -82,7 +84,7 @@ load_modules(stage2_args *args, Directory *volume)
|
||||
{
|
||||
// we don't have readdir() & co. yet...
|
||||
|
||||
int fd = open_from(volume, "beos/system/add-ons/boot", O_RDONLY);
|
||||
int fd = open_from(volume, "beos/system/add-ons/kernel/boot", O_RDONLY);
|
||||
if (fd < B_OK)
|
||||
return fd;
|
||||
|
||||
@@ -102,11 +104,3 @@ load_modules(stage2_args *args, Directory *volume)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
start_kernel()
|
||||
{
|
||||
// shouldn't return...
|
||||
panic("starting the kernel is not yet implemented :)");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Copyright 2003-2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef LOADER_H
|
||||
@@ -12,6 +12,5 @@
|
||||
extern bool is_bootable(Directory *volume);
|
||||
extern status_t load_kernel(stage2_args *args, Directory *volume);
|
||||
extern status_t load_modules(stage2_args *args, Directory *volume);
|
||||
extern void start_kernel();
|
||||
|
||||
#endif /* LOADER_H */
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
kernel_args gKernelArgs;
|
||||
addr_t gKernelEntry;
|
||||
|
||||
|
||||
extern "C" int
|
||||
@@ -96,7 +97,7 @@ main(stage2_args *args)
|
||||
load_modules(args, volume);
|
||||
|
||||
// ToDo: cleanup, heap_release() etc.
|
||||
start_kernel();
|
||||
platform_start_kernel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user