mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
refactor(fiptool): move plat_fiptool.mk to tools
Move all plat_fiptool.mks into tools, change the logic to recursively check for tools/fiptool/plat_fiptool/<plat_path>/plat_fiptool.mk I.e. for a platform that has the path "plat/arm/board/tc/platform.mk", the makefile will now load the first existing file from: - tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk - tools/fiptool/plat_fiptool/arm/board/plat_fiptool.mk - tools/fiptool/plat_fiptool/arm/plat_fiptool.mk This enables fiptool to support multiple platforms, or a specific one. Remove file-copying previously being used to handle old default path. Remove custom file cleaning in plat_fiptool.mk. Change-Id: I95245bcf7143b329481d4394ab64f29bfe9de5ab Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
parent
1678bbb572
commit
034a2e3ef8
11 changed files with 24 additions and 48 deletions
|
@ -1,33 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2021, NXP. All rights reserved.
|
||||
# Copyright (c) 2022, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# Name of the platform defined source file name,
|
||||
# which contains platform defined UUID entries populated
|
||||
# in the plat_def_toc_entries[].
|
||||
PLAT_DEF_UUID_CONFIG_FILE_NAME := plat_def_uuid_config
|
||||
|
||||
PLAT_DEF_UUID_CONFIG_FILE_PATH := ../../plat/arm/board/tc
|
||||
|
||||
PLAT_DEF_UUID := yes
|
||||
PLAT_DEF_UUID_OID_CONFIG_PATH := ../../plat/arm/board/tc
|
||||
|
||||
|
||||
INCLUDE_PATHS += -I${PLAT_DEF_UUID_OID_CONFIG_PATH} \
|
||||
-I./
|
||||
# Clean the stale object file.
|
||||
$(shell rm ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o)
|
||||
|
||||
ifeq (${PLAT_DEF_OID},yes)
|
||||
HOSTCCFLAGS += -DPLAT_DEF_OID
|
||||
endif
|
||||
|
||||
ifeq (${PLAT_DEF_UUID},yes)
|
||||
HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID
|
||||
PLAT_OBJECTS += ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o
|
||||
endif
|
||||
|
||||
OBJECTS += ${PLAT_OBJECTS}
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2021-2022, Arm Limited. All rights reserved.
|
||||
# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -53,9 +53,6 @@ ENABLE_SYS_REG_TRACE_FOR_NS := 1
|
|||
# enable trace filter control registers access to NS by default
|
||||
ENABLE_TRF_FOR_NS := 1
|
||||
|
||||
# Enable RSS-required FIP UUIDs
|
||||
$(shell cp plat/arm/board/tc/plat_fiptool.mk ${PLAT_DIR})
|
||||
|
||||
# Include GICv3 driver files
|
||||
include drivers/arm/gic/v3/gicv3.mk
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright 2020 NXP
|
||||
# Copyright (c) 2023, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -22,8 +23,6 @@ PLAT_INCLUDES += -I${FIP_HANDLER_COMMON_PATH}\
|
|||
|
||||
DDR_FIP_IO_SOURCES += $(DDR_FIP_IO_STORAGE_PATH)/ddr_io_storage.c
|
||||
|
||||
$(shell cp tools/nxp/plat_fiptool/plat_fiptool.mk ${PLAT_DIR})
|
||||
|
||||
ifeq (${BL_COMM_DDR_FIP_IO_NEEDED},yes)
|
||||
BL_COMMON_SOURCES += ${DDR_FIP_IO_SOURCES}
|
||||
else
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright 2018-2020 NXP
|
||||
# Copyright (c) 2023, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -29,8 +30,6 @@ fip_fuse: ${BUILD_PLAT}/${FUSE_FIP_NAME}
|
|||
|
||||
ifeq (${FUSE_PROV_FILE},)
|
||||
|
||||
$(shell cp tools/nxp/plat_fiptool/plat_fiptool.mk ${PLAT_DIR})
|
||||
|
||||
else
|
||||
ifeq (${TRUSTED_BOARD_BOOT},1)
|
||||
FUSE_PROV_FILE_SB = $(notdir ${FUSE_PROV_FILE})_prov.sb
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2014-2022, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2014-2023, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -54,10 +54,13 @@ HOSTCC ?= gcc
|
|||
ifneq (${PLAT},)
|
||||
TF_PLATFORM_ROOT := ../../plat/
|
||||
include ${MAKE_HELPERS_DIRECTORY}plat_helpers.mk
|
||||
PLAT_FIPTOOL_HELPER_MK := ${PLAT_DIR}/plat_fiptool.mk
|
||||
COMBINED_PATH_FRAG := plat_fiptool/
|
||||
PLAT_FIPTOOL_HELPER_MK := $(foreach path_frag,$(subst /, ,$(patsubst ../../plat/%/,%,${PLAT_DIR})),\
|
||||
$(eval COMBINED_PATH_FRAG := ${COMBINED_PATH_FRAG}/${path_frag})\
|
||||
$(wildcard ${COMBINED_PATH_FRAG}/plat_fiptool.mk))
|
||||
endif
|
||||
|
||||
ifneq (,$(wildcard ${PLAT_FIPTOOL_HELPER_MK}))
|
||||
ifneq (,$(wildcard $(lastword ${PLAT_FIPTOOL_HELPER_MK})))
|
||||
include ${PLAT_FIPTOOL_HELPER_MK}
|
||||
endif
|
||||
|
||||
|
|
12
tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk
Normal file
12
tools/fiptool/plat_fiptool/arm/board/tc/plat_fiptool.mk
Normal file
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Copyright (c) 2021, NXP. All rights reserved.
|
||||
# Copyright (c) 2022-2023, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
INCLUDE_PATHS += -I./ \
|
||||
-I../../plat/arm/board/tc
|
||||
|
||||
HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID
|
||||
OBJECTS += plat_fiptool/arm/board/tc/plat_def_uuid_config.o
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright (c) 2021, NXP. All rights reserved.
|
||||
# Copyright (c) 2023, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -9,7 +10,7 @@
|
|||
# in the plat_def_toc_entries[].
|
||||
PLAT_DEF_UUID_CONFIG_FILE_NAME := plat_def_uuid_config
|
||||
|
||||
PLAT_DEF_UUID_CONFIG_FILE_PATH := ../nxp/plat_fiptool
|
||||
PLAT_DEF_UUID_CONFIG_FILE_PATH := plat_fiptool/nxp/
|
||||
|
||||
PLAT_DEF_OID := yes
|
||||
PLAT_DEF_UUID := yes
|
||||
|
@ -18,8 +19,6 @@ PLAT_DEF_UUID_OID_CONFIG_PATH := ../../plat/nxp/common/fip_handler/common
|
|||
|
||||
INCLUDE_PATHS += -I${PLAT_DEF_UUID_OID_CONFIG_PATH} \
|
||||
-I./
|
||||
# Clean the stale object file.
|
||||
$(shell rm ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o)
|
||||
|
||||
ifeq (${PLAT_DEF_OID},yes)
|
||||
HOSTCCFLAGS += -DPLAT_DEF_OID
|
|
@ -16,7 +16,7 @@ PLAT_DEF_UUID := yes
|
|||
ifeq (${PLAT_DEF_UUID},yes)
|
||||
HOSTCCFLAGS += -DPLAT_DEF_FIP_UUID
|
||||
|
||||
${PLAT_DEF_UUID_FILE_NAME}.o: ${PLAT_DIR}${PLAT_DEF_UUID_FILE_NAME}.c
|
||||
${PLAT_DEF_UUID_FILE_NAME}.o: plat_fiptool/st/stm32mp1/${PLAT_DEF_UUID_FILE_NAME}.c
|
||||
${HOSTCC} -c ${CPPFLAGS} ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
|
||||
|
||||
PLAT_OBJECTS += ${PLAT_DEF_UUID_FILE_NAME}.o
|
Loading…
Add table
Reference in a new issue