微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

make qemu on xv6-riscv 卡在 qemu-system-riscv64 ... 命令

如何解决make qemu on xv6-riscv 卡在 qemu-system-riscv64 ... 命令

在 Ubuntu 20.04 上,我使用页面 Tools Used in 6.828

安装了 xv6 项目
$ sudo apt-get install git build-essential gdb-multiarch qemu-system-misc gcc-riscv64-linux-gnu binutils-riscv64-linux-gnu

他们在网页上检查的文件版本是

$ riscv64-unkNown-elf-gcc --version 
riscv64-unkNown-elf-gcc () 9.3.0
copyright (C) 2019 Free Software Foundation,Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or fitness FOR A PARTIculaR PURPOSE.

$ qemu-system-riscv64 --version
QEMU emulator version 5.2.50 (v5.2.0-2349-g51db2d7cf2)
copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers

在 xv6-riscv 上

$ make qemu
# ... lots of output ...
qemu-system-riscv64 -machine virt -bios none -kernel kernel/kernel -m 128M -smp 3 -nographic -drive file=fs.img,if=none,format=raw,id=x0 -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0

程序卡在那里。虚拟机未启动,不显示提示

欢迎任何有关如何解决此问题的想法。

解决方法

这在Tools Used in 6.S081

中已经提到

此时,似乎包 qemu-system-misc 收到了 更新破坏了它与我们的内核的兼容性。如果你运行 make qemu 和 脚本似乎在

之后挂起
qemu-system-riscv64 -machine virt -bios none -kernel kernel/kernel -m 128M -smp 3 
nographic -drive file=fs.img,if=none,format=raw,id=x0 -device virtio-blk
device,drive=x0,bus=virtio-mmio-bus.0

您需要卸载该软件包并安装旧版本:

$ sudo apt-get remove qemu-system-misc
$ sudo apt-get install qemu-system-misc=1:4.2-3ubuntu6

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?