main() now waits until interrupts are available before bringing the device drivers up.
Switched to load_image() instad of using the old team_create_team() to start "init". git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+12
-5
@@ -160,6 +160,11 @@ main2(void *unused)
|
|||||||
TRACE(("Bootstrap file systems\n"));
|
TRACE(("Bootstrap file systems\n"));
|
||||||
vfs_bootstrap_file_systems();
|
vfs_bootstrap_file_systems();
|
||||||
|
|
||||||
|
// before we bring up the device drivers, we better wait until
|
||||||
|
// interrupts become available, to make sure they'll work as expected
|
||||||
|
while (!are_interrupts_enabled())
|
||||||
|
snooze(10000);
|
||||||
|
|
||||||
TRACE(("Init Device Manager\n"));
|
TRACE(("Init Device Manager\n"));
|
||||||
device_manager_init(&ka);
|
device_manager_init(&ka);
|
||||||
|
|
||||||
@@ -203,12 +208,14 @@ main2(void *unused)
|
|||||||
#endif
|
#endif
|
||||||
// start the init process
|
// start the init process
|
||||||
{
|
{
|
||||||
team_id pid;
|
const char *args[] = {"/bin/init", NULL};
|
||||||
pid = team_create_team("/bin/init", "init", NULL, 0, NULL, 0, B_NORMAL_PRIORITY);
|
|
||||||
|
|
||||||
TRACE(("Init started\n"));
|
thread_id thread = load_image(1, args, NULL);
|
||||||
if (pid < 0)
|
if (thread >= B_OK) {
|
||||||
kprintf("error starting 'init' error = %ld \n", pid);
|
resume_thread(thread);
|
||||||
|
TRACE(("Init started\n"));
|
||||||
|
} else
|
||||||
|
dprintf("error starting 'init' error = %ld \n", thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user