summaryrefslogblamecommitdiffstats
path: root/test_code/Makefile
blob: 0246bd3a08bff4649064d6b8740a612d08714f28 (plain) (tree)
1
2
3
4
5
6
7
8
9







                      
                           



                                                                         
                     



                         



                            

                                                          




                                  
#!/usr/bin/env make

SHELL=/bin/bash

LOG=debug.log
OVMFCODE=OVMF_CODE.fd
OVMFVARS=OVMF_VARS.fd
QEMU=kvm -bios OVMF.fd
#QEMU=kvm -pflash ./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 \
	  -net none \
	  -cpu host \
	  -serial stdio \
	  -nographic \
       	  -nodefaults

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