Xv6 Lab1

环境:

Ubuntu 20.04 LTS

一开始没啥好说的,按照官方的文档

https://github.com/mit-pdos/xv6-public

https://pdos.csail.mit.edu/6.828/2020/tools.html

执行

sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu

cd 到Xv6的文件夹后

make qemu

报错:


***

*** Error: Couldn't find a working QEMU executable.

*** Is the directory containing the qemu binary in your PATH

*** or have you tried setting the QEMU variable in Makefile?

***

serial mon:stdio -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 -m 512

make: serial: Command not found

make: [Makefile:225: qemu] Error 127 (ignored)

定位到qemu

删除line54 的注释


# If the makefile can't find QEMU, specify its path here

QEMU = qemu-system-i386

并且安装qemu-system-i386

sudo apt-get install qemu-system-x86

之后报了新的错误

qemu-system-i386 -serial mon:stdio -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 -m 512

Unable to init server: Could not connect: Connection refused

gtk initialization failed

make: *** [Makefile:225: qemu] Error 1

根据报错提示定位到line 225后,新增-nographic

$(QEMU) -nographic -serial mon:stdio $(QEMUOPTS)

再次执行make qemu即可

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 此篇是学习ucore操作系统lab1的实验报告,参考了很多资料和文章,也学到了不少。 先看要求: 为了实现lab1...
    一斗水阅读 735评论 0赞 0
  • 参考pdf 《computer basic》 操作系统环境运行环境 = 操作系统 + 硬件硬件:处理器(CPU)、...
    gufsicsxzf阅读 697评论 0赞 0
  • MIT6.828-2018 过去很长一段时间都想自己写一个操作系统,走了不少弯路。花了很多时间在学习《30天自制操...
    扶桑与克里斯阅读 5,666评论 0赞 3
  • 更新至2018年9月13日 介绍 这个实验室分为3个部分。第一部分,主要是熟悉x86汇编语言,x86仿真器QEMU...
    Savior2016阅读 976评论 0赞 0
  • 序 注意:实验环境基于2017年课程搭建 详细课程信息见主页:https://pdos.csail.mit.edu...
    大份抄手加蛋阅读 1,303评论 0赞 0

友情链接更多精彩内容