From 329573518db6a601e5c202a66a2ae44f6e983cda Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Tue, 17 Dec 2024 15:08:03 +0100 Subject: [PATCH] qemu: support new path to QEMU v9.2.0 Add support for the new build path used for QEMU v9.2.0. The makefile will search first the new location and then the old location to maintain backward compatibility. Signed-off-by: Jerome Forissier Acked-by: Etienne Carriere --- qemu.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu.mk b/qemu.mk index ec2caea3..aaf420f8 100644 --- a/qemu.mk +++ b/qemu.mk @@ -170,6 +170,10 @@ QEMU_RUN_ARGS = $(QEMU_BASE_ARGS) QEMU_RUN_ARGS += $(QEMU_RUN_ARGS_COMMON) QEMU_RUN_ARGS += -s -S -serial tcp:127.0.0.1:$(QEMU_NW_PORT) -serial tcp:127.0.0.1:$(QEMU_SW_PORT) +# The aarch64-softmmu part of the path to qemu-system-aarch64 was removed +# somewhere between 8.1.2 and 9.1.2 +QEMU_BIN = $(or $(wildcard $(QEMU_BUILD)/qemu-system-aarch64),$(wildcard $(QEMU_BUILD)/aarch64-softmmu/qemu-system-aarch64),qemu-system-aarch64-not-found) + .PHONY: run-only run-only: ln -sf $(ROOT)/out-br/images/rootfs.cpio.gz $(BINARIES_PATH)/ @@ -178,8 +182,7 @@ run-only: $(call launch-terminal,$(QEMU_NW_PORT),"Normal World") $(call launch-terminal,$(QEMU_SW_PORT),"Secure World") $(call wait-for-ports,$(QEMU_NW_PORT),$(QEMU_SW_PORT)) - cd $(BINARIES_PATH) && $(QEMU_BUILD)/arm-softmmu/qemu-system-arm \ - $(QEMU_RUN_ARGS) + cd $(BINARIES_PATH) && $(QEMU_BIN) $(QEMU_RUN_ARGS) ifneq ($(filter check,$(MAKECMDGOALS)),) CHECK_DEPS := all @@ -203,7 +206,7 @@ QEMU_CHECK_ARGS += -serial stdio -serial file:serial1.log check: $(CHECK_DEPS) ln -sf $(ROOT)/out-br/images/rootfs.cpio.gz $(BINARIES_PATH)/ cd $(BINARIES_PATH) && \ - export QEMU=$(QEMU_BUILD)/arm-softmmu/qemu-system-arm && \ + export QEMU=$(QEMU_BIN) && \ export QEMU_CHECK_ARGS="$(QEMU_CHECK_ARGS)" && \ export XEN_BOOT=n && \ expect $(ROOT)/build/qemu-check.exp -- $(check-args) || \