From caeff9ad97cb1ab1131bde0d97ab0942aa7fcc6c Mon Sep 17 00:00:00 2001 From: WangRunji Date: Tue, 21 Aug 2018 18:26:05 +0800 Subject: [PATCH] Update packages and fit for new Rust nightly --- README.md | 3 +- crate/riscv | 2 +- kernel/Cargo.lock | 67 +++++++++++++++++++++++++-------------------- kernel/Cargo.toml | 2 +- kernel/Makefile | 2 +- kernel/src/lib.rs | 2 -- macOS-env/README.md | 5 ++++ 7 files changed, 47 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index ba04bfb..9017fc5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ In fact, it's more complicated than we expected to write an OS starting from scr ### Environment -* Rust toolchain at nightly-2018-08-03 +* Rust toolchain at nightly-2018-09-03 * `cargo-xbuild` * `QEMU` >= 2.12.0 * riscv32 @@ -37,6 +37,7 @@ In fact, it's more complicated than we expected to write an OS starting from scr ```bash git clone https://github.com/wangrunji0408/RustOS.git --recursive cd RustOS/kernel +rustup override set nightly-2018-09-03 make run arch=riscv32|x86_64 # For FPGA: # make run arch=riscv32 board=1 diff --git a/crate/riscv b/crate/riscv index ed6e4c5..50d2008 160000 --- a/crate/riscv +++ b/crate/riscv @@ -1 +1 @@ -Subproject commit ed6e4c5b935d9d027303da829a7508c105df3139 +Subproject commit 50d2008d7579e24fc4f29889b73831acdd9aa830 diff --git a/kernel/Cargo.lock b/kernel/Cargo.lock index aa2c4c1..3c65055 100644 --- a/kernel/Cargo.lock +++ b/kernel/Cargo.lock @@ -1,6 +1,6 @@ [[package]] name = "bare-metal" -version = "0.1.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -26,25 +26,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" -version = "1.0.18" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazy_static" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -52,15 +53,15 @@ name = "linked_list_allocator" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "log" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -68,7 +69,7 @@ name = "multiboot2" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -88,11 +89,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "riscv" -version = "0.2.0" +version = "0.3.0" dependencies = [ - "bare-metal 0.1.2 (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)", - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -106,7 +107,7 @@ dependencies = [ [[package]] name = "spin" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -119,7 +120,7 @@ name = "uart_16550" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "x86_64 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -130,17 +131,17 @@ dependencies = [ "bbl 0.1.0", "bit-allocator 0.1.0", "bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "linked_list_allocator 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "multiboot2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "once 0.3.3 (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.2.0", + "riscv 0.3.0", "simple-filesystem 0.0.1 (git+https://github.com/wangrunji0408/SimpleFileSystem-Rust)", - "spin 0.4.8 (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)", "ucore-memory 0.1.0", "ucore-process 0.1.0", @@ -157,7 +158,7 @@ version = "0.1.0" name = "ucore-process" version = "0.1.0" dependencies = [ - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -170,6 +171,11 @@ name = "ux" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "volatile" version = "0.1.0" @@ -181,7 +187,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "os_bootinfo 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "usize_conversions 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "ux 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -201,25 +207,26 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] -"checksum bare-metal 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eda0f54b2d49f18f3867a5e6d458299bb886db6e64c34d319d6b1aa0839ac31c" +"checksum bare-metal 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1bdcf9294ed648c7cd29b11db06ea244005aeef50ae8f605b1a3af2940bf8f92" "checksum bit-vec 0.5.0 (git+https://github.com/AltSysrq/bit-vec.git)" = "" "checksum bit_field 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed8765909f9009617974ab6b7d332625b320b33c326b1e9321382ef1999b5d56" -"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" -"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275" -"checksum cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efe5c877e17a9c717a0bf3613b2709f723202c4e4675cc8f12926ded29bcb17e" -"checksum lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fb497c35d362b6a331cfd94956a07fc2c78a4604cdbee844a81170386b996dd3" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum cc 1.0.23 (registry+https://github.com/rust-lang/crates.io-index)" = "c37f0efaa4b9b001fa6f02d4b644dee4af97d3414df07c51e3e4f015f3a3e131" +"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" +"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" "checksum linked_list_allocator 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "655d57c71827fe0891ce72231b6aa5e14033dae3f604609e6a6f807267c1678d" -"checksum log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "61bd98ae7f7b754bc53dca7d44b604f733c6bba044ea6f41bc8d89272d8161d2" +"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f" "checksum multiboot2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6ebbe89ab663a65cab341428d5fc7013b0eab5543ace92a401a86581e50fdd81" "checksum once 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "931fb7a4cf34610cf6cbe58d52a8ca5ef4c726d4e2e178abd0dc13a6551c6d73" "checksum os_bootinfo 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "66481dbeb5e773e7bd85b63cd6042c30786f834338288c5ec4f3742673db360a" "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" "checksum simple-filesystem 0.0.1 (git+https://github.com/wangrunji0408/SimpleFileSystem-Rust)" = "" -"checksum spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14db77c5b914df6d6173dda9a3b3f5937bd802934fa5edaf934df06a3491e56f" +"checksum spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "37b5646825922b96b5d7d676b5bb3458a54498e96ed7b0ce09dc43a07038fea4" "checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5" "checksum uart_16550 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "269f953d8de3226f7c065c589c7b4a3e83d10a419c7c3b5e2e0f197e6acc966e" "checksum usize_conversions 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f70329e2cbe45d6c97a5112daad40c34cd9a4e18edb5a2a18fefeb584d8d25e5" "checksum ux 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53d8df5dd8d07fedccd202de1887d94481fadaea3db70479f459e8163a1fab41" +"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" "checksum volatile 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37c5d76c0f40ba4f8ac10ec4717d4e98ce3e58c5607eea36e9464226fc5e0a95" "checksum x86_64 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "466c2002e38edde7ebbaae6656793d4f71596634971c7e8cbf7afa4827968445" "checksum xmas-elf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22678df5df766e8d1e5d609da69f0c3132d794edf6ab5e75e7abcd2270d4cf58" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index 0dc49f7..6b615a9 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -21,7 +21,7 @@ debug = true [dependencies] log = "0.4" -spin = "0.4.8" +spin = "0.4.9" once = "0.3.3" xmas-elf = "0.6" bitflags = "1.0" diff --git a/kernel/Makefile b/kernel/Makefile index 1213feb..770d88c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -120,11 +120,11 @@ build/x86_64/os.iso: $(kernel) $(grub_cfg) @rm -r build/isofiles build/riscv32/os.iso: kernel + @mkdir -p build/riscv32 @cp $(rust_lib) $(kernel) ifdef board @cp $(rust_lib) $@ else - @mkdir -p build/riscv32 @cd ../riscv-pk && \ mkdir -p build && \ cd build && \ diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs index b24d93a..a129cc0 100644 --- a/kernel/src/lib.rs +++ b/kernel/src/lib.rs @@ -2,8 +2,6 @@ #![feature(lang_items)] #![feature(const_fn)] #![feature(alloc)] -#![feature(const_unique_new, const_atomic_usize_new)] -#![feature(unique)] #![feature(allocator_api)] #![feature(abi_x86_interrupt)] #![feature(iterator_step_by)] diff --git a/macOS-env/README.md b/macOS-env/README.md index 658c902..06fff74 100644 --- a/macOS-env/README.md +++ b/macOS-env/README.md @@ -1,5 +1,10 @@ # MacOS environment +``` bash +brew tap altkatz/homebrew-gcc_cross_compilers +brew install x64-elf-gcc +``` + * x86_64_elf_*: