feat(OS): Create basic kernel that can be run through both QEMU and on hardware (#1)
Reviewed-on: #1
This commit is contained in:
12
kernel/Cargo.toml
Normal file
12
kernel/Cargo.toml
Normal file
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "kernel"
|
||||
version = "0.1.0"
|
||||
|
||||
edition.workspace = true
|
||||
license-file.workspace = true
|
||||
authors.workspace = true
|
||||
readme.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
bootloader_api = { version = "0.11.10" }
|
16
kernel/src/main.rs
Normal file
16
kernel/src/main.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use bootloader_api::{entry_point, BootInfo};
|
||||
|
||||
entry_point!(kernel_main);
|
||||
|
||||
fn kernel_main(boot_info: &'static mut BootInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[panic_handler]
|
||||
#[cfg(not(test))]
|
||||
fn panic(info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
Reference in New Issue
Block a user