mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
[unfinished] Add Multiboot 2 crate and load Multiboot structure
Conflicts: Cargo.toml src/lib.rs Conflicts: Cargo.toml
This commit is contained in:
@@ -8,3 +8,6 @@ crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
rlibc = "*"
|
||||
|
||||
[dependencies.multiboot2]
|
||||
path = "../multiboot2"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#![no_std]
|
||||
|
||||
extern crate rlibc;
|
||||
extern crate multiboot2;
|
||||
|
||||
use core::fmt::Write;
|
||||
|
||||
@@ -28,6 +29,9 @@ pub extern fn rust_main(multiboot_address: usize) {
|
||||
// ATTENTION: we have a very small stack and no guard page
|
||||
use vga_buffer::{Writer, Color};
|
||||
|
||||
let multiboot = unsafe{multiboot2::load(multiboot_address)};
|
||||
|
||||
|
||||
vga_buffer::clear_screen();
|
||||
let mut writer = Writer::new(Color::Blue, Color::LightGreen);
|
||||
writer.write_byte(b'H');
|
||||
|
||||
Reference in New Issue
Block a user