Skip to content

Commit e72be95

Browse files
author
Gulshan Singh
committed
Use correct kernel image with Trusty
1 parent fb7ded9 commit e72be95

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
@@ -401,6 +401,7 @@ TRUSTY_SRC ?= $(ROOT_DIR)/trusty
401401
TRUSTY_TARGET ?= qemu-generic-arm64-test-debug
402402
TRUSTY_BUILD_ROOT ?= $(OUT_DIR)/trusty
403403
TRUSTY_OUT := $(TRUSTY_BUILD_ROOT)/build-$(TRUSTY_TARGET)
404+
TRUSTY_KERNEL_IMAGE := $(TRUSTY_OUT)/linux-build/arch/arm64/boot/Image
404405

405406
QEMU_BRANCH := stable-7.2
406407

@@ -446,7 +447,7 @@ trusty-qemu-init:
446447
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
447448

448449
.PHONY: trusty
449-
trusty $(ATF_BL1): | $(TRUSTY_SRC)
450+
trusty $(ATF_BL1) $(TRUSTY_KERNEL_IMAGE): | $(TRUSTY_SRC)
450451
$(BEAR_CMD) $(TRUSTY_SRC)/trusty/vendor/google/aosp/scripts/build.py \
451452
--build-root $(TRUSTY_BUILD_ROOT) \
452453
--skip-tests $(TRUSTY_TARGET)
@@ -461,6 +462,11 @@ trusty-bl33 $(ATF_BL33): $(UBOOT_BIN)
461462
trusty_clean:
462463
rm -rf $(TRUSTY_OUT)
463464

465+
# When Trusty is enabled, use the kernel image built by Trusty
466+
ifeq ($(TRUSTY),1)
467+
KERNEL_IMAGE := $(TRUSTY_KERNEL_IMAGE)
468+
endif
469+
464470
##
465471
## Android
466472
##
@@ -602,11 +608,6 @@ endif
602608

603609
QEMU_ARGS += -append "$(QEMU_KERNEL_CMDLINE) $(QEMU_EXTRA_KERNEL_CMDLINE)"
604610

605-
# Force using the Trusty kernel image for now, there are boot errors with other images
606-
ifeq ($(TRUSTY),1)
607-
QEMU_KERNEL_IMAGE := $(TRUSTY_OUT)/linux-build/arch/arm64/boot/Image
608-
endif
609-
610611
RUN_DEPS := $(QEMU_KERNEL_IMAGE)
611612
RUN_DIR := $(ROOT_DIR)
612613

0 commit comments

Comments
 (0)