Skip to content

Commit b9ba020

Browse files
Gulshan Singhgsingh93
authored andcommitted
Use correct kernel image with Trusty
1 parent 52587d3 commit b9ba020

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ TRUSTY_SRC ?= $(ROOT_DIR)/trusty
405405
TRUSTY_TARGET ?= qemu-generic-arm64-test-debug
406406
TRUSTY_BUILD_ROOT ?= $(OUT_DIR)/trusty
407407
TRUSTY_OUT := $(TRUSTY_BUILD_ROOT)/build-$(TRUSTY_TARGET)
408+
TRUSTY_KERNEL_IMAGE := $(TRUSTY_OUT)/linux-build/arch/arm64/boot/Image
408409

409410
QEMU_BRANCH := stable-7.2
410411

@@ -450,7 +451,7 @@ trusty-qemu-init:
450451
sed -i 's|include project/qemu-qemu-inc.mk|include $(CONFIG_DIR)/trusty/qemu-qemu-inc.mk|g' $(TRUSTY_SRC)/trusty/device/arm/generic-arm64/project/qemu-inc.mk
451452

452453
.PHONY: trusty
453-
trusty $(ATF_BL1): | $(TRUSTY_SRC)
454+
trusty $(ATF_BL1) $(TRUSTY_KERNEL_IMAGE): | $(TRUSTY_SRC)
454455
$(BEAR_CMD) $(TRUSTY_SRC)/trusty/vendor/google/aosp/scripts/build.py \
455456
--build-root $(TRUSTY_BUILD_ROOT) \
456457
--skip-tests $(TRUSTY_TARGET)
@@ -465,6 +466,11 @@ trusty-bl33 $(ATF_BL33): $(UBOOT_BIN)
465466
trusty_clean:
466467
rm -rf $(TRUSTY_OUT)
467468

469+
# When Trusty is enabled, use the kernel image built by Trusty
470+
ifeq ($(TRUSTY),1)
471+
KERNEL_IMAGE := $(TRUSTY_KERNEL_IMAGE)
472+
endif
473+
468474
##
469475
## Android
470476
##
@@ -623,11 +629,6 @@ endif
623629

624630
QEMU_ARGS += -append "$(QEMU_KERNEL_CMDLINE) $(QEMU_EXTRA_KERNEL_CMDLINE)"
625631

626-
# Force using the Trusty kernel image for now, there are boot errors with other images
627-
ifeq ($(TRUSTY),1)
628-
QEMU_KERNEL_IMAGE := $(TRUSTY_OUT)/linux-build/arch/arm64/boot/Image
629-
endif
630-
631632
RUN_DEPS := $(QEMU_KERNEL_IMAGE)
632633
RUN_DIR := $(ROOT_DIR)
633634

0 commit comments

Comments
 (0)