summaryrefslogtreecommitdiffstats
path: root/test_code/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test_code/Makefile')
-rw-r--r--test_code/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/test_code/Makefile b/test_code/Makefile
new file mode 100644
index 0000000..2ca2bc3
--- /dev/null
+++ b/test_code/Makefile
@@ -0,0 +1,26 @@
+#!/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)
+
+debug:
+ $(QEMU) $(QEMUFLAGS) -s -S
+
+.PHONY: run debug
+