From 110f64cf546c0484b293a49ddf3ce7bea25304b7 Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Mon, 10 Feb 2025 16:31:14 -0800 Subject: [PATCH] feat: optional boot with kvm or efi --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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; \ "