diff --git a/Makefile b/Makefile index 608df40..bfc0f29 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ GIT_REF := $(shell git log -1 --format=%H) GIT_AUTHOR := $(shell git log -1 --format=%an) GIT_PUBKEY := $(shell git log -1 --format=%GK) GIT_TIMESTAMP := $(shell git log -1 --format=%cd --date=iso) +EFI := false +,:=, export ## Use env vars from latest release when reproducing @@ -68,8 +70,14 @@ vm: out/dev-shell.digest out/airgap.iso out/sdcard.img -device sd-card,drive=external \ -drive id=external,if=none,format=raw,file=out/sdcard.img \ -device usb-storage,drive=usbdrive \ - -drive id=usbdrive,if=none,format=raw,file=out/airgap.iso \ - -boot order=c \ + $(if $(filter $(EFI),true) ,\ + -bios /usr/share/ovmf/OVMF.fd \ + -drive id=boot$(,)if=virtio$(,)format=raw$(,)file=out/airgap.iso \ + ,\ + -drive id=usbdrive,if=none,format=raw,file=out/airgap.iso \ + -boot order=c \ + ) \ + $(if (,$(wildcard /dev/kvm)),,-cpu host --accel kvm) \ -nographic; \ "