Commit 2c417178 authored by Eric Kidd's avatar Eric Kidd
Browse files

Update to latest nightly & include patched Rust as a git submodule

This should make it much easier to reproduce our earlier builds.
parent 0961fd41
[submodule "rust"]
path = rust
url =
......@@ -64,8 +64,10 @@ libcore_nofp_patch := build/libcore_nofp.patch
libcore_nofp_url := \
# Where to put our compiled runtime libraries for this platform.
installed_target_libs := \
$(shell multirust which rustc | \
sed s,bin/rustc,lib/rustlib/$(target)/lib,)
runtime_rlibs := \
$(installed_target_libs)/libcore.rlib \
......@@ -98,3 +100,4 @@ $(installed_target_libs):
$(installed_target_libs)/%.rlib: rust/src/%/ $(installed_target_libs)
@echo RUSTC $<
@$(RUSTC) $<
@echo Check $(installed_target_libs)
......@@ -7,45 +7,34 @@ to see what Rust feels like on bare metal.
## Building `libcore`
## Building
This is largely based on the approach taken by [rust-barebones-kernel][],
but with added support for cargo. The `Makefile` assumes that you're using
a nighly build of run installed by `multirust`, and configured as an
override for the current directory:
First, we need to check out the source and rebuild the Rust runtime using
bare-metal target and no floating point support:
multirust override nightly
First, you'll need to get your current version of `rustc`
$ rustc --version
rustc 1.6.0-nightly (2e07996a9 2015-10-29)
git clone
multirust override nightly-2015-11-08
git submodule update --init
make runtime
Remember the hexadecimal number in the parentheses, and check out a
matching source tree:
git clone
(cd rust && git checkout 2e07996a9)
Our copy of Rust has been patched to incoporate a version of the
`libcore_nofp.patch` from [rust-barebones-kernel][], and the `rust`
submodule points at a source tree that has been tested with the specific
`nightly` build mentioned above.
Now you can try to patch `libcore` and install a set of basic runtime
libraries where `rustc` and `cargo` will find them:
From here, we should be able to build a kernel and run it using QEMU:
make patch
make runtime
make run
You may need to manually fix the `libcore` build to hide any new `f32` or
`f63` features behind `#[cfg(not(disable_float))]`.
## Licensing
## Building the kernel
Licensed under the [Apache License, Version 2.0][LICENSE-APACHE] or the
[MIT license][LICENSE-MIT], at your option.
make run
Subproject commit e064738732fdf54d5404f07d69e761a38836bf20
Markdown is supported
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