Skip to content

Commit

Permalink
Use optee-enabled ACRN binary for optee-enabled build
Browse files Browse the repository at this point in the history
Tracked-On: OAM-113418
Signed-off-by: Jiaqing Zhao <[email protected]>
  • Loading branch information
jiaqingz-intel committed Nov 16, 2023
1 parent cb62790 commit a680acf
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions core/definitions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ IASL := $(INTEL_PATH_BUILD)/acpi-tools/linux64/bin/iasl
KF4SBL_SYMBOLS_ZIP := $(PRODUCT_OUT)/kf4sbl_symbols.zip
FB4SBL_SYMBOLS_ZIP := $(PRODUCT_OUT)/fb4sbl_symbols.zip

ifeq ($(TARGET_BUILD_VARIANT),user)
ifeq ($(TARGET_USE_OPTEE),true)
ACRN_BIN := $(TOP)/vendor/intel/acrn/sample_a/acrn.32.out.tee.release
else
ACRN_BIN := $(TOP)/vendor/intel/acrn/sample_a/acrn.32.out.release
endif
else
ifeq ($(TARGET_USE_OPTEE),true)
ACRN_BIN := $(TOP)/vendor/intel/acrn/sample_a/acrn.32.out.tee
else
ACRN_BIN := $(TOP)/vendor/intel/acrn/sample_a/acrn.32.out
endif
endif

ifeq ($(TARGET_BUILD_VARIANT),user)
OPTEE_BIN := $(TOP)/vendor/intel/optee/optee_release_binaries/release/tee.elf
else
OPTEE_BIN := $(TOP)/vendor/intel/optee/optee_release_binaries/debug/tee.elf
endif

# Extra host tools we need built to use our *_from_target_files
# or sign_target_files_* scripts
INTEL_OTATOOLS := \
Expand Down Expand Up @@ -177,12 +197,12 @@ if [ $(findstring kf4sbl,$(PRIVATE_MODULE) ) ]; then \
rm -rf $(SBL_DIR)/acrn.32.out; \
echo -ne "serail_baseaddr=0x3f8 serail_type=1 serail_regwidth=1\0" > $(SBL_DIR)/cmdline-acrn; \
echo -ne "kernelflinger\0" > $(SBL_DIR)/cmdline-kf; \
cp $(TOP)/vendor/intel/acrn/sample_a/acrn.32.out $(SBL_DIR)/acrn.32.out; \
cp $(ACRN_BIN) $(SBL_DIR)/acrn.32.out; \
if [ $(findstring optee,$(TEE) ) ]; then \
rm -rf $(SBL_DIR)/cmdline-tee; \
rm -rf $(SBL_DIR)/tee.elf; \
echo -ne "tee_elf\0" > $(SBL_DIR)/cmdline-tee; \
cp $(TOP)/vendor/intel/optee/optee_release_binaries/release/tee.elf $(SBL_DIR)/tee.elf; \
cp $(OPTEE_BIN) $(SBL_DIR)/tee.elf; \
python3 $(INTEL_PATH_BUILD)/containertool/GenContainer.py create -t MULTIBOOT \
-cl CMD1:$(SBL_DIR)/cmdline-acrn ELF1:$(SBL_DIR)/acrn.32.out CMD2:$(SBL_DIR)/cmdline-kf ELF2:$@ \
CMD3:$(SBL_DIR)/cmdline-tee ELF3:$(SBL_DIR)/tee.elf \
Expand Down

0 comments on commit a680acf

Please sign in to comment.