feat: optional boot with kvm or efi

This commit is contained in:
Lance Vick 2025-02-10 16:31:14 -08:00
parent aa5b04e8a0
commit 110f64cf54
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,8 @@ GIT_REF := $(shell git log -1 --format=%H)
GIT_AUTHOR := $(shell git log -1 --format=%an) GIT_AUTHOR := $(shell git log -1 --format=%an)
GIT_PUBKEY := $(shell git log -1 --format=%GK) GIT_PUBKEY := $(shell git log -1 --format=%GK)
GIT_TIMESTAMP := $(shell git log -1 --format=%cd --date=iso) GIT_TIMESTAMP := $(shell git log -1 --format=%cd --date=iso)
EFI := false
,:=,
export export
## Use env vars from latest release when reproducing ## 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 \ -device sd-card,drive=external \
-drive id=external,if=none,format=raw,file=out/sdcard.img \ -drive id=external,if=none,format=raw,file=out/sdcard.img \
-device usb-storage,drive=usbdrive \ -device usb-storage,drive=usbdrive \
-drive id=usbdrive,if=none,format=raw,file=out/airgap.iso \ $(if $(filter $(EFI),true) ,\
-boot order=c \ -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; \ -nographic; \
" "