Compare commits

...

4 Commits

Author SHA1 Message Date
Philipp Oppermann
88329503ad Merge branch 'post-3.1' into post-3.2 2023-03-25 20:31:48 +01:00
Philipp Oppermann
7ff6510352 Use bootloader_api::entry_point macro 2023-03-25 20:12:41 +01:00
Philipp Oppermann
eb78b1fb9b Add bootloader_api dependency 2023-03-25 19:49:46 +01:00
Philipp Oppermann
2dc10d0198 Update README for second post 2023-03-25 19:19:58 +01:00
4 changed files with 18 additions and 14 deletions

9
Cargo.lock generated
View File

@@ -2,6 +2,15 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "bootloader_api"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec2d46a2b93edb1383023db2a95fc9480847a6e137c60e214f3fb62727f028da"
[[package]]
name = "kernel"
version = "0.1.0"
dependencies = [
"bootloader_api",
]

View File

@@ -6,6 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bootloader_api = "0.11.0"
[profile.dev]
panic = "abort"

View File

@@ -1,23 +1,16 @@
# Blog OS (Minimal Kernel)
# Blog OS (Booting)
[![Build Status](https://github.com/phil-opp/blog_os/workflows/Code/badge.svg?branch=post-3.1)](https://github.com/phil-opp/blog_os/actions?query=workflow%3A%22Code%22+branch%3Apost-3.1)
[![Build Status](https://github.com/phil-opp/blog_os/workflows/Code/badge.svg?branch=post-3.2)](https://github.com/phil-opp/blog_os/actions?query=workflow%3A%22Code%22+branch%3Apost-3.2)
This repository contains the source code for the [Minimal Kernel][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series.
This repository contains the source code for the [Booting][post] post of the [Writing an OS in Rust](https://os.phil-opp.com) series.
[post]: https://os.phil-opp.com/minimal-kernel
[post]: https://os.phil-opp.com/booting
**Check out the [master branch](https://github.com/phil-opp/blog_os) for more information.**
## Building
- Install the `x86_64-unknown-none` target using rustup:
```
rustup target add x86_64-unknown-none
```
- Build by running:
```
cargo build --target x86_64-unknown-none
```
TODO
## License

View File

@@ -3,8 +3,9 @@
use core::panic::PanicInfo;
#[no_mangle]
pub extern "C" fn _start() -> ! {
bootloader_api::entry_point!(kernel_main);
fn kernel_main(bootinfo: &'static mut bootloader_api::BootInfo) -> ! {
loop {}
}