rCore_tutorial_doc icon indicating copy to clipboard operation
rCore_tutorial_doc copied to clipboard

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

Open chyyuu opened this issue 6 years ago • 7 comments

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

chyyuu avatar Dec 14 '19 22:12 chyyuu

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

安装 Rust-nightly

安装 Qemu

wyfcyx avatar Feb 18 '20 15:02 wyfcyx

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

vtta avatar Feb 25 '20 08:02 vtta

运行 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

gongbo2018 avatar May 26 '20 04:05 gongbo2018

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

sushadangchu avatar Sep 09 '20 11:09 sushadangchu

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

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

wyfcyx avatar Sep 09 '20 11:09 wyfcyx

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

sushadangchu avatar Sep 09 '20 11:09 sushadangchu

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

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

sushadangchu avatar Sep 10 '20 09:09 sushadangchu