X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/7c7b5f05d39b7739d990f71256a2267ec67a6913..8fce4520de1f257819b16f9253fa28dcdae743f4:/lunaix-os/kernel/kinit.c diff --git a/lunaix-os/kernel/kinit.c b/lunaix-os/kernel/kinit.c index 6b6e5e4..f5944b5 100644 --- a/lunaix-os/kernel/kinit.c +++ b/lunaix-os/kernel/kinit.c @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -53,6 +52,8 @@ kernel_bootstrap(struct boot_handoff* bhctx) /* Prepare stack trace environment */ trace_modksyms_init(bhctx); + device_register_all(); + // crt tty_init(ioremap(0xB8000, PG_SIZE)); tty_set_theme(VGA_COLOR_WHITE, VGA_COLOR_BLACK); @@ -64,15 +65,19 @@ kernel_bootstrap(struct boot_handoff* bhctx) /* Let's get fs online as soon as possible, as things rely on them */ vfs_init(); fsm_init(); - input_init(); /* Get intc online, this is the cornerstone when initing devices */ intc_init(); + input_init(); + device_earlystage(); + /* System timing and clock support */ clock_init(); timer_init(); + device_timerstage(); + block_init(); /* the bare metal are now happy, let's get software over with */ @@ -88,9 +93,6 @@ kernel_bootstrap(struct boot_handoff* bhctx) vfs_mount("/sys", "twifs", NULL, MNT_RO); vfs_mount("/task", "taskfs", NULL, MNT_RO); - lxconsole_spawn_ttydev(); - device_init_builtin(); - /* Finish up bootstrapping sequence, we are ready to spawn the root process * and start geting into uspace */