Skip to content

Commit

Permalink
qemu: support new path to QEMU v9.2.0
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
  • Loading branch information
jforissier committed Dec 17, 2024
1 parent 0264ae3 commit 3295735
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions qemu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)/
Expand All @@ -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
Expand 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) || \
Expand Down

0 comments on commit 3295735

Please sign in to comment.