Skip to content

Commit

Permalink
Updating for rust 0.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
eholk committed Jan 22, 2014
1 parent 31d954f commit 453b88f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build
img
boot.iso
*.o
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
.phony: all submodules
.phony: all submodules image rust-core

all: submodules
all: submodules image

image: rust-core
mkdir -p build
rustc -O -c --lib src/boot.rs -o build/boot.o
rustc -O -c --lib src/boot.rs -L external/rust-core/core
mkdir -p img/efi/boot
x86_64-efi-pe-ld --oformat pei-x86-64 --subsystem 10 -pie -e efi_start build/boot.o -o img/efi/boot/bootx64.efi
x86_64-efi-pe-ld --oformat pei-x86-64 --subsystem 10 -pie -e efi_start src/boot.o external/rust-core/core/core.o -o img/efi/boot/bootx64.efi
mkisofs -o boot.iso img

submodules:
git submodule update --init --recursive

rust-core:
rustc -c --lib external/rust-core/core/lib.rs
4 changes: 3 additions & 1 deletion src/boot.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#[no_std];

#[feature(asm)];
#[feature(macro_rules)];

extern mod core;

use uefi::SimpleTextOutput;

pub mod core;
pub mod uefi;

#[no_split_stack]
Expand Down
1 change: 0 additions & 1 deletion src/core

This file was deleted.

7 changes: 4 additions & 3 deletions src/uefi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ pub struct SystemTable(*EFI_SYSTEM_TABLE);

impl SystemTable {
#[no_split_stack]
fn console(&self) -> Console {
pub fn console(&self) -> Console {
unsafe {
let &SystemTable(tbl) = self;
Console {
input: (***self).ConIn,
output: (***self).ConOut,
input: (*tbl).ConIn,
output: (*tbl).ConOut,
}
}
}
Expand Down

0 comments on commit 453b88f

Please sign in to comment.