computer_knowledge_notes/Software/_模拟器与容器/riscvemu.md

33 lines
690 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#### 来源
[riscvemu](https://bellard.org/riscvemu/)
#### 简介
RISCVEMU是一个RISC-V架构的模拟器。它的目的是在保持完整的基础上实现精简。
#### 编译
```shell
wget https://bellard.org/riscvemu/riscvemu-2017-08-06.tar.gz
tar zxvf riscvemu-XXX.tar.gz
cd riscvemu-XXX
vim Makefile # 删除-Werror
make
```
##### 问题解决
- `fatal error: curl/multi.h: No such file or directory`
缺少库对于ubuntu18.04,应安装`sudo apt install libcurl4-gnutls-dev`
#### 运行
```
wget https://bellard.org/riscvemu/diskimage-linux-riscv-2017-08-06.2.tar.gz
tar zxvf diskimg-linux-riscv-XXX.tar.gz
./riscvemu diskimg-linux-riscv-XXX/root-riscv64.cfg
```