Commit 0d56659e authored by Stefan Lankes's avatar Stefan Lankes
Browse files

remove dependency to xbuild

- increase the readability of the loader
parent fb06182b
......@@ -17,7 +17,7 @@ else
RM := rm -rf
endif
.PHONY: all loader clippy clean docs
.PHONY: all loader clean docs
all: loader
......@@ -28,11 +28,7 @@ docs:
@echo DOC
@cargo doc
clippy:
@echo Run clippy...
@RUST_TARGET_PATH=$(CURDIR) cargo clippy --target $(target)
loader:
@echo Build loader
@RUST_TARGET_PATH=$(CURDIR) cargo xbuild $(opt) --target $(target)-loader
@objcopy --strip-debug -O elf32-i386 target/$(target)-loader/$(rdir)/rusty-loader
cargo build -Z build-std=core,alloc $(opt) --target $(target)-loader.json
@llvm-objcopy --strip-debug -O elf32-i386 target/$(target)-loader/$(rdir)/rusty-loader
# rusty-loader
**rusty-loader** is a loader to run [RustyHermit](https://github.com/hermitcore/libhermit-rs) within [Qemu](https://www.qemu.org).
To build the loader the cargo subcommand [xbuild](https://github.com/rust-osdev/cargo-xbuild) is required and can be installed with following command:
To build the loader the llvm-tools and the source code of Rust's runtime are required and can be installed with following command:
```bash
$ cargo install cargo-xbuild
$ rustup component add rust-src
$ rustup component add llvm-tools-preview
```
Afterwards, the loader can be build as follows:
......
......@@ -158,7 +158,7 @@ L1:
; Set CR4
mov eax, cr4
and eax, 0xfffbf9ff ; disable SSE
;or eax, (1 << 7) ; enable PGE
;or eax, (1 << 7) ; enable PGE
mov cr4, eax
; Set CR0 (PM-bit is already set)
......
......@@ -33,6 +33,7 @@ pub mod arch;
pub mod console;
mod elf;
mod physicalmem;
mod rlib;
mod runtime_glue;
// IMPORTS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment