Skip to content

0xl3on/minimal-kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minimal-kernel

Fixes needed to rust-analyzer: "rust-analyzer.check.allTargets": false

Fixing linker issues: change rustc host target. Default one for Windows/MacOS/Linux assumes we have a C runtime but we used #![no_std] and usually the std library starts the C runtime that further calls the main item. Rust runtime just verifies some stuff such as stack overflow guards and printing bcktrace on panic

To fix that we use target: thumbv7em-none-eabihf that is embbeded ARM

cargo build --target thumbv7em-none-eabihf

We use nightly rust so we can have access to core crate, by using the build-std feature, since the core crate is a precompiled library shipped on rust instalation for the most common targets

We didnt write out bootloader but used crates bootimage 0.9 and did cargo install bootimage

So what does cargo bootimage will do?

Itll compile our kernel file to an ELF file, compiles the bootloader dependency as a standalone executable and links the bytes of the kernel ELF to the bootloader

About

Minimal bare metal OS Kernel for x86_64, written in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages