MCPcopy Create free account
hub / github.com/LibertyOS-Development/kernel / kernel_main

Function kernel_main

src/main.rs:34–72  ·  view source on GitHub ↗
(bootinfo: &'static BootInfo)

Source from the content-addressed store, hash-verified

32
33
34fn kernel_main(bootinfo: &'static BootInfo) -> !
35{
36 use libertyos_kernel::user::shell::exec;
37
38
39 libertyos_kernel::init::start(bootinfo);
40 println!("KURIOS v{}", KURIOS_VERSION);
41 print!("\x1b[?25h");
42 println!();
43
44 /*
45 let text_mode = Text80x25::new();
46 let tmcolor = TextModeColor::new(Color16::Yellow, Color16::Black);
47
48 let graphics_mode = Graphics640x480x16::new();
49
50 graphics_mode.set_mode();
51 graphics_mode.clear_screen(Color16::Black);
52 graphics_mode.draw_line((80, 60), (80, 420), Color16::White);
53 graphics_mode.draw_line((80, 60), (540, 60), Color16::White);
54 graphics_mode.draw_line((80, 420), (540, 420), Color16::White);
55 graphics_mode.draw_line((540, 420), (540, 60), Color16::White);
56 graphics_mode.draw_line((80, 90), (540, 90), Color16::White);
57 */
58
59// While duration < 5 sec, display welcome screen.
60
61 loop
62 {
63 if let Some(cmd) = option_env!("LIBERTYOS_CMD")
64 {
65 let prompt = libertyos_kernel::user::shell::promptstr(true);
66 println!("{}{}", prompt, cmd);
67 libertyos_kernel::user::shell::exec(cmd);
68
69// libertyos_kernel::sys::acpi::shutdown;
70 }
71 }
72}
73
74
75#[rustfmt::skip]

Callers

nothing calls this directly

Calls 3

startFunction · 0.85
promptstrFunction · 0.85
execFunction · 0.85

Tested by

no test coverage detected