From 59077e298f9b3ccb280e894480c86239e527196f Mon Sep 17 00:00:00 2001 From: mintsuki Date: Wed, 21 Aug 2024 02:22:35 +0200 Subject: [PATCH] build/run-uefi: Use Limine's nightly EDK2 OVMF builds --- GNUmakefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 0794a6a3d..16d7e1de0 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -38,13 +38,22 @@ run-kvm: vinix.iso run-hvf: vinix.iso qemu-system-x86_64 -accel hvf -cpu host $(QEMUFLAGS) -ovmf: +ovmf/ovmf-code-x86_64.fd: mkdir -p ovmf - cd ovmf && curl -o OVMF.fd https://retrage.github.io/edk2-nightly/bin/RELEASEX64_OVMF.fd + curl -Lo $@ https://github.com/limine-bootloader/edk2-ovmf-nightly/releases/latest/download/ovmf-code-x86_64.fd + +ovmf/ovmf-vars-x86_64.fd: + mkdir -p ovmf + curl -Lo $@ https://github.com/limine-bootloader/edk2-ovmf-nightly/releases/latest/download/ovmf-vars-x86_64.fd .PHONY: run-uefi -run-uefi: vinix.iso ovmf - qemu-system-x86_64 -enable-kvm -cpu host $(QEMUFLAGS) -bios ovmf/OVMF.fd +run-uefi: vinix.iso ovmf/ovmf-code-x86_64.fd ovmf/ovmf-vars-x86_64.fd + qemu-system-x86_64 \ + -enable-kvm \ + -cpu host \ + -drive if=pflash,unit=0,format=raw,file=ovmf/ovmf-code-x86_64.fd,readonly=on \ + -drive if=pflash,unit=1,format=raw,file=ovmf/ovmf-vars-x86_64.fd \ + $(QEMUFLAGS) .PHONY: run-bochs run-bochs: vinix.iso