Store QEMU files in local qemu directory
This commit is contained in:
parent
cb24d00e5f
commit
ce3e2c55df
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.rscons*
|
.rscons*
|
||||||
/x86_64-elf-gcc/
|
/x86_64-elf-gcc/
|
||||||
/build/
|
/build/
|
||||||
|
/qemu/
|
||||||
|
16
Rsconscript
16
Rsconscript
@ -187,15 +187,15 @@ hello_env = env "hello", use: %w[ldc2 x86_64-w64-mingw32-gcc] do |env|
|
|||||||
end
|
end
|
||||||
|
|
||||||
task "run", desc: "Run HOS in QEMU" do
|
task "run", desc: "Run HOS in QEMU" do
|
||||||
Dir.mktmpdir do |tmpdir|
|
FileUtils.rm_rf("qemu")
|
||||||
img = hello_env.expand("^/HOS.img")
|
FileUtils.mkdir_p("qemu")
|
||||||
FileUtils.cp(img, tmpdir)
|
img = hello_env.expand("^/HOS.img")
|
||||||
ovmf = "OVMF.fd"
|
FileUtils.cp(img, "qemu")
|
||||||
if File.exist?("/usr/share/edk2/x64/OVMF.fd")
|
ovmf = "OVMF.fd"
|
||||||
ovmf = "/usr/share/edk2/x64/OVMF.fd"
|
if File.exist?("/usr/share/edk2/x64/OVMF.fd")
|
||||||
end
|
ovmf = "/usr/share/edk2/x64/OVMF.fd"
|
||||||
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
|
||||||
|
sh %W[qemu-system-x86_64 -cpu max -bios #{ovmf} -drive file=qemu/HOS.img,format=raw -device qemu-xhci -device usb-tablet]
|
||||||
end
|
end
|
||||||
|
|
||||||
# See README.md for how to set up VirtualBox for HOS.
|
# See README.md for how to set up VirtualBox for HOS.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user