Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the EDK2 toolchain and QEMU invoking commands #464

Merged
merged 2 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions qemu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TF_A_PATH ?= $(ROOT)/trusted-firmware-a
BINARIES_PATH ?= $(ROOT)/out/bin
U-BOOT_PATH ?= $(ROOT)/u-boot
QEMU_PATH ?= $(ROOT)/qemu
QEMU_BUILD ?= $(QEMU_PATH)/build
SOC_TERM_PATH ?= $(ROOT)/soc_term

DEBUG = 1
Expand Down Expand Up @@ -81,11 +82,11 @@ arm-tf-clean:
################################################################################
# QEMU
################################################################################
$(QEMU_PATH)/config-host.mak:
$(QEMU_BUILD)/config-host.mak:
cd $(QEMU_PATH); ./configure --target-list=arm-softmmu\
$(QEMU_CONFIGURE_PARAMS_COMMON)

qemu: $(QEMU_PATH)/config-host.mak
qemu: $(QEMU_BUILD)/config-host.mak
$(MAKE) -C $(QEMU_PATH)

qemu-clean:
Expand Down Expand Up @@ -173,7 +174,7 @@ run-only:
$(call launch-terminal,54320,"Normal World")
$(call launch-terminal,54321,"Secure World")
$(call wait-for-ports,54320,54321)
cd $(BINARIES_PATH) && $(QEMU_PATH)/arm-softmmu/qemu-system-arm \
cd $(BINARIES_PATH) && $(QEMU_BUILD)/arm-softmmu/qemu-system-arm \
-nographic \
-serial tcp:localhost:54320 -serial tcp:localhost:54321 \
-smp $(QEMU_SMP) \
Expand All @@ -195,7 +196,7 @@ endif
check: $(CHECK_DEPS)
ln -sf $(ROOT)/out-br/images/rootfs.cpio.gz $(BINARIES_PATH)/
cd $(BINARIES_PATH) && \
export QEMU=$(ROOT)/qemu/arm-softmmu/qemu-system-arm && \
export QEMU=$(QEMU_BUILD)/arm-softmmu/qemu-system-arm && \
export QEMU_SMP=$(QEMU_SMP) && \
expect $(ROOT)/build/qemu-check.exp -- $(check-args) || \
(if [ "$(DUMP_LOGS_ON_ERROR)" ]; then \
Expand Down
11 changes: 6 additions & 5 deletions qemu_v8.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DEBUG ?= 1
TF_A_PATH ?= $(ROOT)/trusted-firmware-a
BINARIES_PATH ?= $(ROOT)/out/bin
EDK2_PATH ?= $(ROOT)/edk2
EDK2_TOOLCHAIN ?= GCC49
EDK2_TOOLCHAIN ?= GCC5
EDK2_ARCH ?= AARCH64
ifeq ($(DEBUG),1)
EDK2_BUILD ?= DEBUG
Expand All @@ -38,6 +38,7 @@ EDK2_BUILD ?= RELEASE
endif
EDK2_BIN ?= $(EDK2_PATH)/Build/ArmVirtQemuKernel-$(EDK2_ARCH)/$(EDK2_BUILD)_$(EDK2_TOOLCHAIN)/FV/QEMU_EFI.fd
QEMU_PATH ?= $(ROOT)/qemu
QEMU_BUILD ?= $(QEMU_PATH)/build
SOC_TERM_PATH ?= $(ROOT)/soc_term

################################################################################
Expand Down Expand Up @@ -110,11 +111,11 @@ arm-tf-clean:
################################################################################
# QEMU
################################################################################
$(QEMU_PATH)/config-host.mak:
$(QEMU_BUILD)/config-host.mak:
cd $(QEMU_PATH); ./configure --target-list=aarch64-softmmu\
$(QEMU_CONFIGURE_PARAMS_COMMON)

qemu: $(QEMU_PATH)/config-host.mak
qemu: $(QEMU_BUILD)/config-host.mak
$(MAKE) -C $(QEMU_PATH)

qemu-clean:
Expand Down Expand Up @@ -199,7 +200,7 @@ run-only:
$(call launch-terminal,54320,"Normal World")
$(call launch-terminal,54321,"Secure World")
$(call wait-for-ports,54320,54321)
cd $(BINARIES_PATH) && $(QEMU_PATH)/aarch64-softmmu/qemu-system-aarch64 \
cd $(BINARIES_PATH) && $(QEMU_BUILD)/aarch64-softmmu/qemu-system-aarch64 \
-nographic \
-serial tcp:localhost:54320 -serial tcp:localhost:54321 \
-smp $(QEMU_SMP) \
Expand All @@ -223,7 +224,7 @@ endif
check: $(CHECK_DEPS)
ln -sf $(ROOT)/out-br/images/rootfs.cpio.gz $(BINARIES_PATH)/
cd $(BINARIES_PATH) && \
export QEMU=$(QEMU_PATH)/aarch64-softmmu/qemu-system-aarch64 && \
export QEMU=$(QEMU_BUILD)/aarch64-softmmu/qemu-system-aarch64 && \
export QEMU_SMP=$(QEMU_SMP) && \
expect $(ROOT)/build/qemu-check.exp -- $(check-args) || \
(if [ "$(DUMP_LOGS_ON_ERROR)" ]; then \
Expand Down