【问题标题】:qemu-system-riscv64 is not found in package qemu-system-misc在包 qemu-system-misc 中找不到 qemu-system-riscv64
【发布时间】:2021-03-20 04:24:23
【问题描述】:

我正在尝试在 Ubuntu 18.04.5 上设置 xv6,但在 make qemu 期间出现错误:

# outputs...
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
make: qemu-system-riscv64: Command not found

安装qemu-system-misc(版本1:2.11+dfsg-1ubuntu7.36)后发现/usr/bin下没有qemu-system-riscv64

$ ls /usr/bin | grep qemu
qemu-img
qemu-io
qemu-nbd
qemu-system-alpha
qemu-system-cris
qemu-system-lm32
qemu-system-m68k
qemu-system-microblaze
qemu-system-microblazeel
qemu-system-moxie
qemu-system-nios2
qemu-system-or1k
qemu-system-sh4
qemu-system-sh4eb
qemu-system-tricore
qemu-system-unicore32
qemu-system-xtensa
qemu-system-xtensaeb

我尝试安装 Tools Used in 6.S081 中提到的旧版本的 qemu-system-misc

此时,似乎包 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

但未找到此版本。

任何安装qemu-system-riscv64 或旧版本qemu-system-misc 的解决方案?

【问题讨论】:

    标签: qemu xv6


    【解决方案1】:

    在我 upgraded Ubuntu 到版本 20.04.2 之后一切顺利:)

    【讨论】:

      【解决方案2】:

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

      你可以编译qemu

      $ wget https://download.qemu.org/qemu-5.1.0.tar.xz
      $ tar xf qemu-5.1.0.tar.xz
      
      
      $ cd qemu-5.1.0
      $ ./configure --disable-kvm --disable-werror --prefix=/usr/local --target-list="riscv64-softmmu"
      $ make
      $ sudo make install
      $ cd ..
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-11-25
        • 2016-01-26
        • 1970-01-01
        • 2021-06-18
        • 2019-07-29
        • 2021-10-25
        • 2018-10-03
        • 1970-01-01
        相关资源
        最近更新 更多