summaryrefslogtreecommitdiffstats
path: root/test_code/Makefile
blob: 2ca2bc36defe8f5dae573801aee0de431af09d28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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