diff options
-rw-r--r-- | test_code/Makefile2 | 28 | ||||
-rw-r--r-- | test_code/Makefile_save_origin | 27 | ||||
-rwxr-xr-x | test_code/qemu-system-x86_64 | bin | 0 -> 59548440 bytes | |||
-rwxr-xr-x | test_code/run.sh | 2 |
4 files changed, 56 insertions, 1 deletions
diff --git a/test_code/Makefile2 b/test_code/Makefile2 new file mode 100644 index 0000000..5f0a260 --- /dev/null +++ b/test_code/Makefile2 @@ -0,0 +1,28 @@ +#!/usr/bin/env make + +SHELL=/bin/bash + +LOG=debug.log +OVMFCODE=OVMF_CODE.fd +OVMFVARS=OVMF_VARS.fd +QEMU=kvm -bios OVMF.fd +QEMUFLAGS=-drive format=raw,file=fat:rw:hda-contents,index=0,media=disk \ + -drive if=pflash,format=raw,readonly,file=$(OVMFCODE) \ + -drive if=pflash,format=raw,file=$(OVMFVARS) \ + -debugcon file:$(LOG) -global isa-debugcon.iobase=0x402 \ + -serial stdio \ + -nographic \ + -nodefaults \ + -net none \ + -cpu host + +run: + $(QEMU) $(QEMUFLAGS) + +# -S freeze CPU at startup (use 'c' to start execution) +# -s shorthand for -gdb tcp::1234 +debug: + $(QEMU) $(QEMUFLAGS) -s -S + +.PHONY: run debug + diff --git a/test_code/Makefile_save_origin b/test_code/Makefile_save_origin new file mode 100644 index 0000000..a753fad --- /dev/null +++ b/test_code/Makefile_save_origin @@ -0,0 +1,27 @@ +#!/usr/bin/env make + +SHELL=/bin/bash + +LOG=debug.log +OVMFCODE=OVMF_CODE.fd +OVMFVARS=OVMF_VARS.fd +QEMU=kvm -bios OVMF.fd +QEMUFLAGS=-drive format=raw,file=fat:rw:hda-contents,index=0,media=disk \ + -drive if=pflash,format=raw,readonly,file=$(OVMFCODE) \ + -drive if=pflash,format=raw,file=$(OVMFVARS) \ + -debugcon file:$(LOG) -global isa-debugcon.iobase=0x402 \ + -serial stdio \ + -nodefaults \ + -net none \ + -cpu host + +run: + $(QEMU) $(QEMUFLAGS) + +# -S freeze CPU at startup (use 'c' to start execution) +# -s shorthand for -gdb tcp::1234 +debug: + $(QEMU) $(QEMUFLAGS) -s -S + +.PHONY: run debug + diff --git a/test_code/qemu-system-x86_64 b/test_code/qemu-system-x86_64 Binary files differnew file mode 100755 index 0000000..6944f07 --- /dev/null +++ b/test_code/qemu-system-x86_64 diff --git a/test_code/run.sh b/test_code/run.sh index 469911b..738336e 100755 --- a/test_code/run.sh +++ b/test_code/run.sh @@ -4,7 +4,7 @@ #(cd hda-contents; rm memtest_log; echo -n -e '\x00' >> memtest_log) #OVMF=/usr/share/ovmf/OVMF.fd -OVMF=/home/koenigr/Memtest/git/memtest86/test_code/OVMF.fd +OVMF=./OVMF.fd sudo kvm -bios $OVMF \ --drive file=fat:rw:hda-contents,index=0,media=disk,format=raw \ |