Use rust-lld for RV32. Remove riscv git submodule.

toolchain_update
WangRunji 6 years ago
parent 72dc3f62ad
commit 7229b49eb8

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "crate/riscv"]
path = crate/riscv
url = https://github.com/riscv-and-rust-and-decaf/riscv.git

@ -37,7 +37,7 @@ cargo install cargo-xbuild bootimage
``` ```
```bash ```bash
git clone https://github.com/wangrunji0408/RustOS.git --recursive git clone https://github.com/wangrunji0408/RustOS.git
cd RustOS/kernel cd RustOS/kernel
rustup override set nightly-2018-09-18 rustup override set nightly-2018-09-18
make run arch=riscv32|x86_64 make run arch=riscv32|x86_64

@ -1 +0,0 @@
Subproject commit f358204af01f2374ab6ed6ea059f724cd5f2fe6f

4
kernel/Cargo.lock generated

@ -175,6 +175,7 @@ dependencies = [
[[package]] [[package]]
name = "riscv" name = "riscv"
version = "0.3.0" version = "0.3.0"
source = "git+https://github.com/riscv-and-rust-and-decaf/riscv#f358204af01f2374ab6ed6ea059f724cd5f2fe6f"
dependencies = [ dependencies = [
"bare-metal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "bare-metal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -265,7 +266,7 @@ dependencies = [
"once 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "once 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"raw-cpuid 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "raw-cpuid 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"riscv 0.3.0", "riscv 0.3.0 (git+https://github.com/riscv-and-rust-and-decaf/riscv)",
"simple-filesystem 0.0.1 (git+https://github.com/wangrunji0408/SimpleFileSystem-Rust)", "simple-filesystem 0.0.1 (git+https://github.com/wangrunji0408/SimpleFileSystem-Rust)",
"spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"uart_16550 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "uart_16550 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -390,6 +391,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum raw-cpuid 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41219962ecab392f1e68db9e7ebd972800d4045a128cc23462b384e8c312cde1" "checksum raw-cpuid 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41219962ecab392f1e68db9e7ebd972800d4045a128cc23462b384e8c312cde1"
"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
"checksum riscv 0.3.0 (git+https://github.com/riscv-and-rust-and-decaf/riscv)" = "<none>"
"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"

@ -40,7 +40,7 @@ redox_syscall = "0.1"
uart_16550 = "0.1" uart_16550 = "0.1"
[target.'cfg(target_arch = "riscv32")'.dependencies] [target.'cfg(target_arch = "riscv32")'.dependencies]
riscv = { path = "../crate/riscv" } riscv = { git = "https://github.com/riscv-and-rust-and-decaf/riscv" }
bbl = { path = "../crate/bbl" } bbl = { path = "../crate/bbl" }
[package.metadata.bootimage] [package.metadata.bootimage]

@ -9,12 +9,11 @@
"cpu": "generic-rv32", "cpu": "generic-rv32",
"features": "", "features": "",
"max-atomic-width": "32", "max-atomic-width": "32",
"linker": "riscv64-unknown-elf-ld", "linker": "rust-lld",
"linker-flavor": "ld", "linker-flavor": "ld.lld",
"pre-link-args": { "pre-link-args": {
"ld": [ "ld.lld": [
"-Tsrc/arch/riscv32/boot/linker.ld", "-Tsrc/arch/riscv32/boot/linker.ld"
"-melf32lriscv"
] ]
}, },
"executables": true, "executables": true,

@ -9,13 +9,8 @@
"cpu": "generic-rv32", "cpu": "generic-rv32",
"features": "", "features": "",
"max-atomic-width": "32", "max-atomic-width": "32",
"linker": "riscv64-unknown-elf-ld", "linker": "rust-lld",
"linker-flavor": "ld", "linker-flavor": "ld.lld",
"pre-link-args": {
"ld": [
"-melf32lriscv"
]
},
"executables": true, "executables": true,
"panic-strategy": "abort", "panic-strategy": "abort",
"relocation-model": "static", "relocation-model": "static",

Loading…
Cancel
Save