diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 46e06de87..d99049798 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,12 +14,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - run: sudo apt-get -qqy update - run: sudo apt-get -qqy install qemu-system-x86 - - run: rustup component add rust-src - - run: rustup component add llvm-tools-preview - - run: cargo install bootimage + - run: make - run: make test diff --git a/Cargo.lock b/Cargo.lock index e1a51e574..b36768e18 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,9 +79,9 @@ dependencies = [ [[package]] name = "bootloader" -version = "0.9.21" +version = "0.9.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62c8f6168cd106687ee36a2b71a46c4144d73399f72814104d33094b8092fd2" +checksum = "de78decc37247c7cfac5dbf3495c7298c6ac97cb355161caa7e15969c6648e6c" [[package]] name = "byteorder" diff --git a/Cargo.toml b/Cargo.toml index fca2c768b..efcf1101c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ acpi = "4.1.0" aml = "0.16.1" base64 = { version = "0.13.0", default-features = false } bit_field = "0.10.0" -bootloader = { version = "0.9.21", features = ["map_physical_memory"] } +bootloader = { version = "0.9.22", features = ["map_physical_memory"] } float-cmp = "0.9.0" hmac = { version = "0.12.1", default-features = false } lazy_static = { version = "1.4.0", features = ["spin_no_std"] } diff --git a/Makefile b/Makefile index 74db5fdd9..84a05a5bd 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,9 @@ .EXPORT_ALL_VARIABLES: setup: - curl https://sh.rustup.rs -sSf | sh + curl https://sh.rustup.rs -sSf | sh -s -- -y rustup install nightly rustup default nightly - rustup component add rust-src - rustup component add llvm-tools-preview cargo install bootimage output = video diff --git a/README.md b/README.md index 1c772a5e3..f4ab4c55d 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,6 @@ Install the required tools with `make setup` or the following commands: $ curl https://sh.rustup.rs -sSf | sh $ rustup install nightly $ rustup default nightly - $ rustup component add rust-src - $ rustup component add llvm-tools-preview $ cargo install bootimage diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index bdcdc4fbb..000000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -nightly-2021-12-13 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000..fe1fc83d3 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2022-04-04" +components = ["rust-src", "llvm-tools-preview"] diff --git a/src/lib.rs b/src/lib.rs index 31a29e154..596b64a25 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,11 +2,9 @@ #![cfg_attr(test, no_main)] #![feature(abi_x86_interrupt)] #![feature(alloc_error_handler)] -#![feature(asm)] #![feature(asm_sym)] #![feature(naked_functions)] #![feature(custom_test_frameworks)] -#![feature(destructuring_assignment)] #![test_runner(crate::test_runner)] #![reexport_test_harness_main = "test_main"] diff --git a/src/sys/idt.rs b/src/sys/idt.rs index efb07116d..b03ed1a01 100644 --- a/src/sys/idt.rs +++ b/src/sys/idt.rs @@ -1,6 +1,7 @@ use crate::sys; use crate::sys::process::Registers; +use core::arch::asm; use lazy_static::lazy_static; use spin::Mutex; use x86_64::instructions::interrupts; diff --git a/src/sys/process.rs b/src/sys/process.rs index 5911036c7..53d78a724 100644 --- a/src/sys/process.rs +++ b/src/sys/process.rs @@ -5,6 +5,7 @@ use alloc::boxed::Box; use alloc::collections::btree_map::BTreeMap; use alloc::string::{String, ToString}; use alloc::vec::Vec; +use core::arch::asm; use core::sync::atomic::{AtomicUsize, Ordering}; use lazy_static::lazy_static; use object::{Object, ObjectSegment}; diff --git a/src/sys/syscall/mod.rs b/src/sys/syscall/mod.rs index b15f71785..dfcec0dd2 100644 --- a/src/sys/syscall/mod.rs +++ b/src/sys/syscall/mod.rs @@ -4,6 +4,8 @@ pub mod service; use crate::sys; use crate::sys::fs::FileInfo; +use core::arch::asm; + /* * Dispatching system calls */