add kernel

This commit is contained in:
mii
2025-06-30 20:56:25 +09:00
parent 8a163f3787
commit bfea023c76
7 changed files with 41 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
nel_os_bootloader/target nel_os_bootloader/target
nel_os_kernel/target

View File

@ -35,6 +35,8 @@ fn get_fs() -> Directory {
fn main() -> Status { fn main() -> Status {
uefi::helpers::init().unwrap(); uefi::helpers::init().unwrap();
uefi::system::with_stdout(|stdout| stdout.clear().unwrap());
println!("\nnel_os bootloader"); println!("\nnel_os bootloader");
let memory_map = uefi::boot::memory_map(MemoryType::LOADER_DATA).unwrap(); let memory_map = uefi::boot::memory_map(MemoryType::LOADER_DATA).unwrap();

View File

@ -0,0 +1,6 @@
[unstable]
build-std = ["core", "compiler_builtins", "alloc"]
build-std-features = ["compiler-builtins-mem"]
[build]
target = "x86_64-nel_os.json"

7
nel_os_kernel/Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "nel_os_kernel"
version = "0.1.0"

6
nel_os_kernel/Cargo.toml Normal file
View File

@ -0,0 +1,6 @@
[package]
name = "nel_os_kernel"
version = "0.1.0"
edition = "2024"
[dependencies]

View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

View File

@ -0,0 +1,16 @@
{
"llvm-target": "x86_64-unknown-none",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"arch": "x86_64",
"target-endian": "little",
"target-pointer-width": "64",
"target-c-int-width": "32",
"os": "none",
"executables": true,
"linker-flavor": "ld.lld",
"linker": "rust-lld",
"panic-strategy": "abort",
"disable-redzone": true,
"features": "-mmx,-sse,+soft-float",
"rustc-abi": "x86-softfloat"
}