1# 2# Copyright (c) 2013-2025, Arm Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7BL2_SOURCES += bl2/bl2_image_load_v2.c \ 8 bl2/bl2_main.c \ 9 bl2/${ARCH}/bl2_arch_setup.c \ 10 plat/common/${ARCH}/platform_up_stack.S \ 11 ${MBEDTLS_SOURCES} 12 13ifeq (${ARCH},aarch64) 14BL2_SOURCES += common/aarch64/early_exceptions.S 15endif 16 17ifeq (${ENABLE_RME},1) 18include lib/gpt_rme/gpt_rme.mk 19 20BL2_SOURCES += ${GPT_LIB_SRCS} 21endif 22 23ifeq (${BL2_RUNS_AT_EL3},1) 24BL2_SOURCES += bl2/${ARCH}/bl2_el3_entrypoint.S \ 25 bl2/${ARCH}/bl2_el3_exceptions.S \ 26 bl2/${ARCH}/bl2_run_next_image.S 27 28BL2_DEFAULT_LINKER_SCRIPT_SOURCE := bl2/bl2_el3.ld.S 29else 30# Normal operation, no RME, no BL2 at EL3 31BL2_SOURCES += bl2/${ARCH}/bl2_entrypoint.S 32BL2_DEFAULT_LINKER_SCRIPT_SOURCE := bl2/bl2.ld.S 33endif 34 35ifeq (${RESET_TO_BL2},1) 36# BL2 at EL3, no RME 37BL2_SOURCES += lib/cpus/${ARCH}/cpu_helpers.S 38endif 39 40ifeq (${ENABLE_PMF},1) 41BL2_SOURCES += lib/pmf/pmf_main.c 42endif 43 44# CRYPTO_SUPPORT 45NEED_AUTH := $(if $(filter 1,$(TRUSTED_BOARD_BOOT)),1,) 46NEED_HASH := $(if $(filter 1,$(MEASURED_BOOT) $(DRTM_SUPPORT)),1,) 47$(eval $(call set_crypto_support,NEED_AUTH,NEED_HASH)) 48 49# BL2_CPPFLAGS 50$(eval BL2_CPPFLAGS += $(call make_defines, \ 51 $(sort \ 52 CRYPTO_SUPPORT \ 53))) 54 55# Numeric_Flags 56$(eval $(call assert_numerics,\ 57 $(sort \ 58 CRYPTO_SUPPORT \ 59))) 60