34 lines
780 B
Rust
34 lines
780 B
Rust
#![no_std]
|
|
#![no_main]
|
|
|
|
extern crate alloc;
|
|
|
|
use libk::{
|
|
drivers::{
|
|
async_io::task::{Executor, Task},
|
|
io,
|
|
},
|
|
prelude::*,
|
|
util::shell::shell,
|
|
};
|
|
|
|
#[unsafe(no_mangle)]
|
|
extern "C" fn kmain() -> ! {
|
|
println_log!(" [ Initialising Kernel Systems ] ");
|
|
if let Err(err) = foundry_os::boot() {
|
|
panic!("{}", err);
|
|
}
|
|
|
|
println_log!("[ Kernel Initialised Successfully ] ");
|
|
|
|
let dimensions = io::ascii::screensize_chars();
|
|
let dimensions2 = io::framebuffer::display::screensize_px();
|
|
|
|
println!("Dimensions: {}x{} (px)", dimensions2.0, dimensions2.1);
|
|
println!("Dimensions: {}x{} (chars)", dimensions.0, dimensions.1);
|
|
|
|
let mut executor = Executor::new();
|
|
executor.spawn(Task::new(shell()));
|
|
executor.run();
|
|
}
|