最近开始学习操作系统课程 6.S081,记录一下。
在准备环境过程中遇到了一些问题,多亏了csdn,知乎上的各位前辈,才得以解决。
系统:Ubuntu18.04(查看版本的命令 -> lsb_release -a)
课程网站:6.S081 / Fall 2020
1. 下载 xv6:
git clone git://github.com/mit-pdos/xv6-riscv.git(根据:6.S081 / Fall 2020),这一步没遇到什么特别的问题。
2. 工具链
原文:For this class you'll need the RISC-V versions of a couple different tools: QEMU 5.1, GDB 8.3, GCC, and Binutils.
这个部分也是根据网站上 “ Other Linux distributions (i.e. compiling your own toolchain) ” 部分进行操作的。(6.S081 / Fall 2020)
不过遇到一些问题,下面详述。
1)
问题:子模块 Spike clone 失败
解决:cd spike; git submodule update
解释:执行操作 git clone --recursive https://github.com/riscv/riscv-gnu-toolchain,提示spike 没clone成功,也可以看到 riscv-gnu-toolchain/spike目录是空的。
2)
问题:编译时报错 pkg-config not found
解决:sudo apt-get install pkg-config
参考:linux 安装报错:pkg-config not found_banyu0052的博客-CSDN博客
3)
问题:ERROR: glib-2.48 gthread-2.0 is required to compile QEMU
解决:apt install libglib2.0-dev
参考:https://github.com/Xilinx/qemu/issues/44
4)
问题:ERROR: pixman >= 0.21.8 not present
解决:ubuntu编译qemu报错:‘ERROR: pixman >= 0.21.8 not present.’ 解决方案_dongdundun的博客-CSDN博客_host-pixman 报错