mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 20:17:46 +08:00
mk/qemu: improved Nix(OS) UEFI path search
The /run/libvirt/nix-ovmf/* paths cannot be relied upon to exist. As far as I can tell, this is only available on NixOS with libvirtd enabled. On the other hand, on any Nix platform, UEFI firmware binaries can be found relative to the the qemu binary (including when using nix shell).
This commit is contained in:
parent
996da092dd
commit
b668e904bc
@ -5,6 +5,8 @@ QEMUFLAGS?=-d guest_errors -name "Redox OS $(ARCH)"
|
||||
netboot?=no
|
||||
redoxer?=no
|
||||
VGA_SUPPORTED=no
|
||||
QEMU_PATH?=$(shell command -v $(QEMU))
|
||||
QEMU_BASE_DIR?=$(shell if [ $(QEMU_PATH) ]; then realpath $$(dirname $(QEMU_PATH))/..; fi)
|
||||
|
||||
ifeq ($(ARCH),i586)
|
||||
audio?=ac97
|
||||
@ -40,6 +42,7 @@ else ifeq ($(ARCH),x86_64)
|
||||
PFLASH0=$(firstword \
|
||||
$(wildcard /usr/share/qemu/edk2-x86_64-code.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-x86_64-code.fd) \
|
||||
$(wildcard $(QEMU_BASE_DIR)/share/qemu/edk2-x86_64-code.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2s-x86_64-code.fd) \
|
||||
)
|
||||
endif
|
||||
@ -79,6 +82,7 @@ else ifeq ($(ARCH),aarch64)
|
||||
PFLASH0=$(firstword \
|
||||
$(wildcard /usr/share/qemu/edk2-aarch64-code.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-aarch64-code.fd) \
|
||||
$(wildcard $(QEMU_BASE_DIR)/share/qemu/edk2-aarch64-code.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-aarch64-code.fd) \
|
||||
)
|
||||
endif
|
||||
@ -113,6 +117,7 @@ else ifeq ($(ARCH),riscv64gc)
|
||||
$(wildcard /usr/share/edk2/riscv/RISCV_VIRT_CODE.fd) \
|
||||
$(wildcard /usr/share/qemu/edk2-riscv-code.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-riscv-code.fd) \
|
||||
$(wildcard $(QEMU_BASE_DIR)/share/qemu/edk2-riscv-code.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-code.fd) \
|
||||
)
|
||||
PFLASH1=$(firstword \
|
||||
@ -120,6 +125,7 @@ else ifeq ($(ARCH),riscv64gc)
|
||||
$(wildcard /usr/share/edk2/riscv/RISCV_VIRT_VARS.fd) \
|
||||
$(wildcard /usr/share/qemu/edk2-riscv-vars.fd) \
|
||||
$(wildcard /run/libvirt/nix-ovmf/edk2-riscv-vars.fd) \
|
||||
$(wildcard $(QEMU_BASE_DIR)/share/qemu/edk2-riscv-vars.fd) \
|
||||
$(wildcard /opt/homebrew/opt/qemu/share/qemu/edk2-riscv-vars.fd) \
|
||||
)
|
||||
ifneq ($(usb),no)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user