1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

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

This commit is contained in:
WangRunji 2018-10-30 13:29:00 +08:00
parent 72dc3f62ad
commit 7229b49eb8
7 changed files with 11 additions and 19 deletions

3
.gitmodules vendored
View File

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

View File

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

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

4
kernel/Cargo.lock generated
View File

@ -175,6 +175,7 @@ dependencies = [
[[package]]
name = "riscv"
version = "0.3.0"
source = "git+https://github.com/riscv-and-rust-and-decaf/riscv#f358204af01f2374ab6ed6ea059f724cd5f2fe6f"
dependencies = [
"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)",
@ -265,7 +266,7 @@ dependencies = [
"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)",
"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)",
"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)",
@ -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 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 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 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"

View File

@ -40,7 +40,7 @@ redox_syscall = "0.1"
uart_16550 = "0.1"
[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" }
[package.metadata.bootimage]

View File

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

View File

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