Compare commits

..

No commits in common. "4e46b98efce5f6c1160375426665242b15d5d5ba" and "cb24d00e5fe3929dfcb41ed0e735782e9fa9f5e0" have entirely different histories.

2 changed files with 8 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
.rscons*
/x86_64-elf-gcc/
/build/
/qemu/

View File

@ -187,22 +187,15 @@ hello_env = env "hello", use: %w[ldc2 x86_64-w64-mingw32-gcc] do |env|
end
task "run", desc: "Run HOS in QEMU" do
FileUtils.rm_rf("qemu")
FileUtils.mkdir_p("qemu")
img = hello_env.expand("^/HOS.img")
FileUtils.cp(img, "qemu")
ovmf = "OVMF.fd"
if File.exist?("/usr/share/edk2/x64/OVMF.fd")
ovmf = "/usr/share/edk2/x64/OVMF.fd"
Dir.mktmpdir do |tmpdir|
img = hello_env.expand("^/HOS.img")
FileUtils.cp(img, tmpdir)
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
sh %W[
qemu-system-x86_64
-cpu max
-serial file:qemu/serial.out
-bios #{ovmf}
-drive file=qemu/HOS.img,format=raw
-device qemu-xhci
-device usb-tablet]
end
# See README.md for how to set up VirtualBox for HOS.