arm-trusted-firmware/plat/mediatek/build_helpers/mtk_build_helpers_epilogue.mk
Chris Kay a6ff0067ab build: permit multiple linker scripts
This change allows platforms to provide more than one linker script to
any image utilizing the `MAKE_BL` build system macro.

This is already done by some MediaTek platforms via the
`EXTRA_LINKERFILE` build system variable, which has now been removed.

In its place, additional linker scripts may be added to the
`<IMAGE>_LINKER_SCRIPT_SOURCES` variable.

BREAKING-CHANGE: The `EXTRA_LINKERFILE` build system variable has been
 replaced with the `<IMAGE>_LINKER_SCRIPT_SOURCES` variable. See the
 commit message for more information.

Change-Id: I3f0b69200d6a4841fd158cd09344ce9e67047271
Signed-off-by: Chris Kay <chris.kay@arm.com>
2023-02-10 17:01:47 +00:00

15 lines
442 B
Makefile

#
# Copyright (c) 2022, MediaTek Inc. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Expand include modules
$(eval $(call INCLUDE_MODULES,$(MODULES-y)))
# Make next section align to page size
ifneq ($(MTK_EXTRA_LINKERFILE),)
# mtk_align.ld MUST BE THE LAST LINKER SCRIPT!
BL31_LINKER_SCRIPT_SOURCES += $(MTK_LINKERFILE_SOURCE)
BL31_LINKER_SCRIPT_SOURCES += ${MTK_PLAT}/include/mtk_align.ld
endif