【问题标题】:make qemu on xv6-riscv gets stucked at qemu-system-riscv64 ... commandmake qemu on xv6-riscv 卡在 qemu-system-riscv64 ... 命令
【发布时间】:2021-02-26 18:21:02
【问题描述】:

在 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

程序卡在那里。 vm没有启动,没有提示。

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

【问题讨论】:

    标签: xv6


    【解决方案1】:

    这在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
    

    【讨论】:

    • 但我遇到了在 Ubuntu 18.04.5 上找不到 qemu-system-misc 的版本 1:4.2-3ubuntu6 的错误。希望得到帮助。
    • 哦,我找到了解决方案 X)
    猜你喜欢
    • 1970-01-01
    • 2016-01-26
    • 2019-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-03
    相关资源
    最近更新 更多