blob: a8a0061638748f38896f2be7d1a065e1b4093100 [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001#
Chris Kay523e8642023-12-04 12:03:51 +00002# Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
Achin Gupta4f6ad662013-10-25 09:08:21 +01003#
dp-armfa3cf0b2017-05-03 09:38:09 +01004# SPDX-License-Identifier: BSD-3-Clause
Achin Gupta4f6ad662013-10-25 09:08:21 +01005#
6
Gary Morrison3d7f6542021-01-27 13:08:47 -06007BL1_SOURCES += bl1/${ARCH}/bl1_arch_setup.c \
Yatharth Kochar5d361212016-06-28 17:07:09 +01008 bl1/${ARCH}/bl1_context_mgmt.c \
9 bl1/${ARCH}/bl1_entrypoint.S \
10 bl1/${ARCH}/bl1_exceptions.S \
Manish Pandeye2a6b352021-10-04 13:38:56 +010011 bl1/bl1_main.c \
12 lib/cpus/${ARCH}/cpu_helpers.S \
Jeenu Viswambharand5ec3672017-01-03 11:01:51 +000013 lib/cpus/errata_report.c \
Yatharth Kochar5d361212016-06-28 17:07:09 +010014 lib/el3_runtime/${ARCH}/context_mgmt.c \
Chris Kayff5ccf12024-02-06 14:33:12 +000015 lib/locks/exclusive/${ARCH}/spinlock.S \
dp-arm230011c2017-03-07 11:02:47 +000016 plat/common/plat_bl1_common.c \
Roberto Vargas9f412482018-01-16 10:35:23 +000017 plat/common/${ARCH}/platform_up_stack.S \
Roberto Vargas502290b2018-05-08 10:27:10 +010018 ${MBEDTLS_SOURCES}
Yatharth Kochar5d361212016-06-28 17:07:09 +010019
20ifeq (${ARCH},aarch64)
John Tsichritzis4daa1de2018-07-23 09:11:59 +010021BL1_SOURCES += lib/cpus/aarch64/dsu_helpers.S \
Sona Mathewef1b5d82024-07-10 18:04:40 -050022 lib/el3_runtime/aarch64/context.S \
23 lib/cpus/errata_common.c
Yatharth Kochar5d361212016-06-28 17:07:09 +010024endif
25
Yatharth Kochar71c9a5e2015-10-10 19:06:53 +010026ifeq (${TRUSTED_BOARD_BOOT},1)
27BL1_SOURCES += bl1/bl1_fwu.c
28endif
Ryan Harkin25cff832014-01-13 12:37:03 +000029
thagon01-arm6805e8d2023-07-12 10:43:58 -050030ifeq (${ENABLE_PMF},1)
31BL1_SOURCES += lib/pmf/pmf_main.c
32endif
33
Chris Kaycfba6452023-12-04 09:55:50 +000034ifeq ($($(ARCH)-ld-id),gnu-gcc)
Chris Kay2b680902023-01-06 11:02:00 +000035 BL1_LDFLAGS += -Wl,--sort-section=alignment
Chris Kaycfba6452023-12-04 09:55:50 +000036else ifneq ($(filter llvm-lld gnu-ld,$($(ARCH)-ld-id)),)
Chris Kay2b680902023-01-06 11:02:00 +000037 BL1_LDFLAGS += --sort-section=alignment
38endif
39
Chris Kay68d28362023-01-16 16:53:45 +000040BL1_DEFAULT_LINKER_SCRIPT_SOURCE := bl1/bl1.ld.S