Skip to content

关于 rcore环境部署的一些补充 #78

@freheit889

Description

@freheit889

在rcore环境部署一节中 我遇到一些需要后面教程才能解决的问题

在此我新建一个linux环境 以ubuntu64位为例

 wget https://download.qemu.org/qemu-4.2.0.tar.xz         
 tar xvJf qemu-4.2.0.tar.xz       
 cd qemu-4.2.0     
 ./configure --target-list=riscv32-softmmu,riscv64-softmmu
  • 此时会提示 glib-2.48 gthread-2.0 is required to compile QEMU
    利用教程方法 sudo apt-get install libglib2.0-dev之后依旧会报错

解决configure问题

  • 从官方下载依赖包 wget http://ftp.gnome.org/pub/gnome/sources/glib/2.48/glib-2.48.2.tar.xz
    解压切入
  • glib-2.48也需要一定的依赖环境 直接./configure是会报错的
sudo apt-get install zlib1g zlib1g-dev libffi-dev  libpcre3-dev libpixman-1-dev

然后./configure&&make&&make install

进入qemu文件夹 ./configure --target-list=riscv32-softmmu,riscv64-softmmu 就可以正常执行了

还有一些问题在最后运行rcore处

  • 在make run之后 会提示 the riscv64imac-unknown-none-elf target may not be installed

    利用 rustup target add riscv64imac-unknown-none-elf

  • 继续make run 会出现 rust-objcopy: Command not found
    安装rust-objcopy即可

 cargo install cargo-binutils
 rustup component add llvm-tools-preview

然后make run 就可以正常执行了

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions