diff --git a/Rsconscript b/Rsconscript index 872c7e0..ebd44b2 100644 --- a/Rsconscript +++ b/Rsconscript @@ -186,7 +186,11 @@ task "run", desc: "Run HOS in QEMU" do Dir.mktmpdir do |tmpdir| img = hello_env.expand("^/HOS.img") FileUtils.cp(img, tmpdir) - sh %W[qemu-system-x86_64 -cpu max -bios OVMF.fd -drive file=#{tmpdir}/HOS.img,format=raw -device qemu-xhci -device usb-tablet] + ovmf = "OVMF.fd" + if File.exist?("/usr/share/edk2/x64/OVMF.fd") + ovmf = "/usr/share/edk2/x64/OVMF.fd" + end + sh %W[qemu-system-x86_64 -cpu max -bios #{ovmf} -drive file=#{tmpdir}/HOS.img,format=raw -device qemu-xhci -device usb-tablet] end end