Closed shzhxh closed 3 years ago
编译所用的命令:
git submodule update --init --recursive cd user make sfsimg PREBUILT=1 ARCH=riscv64 cd ../kernel make run ARCH=riscv64 LOG=info
https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git
wait
= note: `#[warn(deprecated)]` on by default
= note: `#[warn(unreachable_patterns)]` on by default
warning: unreachable pattern --> src/lkm/manager.rs:473:13 | 473 | loader::REL_GOT => unsafe { | ^^^^^^^^^^^^^^^
warning: 3 warnings emitted
Finished release [optimized] target(s) in 46.70s
target/riscv64/release/rcore: 1: target/riscv64/release/rcore: Syntax error: ")" unexpected Makefile:292: recipe for target 'target/riscv64/release/kernel.img' failed make: *** [target/riscv64/release/kernel.img] Error 2
出错原因:环境没有准备好,需要先执行rustup component add rust-src llvm-tools-preview
rustup component add rust-src llvm-tools-preview
编译所用的命令:
patching file /home/szx/.rustup/toolchains/nightly-2020-06-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/sync/atomic.rs Reversed (or previously applied) patch detected! Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file /home/szx/.rustup/toolchains/nightly-2020-06-04-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/sync/atomic.rs.rej Makefile:301: recipe for target 'kernel' failed
make: [kernel] Error 1 (ignored)
Downloaded memchr v2.3.3 (registry
https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git
) / 忽略中间部分 / Compiling buddy_system_allocator v0.4.0 warning: use of deprecated item 'sync::condvar::Condvar::_wait': this may leads to lost wakeup problem. please usewait
instead. --> src/sync/mutex.rs:314:14warning: unreachable pattern --> src/lkm/manager.rs:473:13 | 473 | loader::REL_GOT => unsafe { | ^^^^^^^^^^^^^^^
warning: 3 warnings emitted
target/riscv64/release/rcore: 1: target/riscv64/release/rcore: Syntax error: ")" unexpected Makefile:292: recipe for target 'target/riscv64/release/kernel.img' failed make: *** [target/riscv64/release/kernel.img] Error 2