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"
|
project_name "HOS"
|
||||||
path_prepend "x86_64-elf-gcc/bin"
|
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
|
end
|
||||||
|
|
||||||
task "run", desc: "Run HOS in QEMU" do
|
task "run", desc: "Run HOS in QEMU" do
|
||||||
img = hel_env.expand("^/hos.img")
|
Dir.mktmpdir do |tmpdir|
|
||||||
sh %W[qemu-system-x86_64 -bios OVMF.fd -drive file=#{img},format=raw]
|
img = hel_env.expand("^/hos.img")
|
||||||
|
FileUtils.cp(img, tmpdir)
|
||||||
|
sh %W[qemu-system-x86_64 -bios OVMF.fd -drive file=#{tmpdir}/hos.img,format=raw]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user