fix(build): do not force PLAT in plat_helpers.mk

After the change to allow overriding platform specific defaults [1],
the PLAT macro is forced to DEFAULT_PLAT in plat_helpers.mk. But this
makefile is also called for tools. For example in fiptool makefile, as
PLAT is reset to default plat (fvp), we cannot use specific platforms
plat_fiptool.mk files. Put back the setting of PLAT macro in Makefile.

[1]: 1b2fb6adb5 feat(build): add ability to define platform specific
                defaults

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Iadf8bc7fc831a728a9688d0afdd163c8dda737e5
This commit is contained in:
Yann Gautier 2025-01-17 11:02:50 +01:00
parent b8ac81c7e6
commit 422b181faf
2 changed files with 3 additions and 3 deletions

View file

@ -31,6 +31,7 @@ include ${MAKE_HELPERS_DIRECTORY}common.mk
################################################################################
include ${MAKE_HELPERS_DIRECTORY}defaults.mk
PLAT := ${DEFAULT_PLAT}
include ${MAKE_HELPERS_DIRECTORY}plat_helpers.mk
# To be able to set platform specific defaults

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
# Copyright (c) 2016-2025, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@ -11,7 +11,6 @@
ifndef PLAT_HELPERS_MK
PLAT_HELPERS_MK := $(lastword $(MAKEFILE_LIST))
PLAT:= ${DEFAULT_PLAT}
ifeq (${PLAT},)
$(error "Error: Unknown platform. Please use PLAT=<platform name> to specify the platform")
endif
@ -33,7 +32,7 @@ ifndef PLAT_HELPERS_MK
PLAT_DEFAULTS_MAKEFILE_FULL := $(filter %/${PLAT}/${PLAT_DEFAULTS_MAKEFILE},${ALL_PLATFORM_MK_DEF_FILES})
PLATFORM_LIST := $(subst ${space},|,${ALL_PLATFORMS})
ifeq ($(PLAT_MAKEFILE_FULL),)
$(error "Error: Invalid platform. The following platforms are available: ${PLATFORM_LIST}")
$(error "Error: Invalid platform (${PLAT}). The following platforms are available: ${PLATFORM_LIST}")
endif
# Record the directory where the platform make file was found.