rcore-os / rCore_tutorial_doc

Tutorial doc for rCore OS step by step (2nd edition)
https://rcore-os.github.io/rCore_tutorial_doc/
64 stars 16 forks source link

第零章:实验环境说明 · GitBook #62

Open chyyuu opened 4 years ago

chyyuu commented 4 years ago

https://rcore-os.github.io/rCore_tutorial_doc/chapter0/introduction.html

wyfcyx commented 4 years ago

自行配置 Linux(虚拟机)/MacOS/wsl 实验环境的同学,请参考

安装 Rust-nightly

安装 Qemu

vtta commented 4 years ago

macOS 下配置命令

rustup toolchain install nightly
rustup target add riscv64imac-unknown-none-elf
rustup component add llvm-tools-preview
cargo install cargo-binutils
brew install dtc qemu
gongbo2018 commented 4 years ago

运行 make run 报下面的错误,不知道 opensbi-riscv64-virt-fw_jump.bin 这个文件是哪里来的

    Finished dev [unoptimized + debuginfo] target(s) in 0.71s
rust-objcopy --binary-architecture=riscv64 target/riscv64imac-unknown-none-elf/debug/os --strip-all -O binary target/riscv64imac-unknown-none-elf/debug/kernel.bin
qemu-system-riscv64 \
    -machine virt \
    -nographic \
    -bios default \
    -device loader,file=target/riscv64imac-unknown-none-elf/debug/kernel.bin,addr=0x80200000
qemu-system-riscv64: Unable to load the RISC-V firmware "opensbi-riscv64-virt-fw_jump.bin"
make[1]: *** [Makefile:33:qemu] 错误 1
make[1]: 离开目录“/home/wgb/osSpace/rCore_tutorial/os”
make: *** [Makefile:8:run] 错误 2
sushadangchu commented 3 years ago

运行时报错,和gongbo2018情况一样,不知道是缺少什么环境了,网上也没有搜索到

wyfcyx commented 3 years ago

@sushadangchu 运行时报错,和gongbo2018情况一样,不知道是缺少什么环境了,网上也没有搜索到

按照 这里 所讲的升级一下 Qemu 版本试一下?

sushadangchu commented 3 years ago

我是按照这个说明安装的,这是版本截图 image 这里是报错截图,不知道哪里出了问题。。。 image

sushadangchu commented 3 years ago

重新配置了一下环境,可以运行了,但是走到最后一步的时候出错了,不知道什么原因。

switch satp from 0x800000000008025a to 0x80000000000811ca
++++ setup memory!    ++++
++++ setup interrupt! ++++
available programs in rust/ are:
  .
  ..
  hello_world
  notebook
  user_shell
  model
  write
++++ setup fs!        ++++
++++ setup process!   ++++
++++ setup timer!     ++++
Exception(StorePageFault) va = 0xffffffffffffff68 instruction = 0x1ad82
panicked at 'page fault!', src/interrupt.rs:76:5