Run image from temporary copy to avoid modified disk image file
This commit is contained in:
parent
3d3a433800
commit
c3a6139f83
@ -1,3 +1,5 @@
|
||||
require "tmpdir"
|
||||
|
||||
project_name "HOS"
|
||||
path_prepend "x86_64-elf-gcc/bin"
|
||||
|
||||
@ -85,6 +87,9 @@ hel_env = env "hel", use: %w[ldc2 x86_64-w64-mingw32-gcc] do |env|
|
||||
end
|
||||
|
||||
task "run", desc: "Run HOS in QEMU" do
|
||||
Dir.mktmpdir do |tmpdir|
|
||||
img = hel_env.expand("^/hos.img")
|
||||
sh %W[qemu-system-x86_64 -bios OVMF.fd -drive file=#{img},format=raw]
|
||||
FileUtils.cp(img, tmpdir)
|
||||
sh %W[qemu-system-x86_64 -bios OVMF.fd -drive file=#{tmpdir}/hos.img,format=raw]
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user