mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-08 05:43:53 +00:00

For a couple of releases now we have officially withdrawn support for building TF-A on Windows using the native environment, relying instead on POSIX emulation layers like MSYS2, Mingw64, Cygwin or WSL. This change removes the remainder of the OS compatibility layer entirely, and migrates the build system over to explicitly relying on a POSIX environment. Change-Id: I8fb60d998162422e958009afd17eab826e3bc39b Signed-off-by: Chris Kay <chris.kay@arm.com>
58 lines
2.2 KiB
Makefile
58 lines
2.2 KiB
Makefile
#
|
|
# Copyright 2020 NXP
|
|
# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
#
|
|
|
|
CREATE_PBL ?= ${CREATE_PBL_TOOL_PATH}/create_pbl$(.exe)
|
|
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap$(.exe)
|
|
|
|
HOST_GCC := gcc
|
|
|
|
.PHONY: pbl
|
|
pbl: ${BUILD_PLAT}/bl2.bin
|
|
ifeq ($(SECURE_BOOT),yes)
|
|
pbl: ${BUILD_PLAT}/bl2.bin
|
|
ifeq ($(RCW),"")
|
|
$(s)echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
|
|
else
|
|
# Generate header for bl2.bin
|
|
$(q)$(CST_DIR)/create_hdr_isbc --in ${BUILD_PLAT}/bl2.bin --out ${BUILD_PLAT}/hdr_bl2 ${BL2_INPUT_FILE}
|
|
# Compile create_pbl tool
|
|
$(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};\
|
|
# Add bl2.bin to RCW
|
|
${CREATE_PBL} -r ${RCW} -i ${BUILD_PLAT}/bl2.bin -b ${BOOT_MODE} -c ${SOC_NUM} -d ${BL2_BASE} -e ${BL2_BASE}\
|
|
-o ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl ;\
|
|
# Add header to RCW
|
|
${CREATE_PBL} -r ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl -i ${BUILD_PLAT}/hdr_bl2 -b ${BOOT_MODE} -c ${SOC_NUM} \
|
|
-d ${BL2_HDR_LOC} -e ${BL2_HDR_LOC} -o ${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl -s;\
|
|
rm ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl
|
|
# Swapping of RCW is required for QSPi Chassis 2 devices
|
|
ifeq (${BOOT_MODE}, qspi)
|
|
ifeq ($(SWAP),1)
|
|
$(s)echo "Byteswapping RCW for QSPI"
|
|
${BYTE_SWAP} ${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl;
|
|
endif # SWAP
|
|
endif # BOOT_MODE
|
|
cd ${CREATE_PBL_TOOL_PATH}; ${MAKE} clean ; cd -;
|
|
endif
|
|
else # NON SECURE_BOOT
|
|
ifeq ($(RCW),"")
|
|
$(s)echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
|
|
else
|
|
# -a option appends the image for Chassis 3 devices in case of non secure boot
|
|
$(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
|
|
${CREATE_PBL} -r ${RCW} -i ${BUILD_PLAT}/bl2.bin -b ${BOOT_MODE} -c ${SOC_NUM} -d ${BL2_BASE} -e ${BL2_BASE} \
|
|
-o ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl ;
|
|
# Swapping of RCW is required for QSPi Chassis 2 devices
|
|
ifeq (${BOOT_MODE}, qspi)
|
|
ifeq ($(SWAP),1)
|
|
$(s)echo "Byteswapping RCW for QSPI"
|
|
${BYTE_SWAP} ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl;
|
|
endif # SWAP
|
|
endif # BOOT_MODE
|
|
cd ${CREATE_PBL_TOOL_PATH}; ${MAKE} clean ; cd -;
|
|
endif
|
|
endif # SECURE_BOOT
|