我想在qemu-system-riscv 64上运行RISC-V的Linux根文件系统。要求在这里testsuits-for-oskernel/riscv-linux-rootfs at main · oscomp/testsuits-for-oskernel · GitHub
然而,在我根据需要构建了根文件系统之后,我在运行
sudo qemu-system-riscv64 -nographic -machine virt \
-kernel bbl -append "root=/dev/vda ro console=ttyS0" \
-drive file=riscv64-rootfs.bin,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0 \
-netdev type=tap,script=scripts/ifup.sh,downscript=scripts/ifdown.sh,id=net0 \
-device virtio-net-device,netdev=net0
错误是
qemu-system-riscv64: Some ROM regions are overlapping
These ROM regions might have been loaded by direct user request or by default.
They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest memory.
Check whether you intended to load all this guest code, and whether it has been built to load to the correct addresses.
The following two regions overlap (in the memory address space):
/usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.bin (addresses 0x0000000080000000 - 0x0000000080012630)
build/riscv-pk/bbl ELF program header segment 1 (addresses 0x0000000080000000 - 0x000000008000690d)
make: *** [Makefile:13: run] Error 1
我在Ubuntu 22.04的虚拟机上运行了这个项目,这个问题可能与在虚拟机上运行虚拟机有关吗?或者与Ubuntu的版本有关?有什么建议吗?
1条答案
按热度按时间mwkjh3gx1#
问题是你试图在QEMU自动加载opensbi固件的同一个地址加载你的文件'bbl'。要么你需要告诉QEMU不要加载固件,要么你需要链接你的'bbl'文件到其他地方。