diff --git a/assets/debugging/popcorn.elf-gdb.py b/assets/debugging/popcorn.elf-gdb.py index 6ebd4d5..413053e 100644 --- a/assets/debugging/popcorn.elf-gdb.py +++ b/assets/debugging/popcorn.elf-gdb.py @@ -1,4 +1,4 @@ import time -time.sleep(2.5) +time.sleep(3.5) gdb.execute("target remote :1234") gdb.execute("set waiting = false") diff --git a/assets/ovmf/x64/ovmf.fd b/assets/ovmf/x64/ovmf.fd deleted file mode 100644 index 96d7e09..0000000 Binary files a/assets/ovmf/x64/ovmf.fd and /dev/null differ diff --git a/assets/ovmf/x64/ovmf_code.fd b/assets/ovmf/x64/ovmf_code.fd new file mode 100644 index 0000000..3e08e16 Binary files /dev/null and b/assets/ovmf/x64/ovmf_code.fd differ diff --git a/assets/ovmf/x64/ovmf_debug.fd b/assets/ovmf/x64/ovmf_debug.fd deleted file mode 100644 index c13c912..0000000 Binary files a/assets/ovmf/x64/ovmf_debug.fd and /dev/null differ diff --git a/assets/ovmf/x64/ovmf_vars.fd b/assets/ovmf/x64/ovmf_vars.fd new file mode 100644 index 0000000..728e5fe Binary files /dev/null and b/assets/ovmf/x64/ovmf_vars.fd differ diff --git a/assets/ovmf/x64/ovmf_vars_d.fd b/assets/ovmf/x64/ovmf_vars_d.fd new file mode 100644 index 0000000..c283dcc Binary files /dev/null and b/assets/ovmf/x64/ovmf_vars_d.fd differ diff --git a/qemu.sh b/qemu.sh index 2aee946..61d4e06 100755 --- a/qemu.sh +++ b/qemu.sh @@ -3,14 +3,14 @@ build="$(dirname $0)/build" assets="$(dirname $0)/assets" debug="" -flash_name="ovmf.fd" +flash_name="ovmf_vars" gfx="-nographic" for arg in $@; do case "${arg}" in --debug) debug="-s" - flash_name="ovmf_debug.fd" + flash_name="ovmf_vars_d" ;; --gfx) gfx="" @@ -40,7 +40,8 @@ fi touch "${build}/popd_table.data" exec qemu-system-x86_64 \ - -drive "if=pflash,format=raw,file=${build}/${flash_name}" \ + -drive "if=pflash,format=raw,readonly,file=${assets}/ovmf/x64/ovmf_code.fd" \ + -drive "if=pflash,format=raw,file=${build}/${flash_name}.fd" \ -drive "format=raw,file=${build}/popcorn.img" \ -monitor telnet:localhost:45454,server,nowait \ -smp 1 \ diff --git a/scripts/templates/build.ninja.j2 b/scripts/templates/build.ninja.j2 index 11b4568..6c94c3d 100644 --- a/scripts/templates/build.ninja.j2 +++ b/scripts/templates/build.ninja.j2 @@ -152,11 +152,11 @@ build $ $modulefile $ {{ generator }} -build $builddir/ovmf.fd : cp $srcroot/assets/ovmf/x64/ovmf.fd - name = ovmf.fd +build $builddir/ovmf_vars.fd : cp $srcroot/assets/ovmf/x64/ovmf_vars.fd + name = ovmf_vars.fd -build $builddir/ovmf_debug.fd : cp $srcroot/assets/ovmf/x64/ovmf_debug.fd - name = ovmf_debug.fd +build $builddir/ovmf_vars_d.fd : cp $srcroot/assets/ovmf/x64/ovmf_vars_d.fd + name = ovmf_vars_d.fd build $builddir/popcorn.elf | $builddir/popcorn.elf.debug : strip $builddir/host/popcorn.elf name = kernel