From c6b134695682b43c2e168741c8ebcd552af39470 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 27 Sep 2016 13:43:53 +0200 Subject: [PATCH 1/2] Use crates.io version of multiboot2 --- Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 71f35bcf..713ee91b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ version = "0.1.0" [dependencies] bit_field = "0.5.0" bitflags = "0.7.0" +multiboot2 = "0.1.0" once = "0.3.2" rlibc = "0.1.4" spin = "0.3.4" @@ -17,9 +18,6 @@ path = "libs/hole_list_allocator" features = ["spin_no_std"] version = "0.2.1" -[dependencies.multiboot2] -git = "https://github.com/phil-opp/multiboot2-elf64" - [dependencies.x86] default-features = false version = "0.7.1" From 2b07d88b62bbf03e15c721e11ac8ded3eab4f610 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 27 Sep 2016 13:46:29 +0200 Subject: [PATCH 2/2] Update post to use multiboot2 from crates.io --- blog/post/05-allocating-frames.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blog/post/05-allocating-frames.md b/blog/post/05-allocating-frames.md index 94105c36..dc10f802 100644 --- a/blog/post/05-allocating-frames.md +++ b/blog/post/05-allocating-frames.md @@ -44,17 +44,17 @@ Now we can add the argument to our `rust_main`: pub extern fn rust_main(multiboot_information_address: usize) { ... } ``` -Instead of writing an own Multiboot module, we use the [multiboot2-elf64] crate. It gives us some basic information about mapped kernel sections and available memory. I just wrote it for this blog post since I could not find any other Multiboot 2 crate. It's really ugly and incomplete, but it does its job[^fn-multiboot-crate]. +Instead of writing an own Multiboot module, we use the [multiboot2] crate. It gives us some basic information about mapped kernel sections and available memory. I just wrote it for this blog post since I could not find any other Multiboot 2 crate. It's still incomplete, but it does its job. -[multiboot2-elf64]: https://github.com/phil-opp/multiboot2-elf64 -[^fn-multiboot-crate]: All contributions are welcome! If you want to maintain it, please contact me! +[multiboot2]: https://docs.rs/multiboot2 So let's add a dependency on the git repository: ```toml # in Cargo.toml -[dependencies.multiboot2] -git = "https://github.com/phil-opp/multiboot2-elf64" +[dependencies] +... +multiboot2 = "0.1.0" ``` ```rust