summaryrefslogblamecommitdiffstats
path: root/test_code/Makefile2
blob: 5f0a260d1b46e673f57a8758f8243b4d25bb6917 (plain) (tree)



























                                                                         
#!/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