mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-08 05:43:53 +00:00
build(fdt-wrappers): introduce FDT wrappers makefile
This has been introduced to simplify dependencies on the FDT wrappers. We generally want to avoid pulling in components on a file-by-file basis, particularly as we are trying to draw conceptual boxes around components in preparation for transitioning the build system to CMake, where dependencies are modelled on libraries rather than files. Signed-off-by: Chris Kay <chris.kay@arm.com> Change-Id: Idb7ee05a9b54a8caa3e07f36e608867e20b6dcd5
This commit is contained in:
parent
eb1acfb60c
commit
1fa05dab07
12 changed files with 60 additions and 24 deletions
7
common/fdt_wrappers.mk
Normal file
7
common/fdt_wrappers.mk
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2021, Arm Limited. All rights reserved.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
FDT_WRAPPERS_SOURCES := common/fdt_wrappers.c
|
|
@ -1,18 +1,20 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
|
# Copyright (c) 2019-2021, Arm Limited. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
# Firmware Configuration Framework sources
|
# Firmware Configuration Framework sources
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
include lib/fconf/fconf.mk
|
include lib/fconf/fconf.mk
|
||||||
|
|
||||||
# Add `libfdt` and Arm common helpers required for Dynamic Config
|
# Add `libfdt` and Arm common helpers required for Dynamic Config
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
|
DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
|
||||||
plat/arm/common/arm_dyn_cfg_helpers.c \
|
plat/arm/common/arm_dyn_cfg_helpers.c
|
||||||
common/fdt_wrappers.c
|
|
||||||
|
DYN_CFG_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
# Include GICv2 driver files
|
# Include GICv2 driver files
|
||||||
include drivers/arm/gic/v2/gicv2.mk
|
include drivers/arm/gic/v2/gicv2.mk
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
RESET_TO_BL31 := 1
|
RESET_TO_BL31 := 1
|
||||||
|
@ -104,8 +105,7 @@ PLAT_INCLUDES := -Iplat/arm/board/arm_fpga/include
|
||||||
|
|
||||||
PLAT_BL_COMMON_SOURCES := plat/arm/board/arm_fpga/${ARCH}/fpga_helpers.S
|
PLAT_BL_COMMON_SOURCES := plat/arm/board/arm_fpga/${ARCH}/fpga_helpers.S
|
||||||
|
|
||||||
BL31_SOURCES += common/fdt_wrappers.c \
|
BL31_SOURCES += common/fdt_fixup.c \
|
||||||
common/fdt_fixup.c \
|
|
||||||
drivers/delay_timer/delay_timer.c \
|
drivers/delay_timer/delay_timer.c \
|
||||||
drivers/delay_timer/generic_delay_timer.c \
|
drivers/delay_timer/generic_delay_timer.c \
|
||||||
drivers/arm/pl011/${ARCH}/pl011_console.S \
|
drivers/arm/pl011/${ARCH}/pl011_console.S \
|
||||||
|
@ -117,6 +117,8 @@ BL31_SOURCES += common/fdt_wrappers.c \
|
||||||
${FPGA_CPU_LIBS} \
|
${FPGA_CPU_LIBS} \
|
||||||
${FPGA_GIC_SOURCES}
|
${FPGA_GIC_SOURCES}
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
$(eval $(call MAKE_S,$(BUILD_PLAT),plat/arm/board/arm_fpga/rom_trampoline.S,bl31))
|
$(eval $(call MAKE_S,$(BUILD_PLAT),plat/arm/board/arm_fpga/rom_trampoline.S,bl31))
|
||||||
$(eval $(call MAKE_S,$(BUILD_PLAT),plat/arm/board/arm_fpga/kernel_trampoline.S,bl31))
|
$(eval $(call MAKE_S,$(BUILD_PLAT),plat/arm/board/arm_fpga/kernel_trampoline.S,bl31))
|
||||||
$(eval $(call MAKE_LD,$(BUILD_PLAT)/build_axf.ld,plat/arm/board/arm_fpga/build_axf.ld.S,bl31))
|
$(eval $(call MAKE_LD,$(BUILD_PLAT)/build_axf.ld,plat/arm/board/arm_fpga/build_axf.ld.S,bl31))
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
# Use the GICv3 driver on the FVP by default
|
# Use the GICv3 driver on the FVP by default
|
||||||
FVP_USE_GIC_DRIVER := FVP_GICV3
|
FVP_USE_GIC_DRIVER := FVP_GICV3
|
||||||
|
|
||||||
|
@ -228,11 +230,12 @@ BL31_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
|
||||||
# Support for fconf in BL31
|
# Support for fconf in BL31
|
||||||
# Added separately from the above list for better readability
|
# Added separately from the above list for better readability
|
||||||
ifeq ($(filter 1,${BL2_AT_EL3} ${RESET_TO_BL31}),)
|
ifeq ($(filter 1,${BL2_AT_EL3} ${RESET_TO_BL31}),)
|
||||||
BL31_SOURCES += common/fdt_wrappers.c \
|
BL31_SOURCES += lib/fconf/fconf.c \
|
||||||
lib/fconf/fconf.c \
|
|
||||||
lib/fconf/fconf_dyn_cfg_getter.c \
|
lib/fconf/fconf_dyn_cfg_getter.c \
|
||||||
plat/arm/board/fvp/fconf/fconf_hw_config_getter.c
|
plat/arm/board/fvp/fconf/fconf_hw_config_getter.c
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
ifeq (${SEC_INT_DESC_IN_FCONF},1)
|
ifeq (${SEC_INT_DESC_IN_FCONF},1)
|
||||||
BL31_SOURCES += plat/arm/common/fconf/fconf_sec_intr_config.c
|
BL31_SOURCES += plat/arm/common/fconf/fconf_sec_intr_config.c
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
|
# Copyright (c) 2016-2021, ARM Limited and Contributors. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
# SP_MIN source files specific to FVP platform
|
# SP_MIN source files specific to FVP platform
|
||||||
BL32_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
|
BL32_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
|
||||||
drivers/cfi/v2m/v2m_flash.c \
|
drivers/cfi/v2m/v2m_flash.c \
|
||||||
|
@ -22,10 +24,11 @@ BL32_SOURCES += drivers/arm/fvp/fvp_pwrc.c \
|
||||||
# Support for fconf in SP_MIN(BL32)
|
# Support for fconf in SP_MIN(BL32)
|
||||||
# Added separately from the above list for better readability
|
# Added separately from the above list for better readability
|
||||||
ifeq ($(filter 1,${BL2_AT_EL3} ${RESET_TO_SP_MIN}),)
|
ifeq ($(filter 1,${BL2_AT_EL3} ${RESET_TO_SP_MIN}),)
|
||||||
BL32_SOURCES += common/fdt_wrappers.c \
|
BL32_SOURCES += lib/fconf/fconf.c \
|
||||||
lib/fconf/fconf.c \
|
|
||||||
plat/arm/board/fvp/fconf/fconf_hw_config_getter.c
|
plat/arm/board/fvp/fconf/fconf_hw_config_getter.c
|
||||||
|
|
||||||
|
BL32_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
ifeq (${SEC_INT_DESC_IN_FCONF},1)
|
ifeq (${SEC_INT_DESC_IN_FCONF},1)
|
||||||
BL32_SOURCES += plat/arm/common/fconf/fconf_sec_intr_config.c
|
BL32_SOURCES += plat/arm/common/fconf/fconf_sec_intr_config.c
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
|
# Copyright (c) 2019-2021, Arm Limited. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
ifdef ARM_CORTEX_A5
|
ifdef ARM_CORTEX_A5
|
||||||
# Use the SP804 timer instead of the generic one
|
# Use the SP804 timer instead of the generic one
|
||||||
USE_SP804_TIMER := 1
|
USE_SP804_TIMER := 1
|
||||||
|
@ -129,6 +131,6 @@ include lib/fconf/fconf.mk
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
|
DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
|
||||||
plat/arm/common/arm_dyn_cfg_helpers.c \
|
plat/arm/common/arm_dyn_cfg_helpers.c
|
||||||
common/fdt_wrappers.c
|
|
||||||
|
|
||||||
|
DYN_CFG_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
# Include GICv2 driver files
|
# Include GICv2 driver files
|
||||||
include drivers/arm/gic/v2/gicv2.mk
|
include drivers/arm/gic/v2/gicv2.mk
|
||||||
|
|
||||||
|
@ -83,7 +85,6 @@ BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \
|
||||||
lib/cpus/aarch64/cortex_a57.S \
|
lib/cpus/aarch64/cortex_a57.S \
|
||||||
lib/cpus/aarch64/cortex_a72.S \
|
lib/cpus/aarch64/cortex_a72.S \
|
||||||
lib/utils/mem_region.c \
|
lib/utils/mem_region.c \
|
||||||
common/fdt_wrappers.c \
|
|
||||||
lib/fconf/fconf.c \
|
lib/fconf/fconf.c \
|
||||||
lib/fconf/fconf_dyn_cfg_getter.c \
|
lib/fconf/fconf_dyn_cfg_getter.c \
|
||||||
plat/arm/board/juno/juno_bl31_setup.c \
|
plat/arm/board/juno/juno_bl31_setup.c \
|
||||||
|
@ -94,6 +95,8 @@ BL31_SOURCES += drivers/cfi/v2m/v2m_flash.c \
|
||||||
${JUNO_INTERCONNECT_SOURCES} \
|
${JUNO_INTERCONNECT_SOURCES} \
|
||||||
${JUNO_SECURITY_SOURCES}
|
${JUNO_SECURITY_SOURCES}
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
|
ifeq (${CSS_USE_SCMI_SDS_DRIVER},1)
|
||||||
BL1_SOURCES += drivers/arm/css/sds/sds.c
|
BL1_SOURCES += drivers/arm/css/sds/sds.c
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
ifeq ($(filter ${TARGET_PLATFORM}, 0 1),)
|
ifeq ($(filter ${TARGET_PLATFORM}, 0 1),)
|
||||||
$(error TARGET_PLATFORM must be 0 or 1)
|
$(error TARGET_PLATFORM must be 0 or 1)
|
||||||
endif
|
endif
|
||||||
|
@ -91,13 +93,14 @@ BL31_SOURCES += ${INTERCONNECT_SOURCES} \
|
||||||
${ENT_GIC_SOURCES} \
|
${ENT_GIC_SOURCES} \
|
||||||
${TC_BASE}/tc_bl31_setup.c \
|
${TC_BASE}/tc_bl31_setup.c \
|
||||||
${TC_BASE}/tc_topology.c \
|
${TC_BASE}/tc_topology.c \
|
||||||
common/fdt_wrappers.c \
|
|
||||||
lib/fconf/fconf.c \
|
lib/fconf/fconf.c \
|
||||||
lib/fconf/fconf_dyn_cfg_getter.c \
|
lib/fconf/fconf_dyn_cfg_getter.c \
|
||||||
drivers/cfi/v2m/v2m_flash.c \
|
drivers/cfi/v2m/v2m_flash.c \
|
||||||
lib/utils/mem_region.c \
|
lib/utils/mem_region.c \
|
||||||
plat/arm/common/arm_nor_psci_mem_protect.c
|
plat/arm/common/arm_nor_psci_mem_protect.c
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
# Add the FDT_SOURCES and options for Dynamic Config
|
# Add the FDT_SOURCES and options for Dynamic Config
|
||||||
FDT_SOURCES += ${TC_BASE}/fdts/${PLAT}_fw_config.dts \
|
FDT_SOURCES += ${TC_BASE}/fdts/${PLAT}_fw_config.dts \
|
||||||
${TC_BASE}/fdts/${PLAT}_tb_fw_config.dts
|
${TC_BASE}/fdts/${PLAT}_tb_fw_config.dts
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
ifeq (${ARCH}, aarch64)
|
ifeq (${ARCH}, aarch64)
|
||||||
# On ARM standard platorms, the TSP can execute from Trusted SRAM, Trusted
|
# On ARM standard platorms, the TSP can execute from Trusted SRAM, Trusted
|
||||||
# DRAM (if available) or the TZC secured area of DRAM.
|
# DRAM (if available) or the TZC secured area of DRAM.
|
||||||
|
@ -261,9 +263,10 @@ include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
|
DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
|
||||||
plat/arm/common/arm_dyn_cfg_helpers.c \
|
plat/arm/common/arm_dyn_cfg_helpers.c \
|
||||||
common/fdt_wrappers.c \
|
|
||||||
common/uuid.c
|
common/uuid.c
|
||||||
|
|
||||||
|
DYN_CFG_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
BL1_SOURCES += ${DYN_CFG_SOURCES}
|
BL1_SOURCES += ${DYN_CFG_SOURCES}
|
||||||
BL2_SOURCES += ${DYN_CFG_SOURCES}
|
BL2_SOURCES += ${DYN_CFG_SOURCES}
|
||||||
|
|
||||||
|
@ -343,10 +346,10 @@ endif
|
||||||
|
|
||||||
ifeq (${SPD},spmd)
|
ifeq (${SPD},spmd)
|
||||||
BL31_SOURCES += plat/common/plat_spmd_manifest.c \
|
BL31_SOURCES += plat/common/plat_spmd_manifest.c \
|
||||||
common/fdt_wrappers.c \
|
|
||||||
common/uuid.c \
|
common/uuid.c \
|
||||||
${LIBFDT_SRCS}
|
${LIBFDT_SRCS}
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (${TRUSTED_BOARD_BOOT},0)
|
ifneq (${TRUSTED_BOARD_BOOT},0)
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
# Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
# platform configs
|
# platform configs
|
||||||
ENABLE_CONSOLE_SPE := 1
|
ENABLE_CONSOLE_SPE := 1
|
||||||
$(eval $(call add_define,ENABLE_CONSOLE_SPE))
|
$(eval $(call add_define,ENABLE_CONSOLE_SPE))
|
||||||
|
@ -74,10 +76,10 @@ endif
|
||||||
|
|
||||||
# SPM dispatcher
|
# SPM dispatcher
|
||||||
ifeq (${SPD},spmd)
|
ifeq (${SPD},spmd)
|
||||||
# include device tree helper library
|
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
# sources to support spmd
|
# sources to support spmd
|
||||||
BL31_SOURCES += plat/common/plat_spmd_manifest.c \
|
BL31_SOURCES += plat/common/plat_spmd_manifest.c \
|
||||||
common/fdt_wrappers.c \
|
|
||||||
${LIBFDT_SRCS}
|
${LIBFDT_SRCS}
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019-2020, Linaro Limited and Contributors. All rights reserved.
|
# Copyright (c) 2019-2021, Linaro Limited and Contributors. All rights reserved.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
|
|
||||||
CRASH_REPORTING := 1
|
CRASH_REPORTING := 1
|
||||||
|
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
@ -86,8 +88,10 @@ BL31_SOURCES += lib/cpus/aarch64/cortex_a57.S \
|
||||||
${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
|
${PLAT_QEMU_COMMON_PATH}/aarch64/plat_helpers.S \
|
||||||
${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
|
${PLAT_QEMU_COMMON_PATH}/qemu_bl31_setup.c \
|
||||||
common/fdt_fixup.c \
|
common/fdt_fixup.c \
|
||||||
common/fdt_wrappers.c \
|
|
||||||
${QEMU_GIC_SOURCES}
|
${QEMU_GIC_SOURCES}
|
||||||
|
|
||||||
|
BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
ifeq (${SPM_MM},1)
|
ifeq (${SPM_MM},1)
|
||||||
BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c
|
BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -154,13 +154,15 @@ $(eval $(call add_defines,\
|
||||||
PLAT_INCLUDES := -Iplat/st/common/include/
|
PLAT_INCLUDES := -Iplat/st/common/include/
|
||||||
PLAT_INCLUDES += -Iplat/st/stm32mp1/include/
|
PLAT_INCLUDES += -Iplat/st/stm32mp1/include/
|
||||||
|
|
||||||
|
include common/fdt_wrappers.mk
|
||||||
include lib/libfdt/libfdt.mk
|
include lib/libfdt/libfdt.mk
|
||||||
|
|
||||||
PLAT_BL_COMMON_SOURCES := common/fdt_wrappers.c \
|
PLAT_BL_COMMON_SOURCES := common/uuid.c \
|
||||||
common/uuid.c \
|
|
||||||
plat/st/common/stm32mp_common.c \
|
plat/st/common/stm32mp_common.c \
|
||||||
plat/st/stm32mp1/stm32mp1_private.c
|
plat/st/stm32mp1/stm32mp1_private.c
|
||||||
|
|
||||||
|
PLAT_BL_COMMON_SOURCES += ${FDT_WRAPPERS_SOURCES}
|
||||||
|
|
||||||
PLAT_BL_COMMON_SOURCES += drivers/st/uart/aarch32/stm32_console.S
|
PLAT_BL_COMMON_SOURCES += drivers/st/uart/aarch32/stm32_console.S
|
||||||
|
|
||||||
ifneq (${ENABLE_STACK_PROTECTOR},0)
|
ifneq (${ENABLE_STACK_PROTECTOR},0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue