mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-08 05:43:53 +00:00
build: remove Windows compatibility layer
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>
This commit is contained in:
parent
9ac82c4979
commit
c32737033c
24 changed files with 91 additions and 363 deletions
38
Makefile
38
Makefile
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2013-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -23,7 +23,6 @@ MAKEOVERRIDES =
|
|||
|
||||
MAKE_HELPERS_DIRECTORY := make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build-rules.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
|
||||
|
@ -99,15 +98,15 @@ endif
|
|||
|
||||
# Variables for use with Certificate Generation Tool
|
||||
CRTTOOLPATH ?= tools/cert_create
|
||||
CRTTOOL ?= ${CRTTOOLPATH}/cert_create${BIN_EXT}
|
||||
CRTTOOL ?= ${CRTTOOLPATH}/cert_create$(.exe)
|
||||
|
||||
# Variables for use with Firmware Encryption Tool
|
||||
ENCTOOLPATH ?= tools/encrypt_fw
|
||||
ENCTOOL ?= ${ENCTOOLPATH}/encrypt_fw${BIN_EXT}
|
||||
ENCTOOL ?= ${ENCTOOLPATH}/encrypt_fw$(.exe)
|
||||
|
||||
# Variables for use with Firmware Image Package
|
||||
FIPTOOLPATH ?= tools/fiptool
|
||||
FIPTOOL ?= ${FIPTOOLPATH}/fiptool${BIN_EXT}
|
||||
FIPTOOL ?= ${FIPTOOLPATH}/fiptool$(.exe)
|
||||
|
||||
# Variables for use with sptool
|
||||
SPTOOLPATH ?= tools/sptool
|
||||
|
@ -1646,29 +1645,17 @@ endif #(CHECKPATCH)
|
|||
|
||||
clean:
|
||||
$(s)echo " CLEAN"
|
||||
$(call SHELL_REMOVE_DIR,${BUILD_PLAT})
|
||||
ifdef UNIX_MK
|
||||
$(q)rm -rf $(BUILD_PLAT)
|
||||
$(q)${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
|
||||
else
|
||||
# Clear the MAKEFLAGS as we do not want
|
||||
# to pass the gnumake flags to nmake.
|
||||
$(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) clean
|
||||
endif #(UNIX_MK)
|
||||
$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
|
||||
$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} clean
|
||||
$(q)${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
|
||||
|
||||
realclean distclean:
|
||||
$(s)echo " REALCLEAN"
|
||||
$(call SHELL_REMOVE_DIR,${BUILD_BASE})
|
||||
$(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*)
|
||||
ifdef UNIX_MK
|
||||
$(q)rm -rf $(BUILD_BASE)
|
||||
$(q)rm -rf $(CURDIR)/cscope.*
|
||||
$(q)${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
|
||||
else
|
||||
# Clear the MAKEFLAGS as we do not want
|
||||
# to pass the gnumake flags to nmake.
|
||||
$(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) realclean
|
||||
endif #(UNIX_MK)
|
||||
$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} realclean
|
||||
$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} realclean
|
||||
$(q)${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
|
||||
|
@ -1753,25 +1740,14 @@ fip: ${BUILD_PLAT}/${FIP_NAME}
|
|||
fwu_fip: ${BUILD_PLAT}/${FWU_FIP_NAME}
|
||||
|
||||
${FIPTOOL}: FORCE
|
||||
ifdef UNIX_MK
|
||||
$(q)${MAKE} PLAT=${PLAT} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} OPENSSL_DIR=${OPENSSL_DIR} DEBUG=${DEBUG} --no-print-directory -C ${FIPTOOLPATH} all
|
||||
else
|
||||
# Clear the MAKEFLAGS as we do not want
|
||||
# to pass the gnumake flags to nmake.
|
||||
$(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL))
|
||||
endif #(UNIX_MK)
|
||||
|
||||
$(BUILD_PLAT)/romlib/romlib.bin $(BUILD_PLAT)/lib/libwrappers.a $&: $(BUILD_PLAT)/lib/libfdt.a $(BUILD_PLAT)/lib/libc.a $(CRYPTO_LIB)
|
||||
$(q)${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} CRYPTO_SUPPORT=${CRYPTO_SUPPORT} ARM_ARCH_MINOR=${ARM_ARCH_MINOR} INCLUDES=$(call escape-shell,$(INCLUDES)) DEFINES=$(call escape-shell,$(DEFINES)) --no-print-directory -C ${ROMLIBPATH} all
|
||||
|
||||
memmap: all
|
||||
ifdef UNIX_MK
|
||||
$(q)PYTHONPATH=${CURDIR}/tools/memory \
|
||||
${PYTHON} -m memory.memmap -sr ${BUILD_PLAT}
|
||||
else
|
||||
$(q)set PYTHONPATH=${CURDIR}/tools/memory && \
|
||||
${PYTHON} -m memory.memmap -sr ${BUILD_PLAT}
|
||||
endif
|
||||
|
||||
tl: ${BUILD_PLAT}/tl.bin
|
||||
${BUILD_PLAT}/tl.bin: ${HW_CONFIG}
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# This file contains the logic to identify and include any relevant
|
||||
# build environment specific make include files.
|
||||
|
||||
ifndef BUILD_ENV_MK
|
||||
BUILD_ENV_MK := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
# Block possible built-in command definitions that are not fully portable.
|
||||
# This traps occurences that need replacing with our OS portable macros
|
||||
COPY := $$(error "Replace COPY with call to SHELL_COPY or SHELL_COPY_TREE.")
|
||||
CP := $$(error "Replace CP with call to SHELL_COPY or SHELL_COPY_TREE.")
|
||||
DEL := $$(error "Replace DEL with call to SHELL_DELETE.")
|
||||
RD := $$(error "Replace RD with call to SHELL_REMOVE_DIR.")
|
||||
RM := $$(error "Replace RM with call to SHELL_DELETE.")
|
||||
RMDIR := $$(error "Replace RMDIR with call to SHELL_REMOVE_DIR.")
|
||||
|
||||
ENV_FILE_TO_INCLUDE := unix.mk
|
||||
ifdef OSTYPE
|
||||
ifneq ($(findstring ${OSTYPE}, cygwin),)
|
||||
ENV_FILE_TO_INCLUDE := cygwin.mk
|
||||
else
|
||||
ifneq ($(findstring ${OSTYPE}, MINGW32 mingw msys),)
|
||||
ENV_FILE_TO_INCLUDE := msys.mk
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifdef MSYSTEM
|
||||
# Although the MINGW MSYS shell sets OSTYPE as msys in its environment,
|
||||
# it does not appear in the GNU make view of environment variables.
|
||||
# We use MSYSTEM as an alternative, as that is seen by make
|
||||
ifneq ($(findstring ${MSYSTEM}, MINGW32 mingw msys),)
|
||||
OSTYPE ?= msys
|
||||
ENV_FILE_TO_INCLUDE := msys.mk
|
||||
endif
|
||||
else
|
||||
ifdef OS
|
||||
ifneq ($(findstring ${OS}, Windows_NT),)
|
||||
ENV_FILE_TO_INCLUDE := windows.mk
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
include $(dir $(lastword $(MAKEFILE_LIST)))${ENV_FILE_TO_INCLUDE}
|
||||
ENV_FILE_TO_INCLUDE :=
|
||||
|
||||
ifndef SHELL_COPY
|
||||
$(error "SHELL_COPY not defined for build environment.")
|
||||
endif
|
||||
ifndef SHELL_COPY_TREE
|
||||
$(error "SHELL_COPY_TREE not defined for build environment.")
|
||||
endif
|
||||
ifndef SHELL_DELETE_ALL
|
||||
$(error "SHELL_DELETE_ALL not defined for build environment.")
|
||||
endif
|
||||
ifndef SHELL_DELETE
|
||||
$(error "SHELL_DELETE not defined for build environment.")
|
||||
endif
|
||||
ifndef SHELL_REMOVE_DIR
|
||||
$(error "SHELL_REMOVE_DIR not defined for build environment.")
|
||||
endif
|
||||
|
||||
endif
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -14,4 +14,6 @@ ifndef common-mk
|
|||
|
||||
s := @$(if $(or $(verbose),$(silent)),: )
|
||||
q := $(if $(verbose),,@)
|
||||
|
||||
.exe := $(if $(filter Windows_NT,$(OS)),.exe)
|
||||
endif
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
#
|
||||
|
||||
# OS specific definitions for builds in a Cygwin environment.
|
||||
# Cygwin allows us to use unix style commands on a windows platform.
|
||||
|
||||
ifndef CYGWIN_MK
|
||||
CYGWIN_MK := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
include ${MAKE_HELPERS_DIRECTORY}unix.mk
|
||||
|
||||
# In cygwin executable files have the Windows .exe extension type.
|
||||
BIN_EXT := .exe
|
||||
|
||||
endif
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
#
|
||||
|
||||
# OS specific definitions for builds in a Mingw32 MSYS environment.
|
||||
# Mingw32 allows us to use some unix style commands on a windows platform.
|
||||
|
||||
ifndef MSYS_MK
|
||||
MSYS_MK := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
include ${MAKE_HELPERS_DIRECTORY}unix.mk
|
||||
|
||||
# In MSYS executable files have the Windows .exe extension type.
|
||||
BIN_EXT := .exe
|
||||
|
||||
endif
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2023-2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2023-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -18,7 +18,6 @@
|
|||
ifndef toolchain-mk
|
||||
toolchain-mk := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
include $(dir $(toolchain-mk))build_env.mk
|
||||
include $(dir $(toolchain-mk))utilities.mk
|
||||
|
||||
#
|
||||
|
@ -242,28 +241,28 @@ ifndef toolchain-mk
|
|||
#
|
||||
|
||||
# Arm Compiler for Embedded
|
||||
toolchain-guess-tool-arm-clang = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Tool: armclang")
|
||||
toolchain-guess-tool-arm-link = $(shell $(1) --help 2>&1 <$(nul) | grep -o "Tool: armlink")
|
||||
toolchain-guess-tool-arm-fromelf = $(shell $(1) --help 2>&1 <$(nul) | grep -o "Tool: fromelf")
|
||||
toolchain-guess-tool-arm-ar = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Tool: armar")
|
||||
toolchain-guess-tool-arm-clang = $(shell $(1) --version 2>&1 </dev/null | grep -o "Tool: armclang")
|
||||
toolchain-guess-tool-arm-link = $(shell $(1) --help 2>&1 </dev/null | grep -o "Tool: armlink")
|
||||
toolchain-guess-tool-arm-fromelf = $(shell $(1) --help 2>&1 </dev/null | grep -o "Tool: fromelf")
|
||||
toolchain-guess-tool-arm-ar = $(shell $(1) --version 2>&1 </dev/null | grep -o "Tool: armar")
|
||||
|
||||
# LLVM Project
|
||||
toolchain-guess-tool-llvm-clang = $(shell $(1) -v 2>&1 <$(nul) | grep -o "clang version")
|
||||
toolchain-guess-tool-llvm-lld = $(shell $(1) --help 2>&1 <$(nul) | grep -o "OVERVIEW: lld")
|
||||
toolchain-guess-tool-llvm-objcopy = $(shell $(1) --help 2>&1 <$(nul) | grep -o "llvm-objcopy tool")
|
||||
toolchain-guess-tool-llvm-objdump = $(shell $(1) --help 2>&1 <$(nul) | grep -o "llvm object file dumper")
|
||||
toolchain-guess-tool-llvm-ar = $(shell $(1) --help 2>&1 <$(nul) | grep -o "LLVM Archiver")
|
||||
toolchain-guess-tool-llvm-clang = $(shell $(1) -v 2>&1 </dev/null | grep -o "clang version")
|
||||
toolchain-guess-tool-llvm-lld = $(shell $(1) --help 2>&1 </dev/null | grep -o "OVERVIEW: lld")
|
||||
toolchain-guess-tool-llvm-objcopy = $(shell $(1) --help 2>&1 </dev/null | grep -o "llvm-objcopy tool")
|
||||
toolchain-guess-tool-llvm-objdump = $(shell $(1) --help 2>&1 </dev/null | grep -o "llvm object file dumper")
|
||||
toolchain-guess-tool-llvm-ar = $(shell $(1) --help 2>&1 </dev/null | grep -o "LLVM Archiver")
|
||||
|
||||
# GNU Compiler Collection & GNU Binary Utilities
|
||||
toolchain-guess-tool-gnu-gcc = $(shell $(1) -v 2>&1 <$(nul) | grep -o "gcc version")
|
||||
toolchain-guess-tool-gnu-ld = $(shell $(1) -v 2>&1 <$(nul) | grep -o "GNU ld")
|
||||
toolchain-guess-tool-gnu-objcopy = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU objcopy")
|
||||
toolchain-guess-tool-gnu-objdump = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU objdump")
|
||||
toolchain-guess-tool-gnu-ar = $(shell $(1) --version 2>&1 <$(nul) | grep -o "GNU ar")
|
||||
toolchain-guess-tool-gnu-gcc = $(shell $(1) -v 2>&1 </dev/null | grep -o "gcc version")
|
||||
toolchain-guess-tool-gnu-ld = $(shell $(1) -v 2>&1 </dev/null | grep -o "GNU ld")
|
||||
toolchain-guess-tool-gnu-objcopy = $(shell $(1) --version 2>&1 </dev/null | grep -o "GNU objcopy")
|
||||
toolchain-guess-tool-gnu-objdump = $(shell $(1) --version 2>&1 </dev/null | grep -o "GNU objdump")
|
||||
toolchain-guess-tool-gnu-ar = $(shell $(1) --version 2>&1 </dev/null | grep -o "GNU ar")
|
||||
|
||||
# Other tools
|
||||
toolchain-guess-tool-generic-dtc = $(shell $(1) --version 2>&1 <$(nul) | grep -o "Version: DTC")
|
||||
toolchain-guess-tool-generic-poetry = $(shell $(1) --version 2>&1 <$(nul))
|
||||
toolchain-guess-tool-generic-dtc = $(shell $(1) --version 2>&1 </dev/null | grep -o "Version: DTC")
|
||||
toolchain-guess-tool-generic-poetry = $(shell $(1) --version 2>&1 </dev/null)
|
||||
|
||||
toolchain-guess-tool = $(if $(2),$(firstword $(foreach candidate,$(1),$\
|
||||
$(if $(call toolchain-guess-tool-$(candidate),$(2)),$(candidate)))))
|
||||
|
@ -330,17 +329,17 @@ ifndef toolchain-mk
|
|||
|
||||
toolchain-derive-llvm-clang-cpp = $(1)
|
||||
toolchain-derive-llvm-clang-as = $(1)
|
||||
toolchain-derive-llvm-clang-ld = $(shell $(1) --print-prog-name ld.lld 2>$(nul))
|
||||
toolchain-derive-llvm-clang-oc = $(shell $(1) --print-prog-name llvm-objcopy 2>$(nul))
|
||||
toolchain-derive-llvm-clang-od = $(shell $(1) --print-prog-name llvm-objdump 2>$(nul))
|
||||
toolchain-derive-llvm-clang-ar = $(shell $(1) --print-prog-name llvm-ar 2>$(nul))
|
||||
toolchain-derive-llvm-clang-ld = $(shell $(1) --print-prog-name ld.lld 2>/dev/null)
|
||||
toolchain-derive-llvm-clang-oc = $(shell $(1) --print-prog-name llvm-objcopy 2>/dev/null)
|
||||
toolchain-derive-llvm-clang-od = $(shell $(1) --print-prog-name llvm-objdump 2>/dev/null)
|
||||
toolchain-derive-llvm-clang-ar = $(shell $(1) --print-prog-name llvm-ar 2>/dev/null)
|
||||
|
||||
toolchain-derive-gnu-gcc-cpp = $(1)
|
||||
toolchain-derive-gnu-gcc-as = $(1)
|
||||
toolchain-derive-gnu-gcc-ld = $(1)
|
||||
toolchain-derive-gnu-gcc-oc = $(shell $(1) --print-prog-name objcopy 2>$(nul))
|
||||
toolchain-derive-gnu-gcc-od = $(shell $(1) --print-prog-name objdump 2>$(nul))
|
||||
toolchain-derive-gnu-gcc-ar = $(shell $(1) --print-prog-name ar 2>$(nul))
|
||||
toolchain-derive-gnu-gcc-oc = $(shell $(1) --print-prog-name objcopy 2>/dev/null)
|
||||
toolchain-derive-gnu-gcc-od = $(shell $(1) --print-prog-name objdump 2>/dev/null)
|
||||
toolchain-derive-gnu-gcc-ar = $(shell $(1) --print-prog-name ar 2>/dev/null)
|
||||
|
||||
toolchain-derive = $(if $3,$(call toolchain-derive-$1-$2,$3))
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# Trusted Firmware shell command definitions for a Unix style environment.
|
||||
|
||||
ifndef UNIX_MK
|
||||
UNIX_MK := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
DIR_DELIM := /
|
||||
PATH_SEP := :
|
||||
|
||||
# These defines provide Unix style equivalents of the shell commands
|
||||
# required by the Trusted Firmware build environment.
|
||||
|
||||
# ${1} is the file to be copied.
|
||||
# ${2} is the destination file name.
|
||||
define SHELL_COPY
|
||||
$(q)cp -f "${1}" "${2}"
|
||||
endef
|
||||
|
||||
# ${1} is the directory to be copied.
|
||||
# ${2} is the destination directory path.
|
||||
define SHELL_COPY_TREE
|
||||
$(q)cp -rf "${1}" "${2}"
|
||||
endef
|
||||
|
||||
# ${1} is the file to be deleted.
|
||||
define SHELL_DELETE
|
||||
-$(q)rm -f "${1}"
|
||||
endef
|
||||
|
||||
# ${1} is a space delimited list of files to be deleted.
|
||||
# Note that we do not quote ${1}, as multiple parameters may be passed.
|
||||
define SHELL_DELETE_ALL
|
||||
-$(q)rm -rf ${1}
|
||||
endef
|
||||
|
||||
define SHELL_REMOVE_DIR
|
||||
-$(q)rm -rf "${1}"
|
||||
endef
|
||||
|
||||
nul := /dev/null
|
||||
|
||||
which = $(shell command -v $(call escape-shell,$(1)) 2>$(nul))
|
||||
endif
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2024-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -127,3 +127,17 @@ bool-01 = $(if $(call bool,$(1)),1,0)
|
|||
#
|
||||
|
||||
defined = $(call bool,$(filter-out undefined,$(origin $(1))))
|
||||
|
||||
#
|
||||
# Determine the path to a program.
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# - $(1): The program to search for.
|
||||
#
|
||||
# Example usage:
|
||||
#
|
||||
# path-to-gcc := $(call which,gcc) # "/usr/bin/gcc"
|
||||
#
|
||||
|
||||
which = $(shell command -v $(call escape-shell,$(1)) 2>/dev/null)
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
# OS specific parts for builds in a Windows_NT environment. The
|
||||
# environment variable OS is set to Windows_NT on all modern Windows platforms
|
||||
|
||||
# Include generic windows command definitions.
|
||||
|
||||
ifndef WINDOWS_MK
|
||||
WINDOWS_MK := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
DIR_DELIM := $(strip \)
|
||||
BIN_EXT := .exe
|
||||
PATH_SEP := ;
|
||||
|
||||
# For some Windows native commands there is a problem with the directory delimiter.
|
||||
# Make uses / (slash) and the commands expect \ (backslash)
|
||||
# We have to provide a means of translating these, so we define local functions.
|
||||
|
||||
# ${1} is the file to be copied.
|
||||
# ${2} is the destination file name.
|
||||
define SHELL_COPY
|
||||
$(eval tmp_from_file:=$(subst /,\,${1}))
|
||||
$(eval tmp_to_file:=$(subst /,\,${2}))
|
||||
copy "${tmp_from_file}" "${tmp_to_file}"
|
||||
endef
|
||||
|
||||
# ${1} is the directory to be copied.
|
||||
# ${2} is the destination directory path.
|
||||
define SHELL_COPY_TREE
|
||||
$(eval tmp_from_dir:=$(subst /,\,${1}))
|
||||
$(eval tmp_to_dir:=$(subst /,\,${2}))
|
||||
xcopy /HIVE "${tmp_from_dir}" "${tmp_to_dir}"
|
||||
endef
|
||||
|
||||
# ${1} is the file to be deleted.
|
||||
define SHELL_DELETE
|
||||
$(eval tmp_del_file:=$(subst /,\,${*}))
|
||||
-@if exist $(tmp_del_file) del /Q $(tmp_del_file)
|
||||
endef
|
||||
|
||||
# ${1} is a space delimited list of files to be deleted.
|
||||
define SHELL_DELETE_ALL
|
||||
$(eval $(foreach filename,$(wildcard ${1}),$(call DELETE_IF_THERE,${filename})))
|
||||
endef
|
||||
|
||||
# ${1} is the directory to be removed.
|
||||
define SHELL_REMOVE_DIR
|
||||
$(eval tmp_dir:=$(subst /,\,${1}))
|
||||
-@if exist "$(tmp_dir)" rd /Q /S "$(tmp_dir)"
|
||||
endef
|
||||
|
||||
nul := nul
|
||||
|
||||
which = $(shell where "$(1)" 2>$(nul))
|
||||
endif
|
||||
|
||||
# Because git is not available from CMD.EXE, we need to avoid
|
||||
# the BUILD_STRING generation which uses git.
|
||||
# For now we use "development build".
|
||||
# This can be overridden from the command line or environment.
|
||||
BUILD_STRING ?= development build
|
||||
|
||||
MSVC_NMAKE := nmake.exe
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2019-2023, Arm Limited. All rights reserved.
|
||||
# Copyright (c) 2019-2025, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -75,9 +75,7 @@ BL2_SOURCES += lib/aarch32/arm32_aeabi_divmod.c \
|
|||
${DYN_CFG_SOURCES} \
|
||||
${A5DS_SECURITY_SOURCES}
|
||||
|
||||
# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
|
||||
ifdef UNIX_MK
|
||||
|
||||
# Add the FDT_SOURCES and options for Dynamic Config
|
||||
FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_fw_config.dtb
|
||||
TB_FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_tb_fw_config.dtb
|
||||
|
||||
|
@ -94,7 +92,6 @@ $(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG}))
|
|||
FDT_SOURCES += plat/arm/board/a5ds/fdts/a5ds_fw_config.dts \
|
||||
plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts \
|
||||
${FVP_HW_CONFIG_DTS}
|
||||
endif
|
||||
|
||||
NEED_BL32 := yes
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2013-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -338,7 +338,6 @@ BL31_SOURCES += drivers/delay_timer/generic_delay_timer.c
|
|||
endif
|
||||
|
||||
# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
|
||||
ifdef UNIX_MK
|
||||
FVP_HW_CONFIG_DTS := fdts/${FVP_DT_PREFIX}.dts
|
||||
|
||||
FDT_SOURCES += ${FVP_HW_CONFIG_DTS}
|
||||
|
@ -390,7 +389,6 @@ endif
|
|||
|
||||
# Add the HW_CONFIG to FIP and specify the same to certtool
|
||||
$(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG}))
|
||||
endif
|
||||
|
||||
ifeq (${TRANSFER_LIST}, 1)
|
||||
include lib/transfer_list/transfer_list.mk
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright 2020 NXP
|
||||
# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -67,7 +68,7 @@ include plat/nxp/soc-lx2160a/ddr_tbbr.mk
|
|||
|
||||
# Variables for use with Certificate Generation Tool
|
||||
CRTTOOLPATH ?= tools/cert_create
|
||||
CRTTOOL ?= ${CRTTOOLPATH}/cert_create${BIN_EXT}
|
||||
CRTTOOL ?= ${CRTTOOLPATH}/cert_create$(.exe)
|
||||
|
||||
ifneq (${GENERATE_COT},0)
|
||||
ddr_certificates: ${DDR_CRT_DEPS} ${CRTTOOL}
|
||||
|
@ -82,7 +83,7 @@ endif
|
|||
|
||||
# Variables for use with Firmware Image Package
|
||||
FIPTOOLPATH ?= tools/fiptool
|
||||
FIPTOOL ?= ${FIPTOOLPATH}/fiptool${BIN_EXT}
|
||||
FIPTOOL ?= ${FIPTOOLPATH}/fiptool$(.exe)
|
||||
|
||||
${BUILD_PLAT}/${DDR_FIP_NAME}: ${DDR_FIP_DEPS} ${FIPTOOL}
|
||||
$(eval ${CHECK_DDR_FIP_CMD})
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved
|
||||
# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -76,7 +77,7 @@ ASFLAGS += -DBL2_BIN_PATH=\"${BUILD_PLAT}/bl2.bin\"
|
|||
|
||||
# Variables for use with stm32image
|
||||
STM32IMAGEPATH ?= tools/stm32image
|
||||
STM32IMAGE ?= ${STM32IMAGEPATH}/stm32image${BIN_EXT}
|
||||
STM32IMAGE ?= ${STM32IMAGEPATH}/stm32image$(.exe)
|
||||
STM32IMAGE_SRC := ${STM32IMAGEPATH}/stm32image.c
|
||||
STM32_DEPS += ${STM32IMAGE}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright (C) 2019 Remi Pommarel <repk@triplefau.lt>
|
||||
# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://spdx.org/licenses
|
||||
|
@ -7,11 +8,10 @@
|
|||
|
||||
MAKE_HELPERS_DIRECTORY := ../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
||||
PROJECT := doimage${BIN_EXT}
|
||||
PROJECT := doimage$(.exe)
|
||||
OBJECTS := doimage.o
|
||||
|
||||
HOSTCCFLAGS := -Wall -Werror -pedantic -std=c99 -D_GNU_SOURCE
|
||||
|
@ -38,6 +38,6 @@ ${PROJECT}: ${OBJECTS} Makefile
|
|||
$(q)$(host-cc) -c ${HOSTCCFLAGS} $< -o $@
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS})
|
||||
$(q)rm -rf $(PROJECT) $(OBJECTS)
|
||||
|
||||
distclean: clean
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
#
|
||||
# Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2015-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
PLAT := none
|
||||
DEBUG := 0
|
||||
CRTTOOL ?= cert_create${BIN_EXT}
|
||||
CRTTOOL ?= cert_create$(.exe)
|
||||
BINARY := $(notdir ${CRTTOOL})
|
||||
COT := tbbr
|
||||
|
||||
MAKE_HELPERS_DIRECTORY := ../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}defaults.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
@ -95,7 +94,7 @@ ifeq ($(DEBUG),1)
|
|||
endif
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL,${OBJECTS})
|
||||
$(q)rm -rf $(OBJECTS)
|
||||
|
||||
realclean: clean
|
||||
$(call SHELL_DELETE,${BINARY})
|
||||
$(q)rm -f $(BINARY)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2024, Arm Limited. All rights reserved.
|
||||
# Copyright (c) 2024-2025, Arm Limited. All rights reserved.
|
||||
# Copyright (c) 2019-2022, Linaro Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
@ -7,13 +7,12 @@
|
|||
|
||||
BUILD_INFO ?= 1
|
||||
DEBUG := 0
|
||||
ENCTOOL ?= encrypt_fw${BIN_EXT}
|
||||
ENCTOOL ?= encrypt_fw$(.exe)
|
||||
BINARY := $(notdir ${ENCTOOL})
|
||||
OPENSSL_DIR := /usr
|
||||
|
||||
MAKE_HELPERS_DIRECTORY := ../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}defaults.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
@ -75,7 +74,7 @@ ifeq ($(DEBUG),1)
|
|||
endif
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL,${OBJECTS})
|
||||
$(q)rm -rf $(OBJECTS)
|
||||
|
||||
realclean: clean
|
||||
$(call SHELL_DELETE,${BINARY})
|
||||
$(q)rm -f $(BINARY)
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
#
|
||||
# Copyright (c) 2014-2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2014-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
MAKE_HELPERS_DIRECTORY := ../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}defaults.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
||||
FIPTOOL ?= fiptool${BIN_EXT}
|
||||
FIPTOOL ?= fiptool$(.exe)
|
||||
PROJECT := $(notdir ${FIPTOOL})
|
||||
OBJECTS := fiptool.o tbbr_config.o
|
||||
STATIC ?= 0
|
||||
|
@ -93,4 +92,4 @@ endif
|
|||
endif # STATIC
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS} $(DEPS))
|
||||
$(q)rm -rf $(PROJECT) $(OBJECTS) $(DEPS)
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
CC = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
# FIPTOOLPATH and FIPTOOL are passed from the main makefile.
|
||||
|
||||
OBJECTS = $(FIPTOOLPATH)\fiptool.obj \
|
||||
$(FIPTOOLPATH)\tbbr_config.obj \
|
||||
$(FIPTOOLPATH)\win_posix.obj
|
||||
|
||||
INC = -I$(FIPTOOLPATH) -Iinclude\tools_share
|
||||
|
||||
CFLAGS = $(CFLAGS) /nologo /Za /Zi /c /O2 /MT
|
||||
|
||||
all: $(FIPTOOL)
|
||||
|
||||
$(FIPTOOL): $(OBJECTS)
|
||||
$(LD) /nologo /INCREMENTAL:NO /debug /nodefaultlib:libc.lib /out:$@ $(LIBS) $**
|
||||
|
||||
.PHONY: clean realclean
|
||||
|
||||
clean:
|
||||
-@del /f /q $(OBJECTS) > nul
|
||||
-@del /f /q $(FIPTOOLPATH)\*.pdb > nul
|
||||
|
||||
realclean:
|
||||
-@del /f /q $(OBJECTS) > nul
|
||||
-@del /f /q $(FIPTOOLPATH)\*.pdb > nul
|
||||
-@del /f /q $(FIPTOOL) > nul
|
||||
|
||||
.c.obj:
|
||||
$(CC) -c $(CFLAGS) $(INC) $< -Fo$@
|
|
@ -1,18 +1,18 @@
|
|||
#
|
||||
# Copyright 2018-2020 NXP
|
||||
# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
MAKE_HELPERS_DIRECTORY := ../../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
||||
PROJECT_1 := create_pbl${BIN_EXT}
|
||||
PROJECT_1 := create_pbl$(.exe)
|
||||
OBJECTS_1 := create_pbl.o
|
||||
PROJECT_2 := byte_swap${BIN_EXT}
|
||||
PROJECT_2 := byte_swap$(.exe)
|
||||
OBJECTS_2 := byte_swap.o
|
||||
|
||||
override CPPFLAGS += -D_GNU_SOURCE -D_XOPEN_SOURCE=700
|
||||
|
@ -49,5 +49,5 @@ ${PROJECT_2}: ${OBJECTS_2} Makefile
|
|||
$(q)$(host-cc) -c ${CPPFLAGS} ${CFLAGS} ${INCLUDE_PATHS} $< -o $@
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL, ${PROJECT_1} ${OBJECTS_1})
|
||||
$(call SHELL_DELETE_ALL, ${PROJECT_2} ${OBJECTS_2})
|
||||
$(q)rm -rf $(PROJECT_1) $(OBJECTS_1)
|
||||
$(q)rm -rf $(PROJECT_2) $(OBJECTS_2)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#
|
||||
# Copyright 2018-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${BIN_EXT}
|
||||
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap${BIN_EXT}
|
||||
CREATE_PBL ?= ${CREATE_PBL_TOOL_PATH}/create_pbl$(.exe)
|
||||
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap$(.exe)
|
||||
|
||||
HOST_GCC := gcc
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#
|
||||
# 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${BIN_EXT}
|
||||
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap${BIN_EXT}
|
||||
CREATE_PBL ?= ${CREATE_PBL_TOOL_PATH}/create_pbl$(.exe)
|
||||
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap$(.exe)
|
||||
|
||||
HOST_GCC := gcc
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
#
|
||||
# Copyright 2018-2022 NXP
|
||||
# Copyright (c) 2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
#
|
||||
SHELL=/bin/bash
|
||||
|
||||
CREATE_PBL ?= ${CREATE_PBL_TOOL_PATH}/create_pbl${BIN_EXT}
|
||||
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap${BIN_EXT}
|
||||
CREATE_PBL ?= ${CREATE_PBL_TOOL_PATH}/create_pbl$(.exe)
|
||||
BYTE_SWAP ?= ${CREATE_PBL_TOOL_PATH}/byte_swap$(.exe)
|
||||
|
||||
HOST_GCC := gcc
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
#
|
||||
# Copyright (c) 2018-2024, Arm Limited. All rights reserved.
|
||||
# Copyright (c) 2018-2025, Arm Limited. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
MAKE_HELPERS_DIRECTORY := ../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
||||
SPTOOL ?= sptool${BIN_EXT}
|
||||
SPTOOL ?= sptool$(.exe)
|
||||
PROJECT := $(notdir ${SPTOOL})
|
||||
OBJECTS := sptool.o
|
||||
|
||||
|
@ -40,4 +39,4 @@ ${PROJECT}: ${OBJECTS} Makefile
|
|||
$(q)$(host-cc) -c ${CPPFLAGS} ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS})
|
||||
$(q)rm -rf $(PROJECT) $(OBJECTS)
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
#
|
||||
# Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
|
||||
# Copyright (c) 2017-2025, Arm Limited and Contributors. All rights reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
||||
MAKE_HELPERS_DIRECTORY := ../../make_helpers/
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_macros.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}build_env.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}common.mk
|
||||
include ${MAKE_HELPERS_DIRECTORY}toolchain.mk
|
||||
|
||||
PROJECT := stm32image${BIN_EXT}
|
||||
PROJECT := stm32image$(.exe)
|
||||
OBJECTS := stm32image.o
|
||||
|
||||
HOSTCCFLAGS := -Wall -Werror -pedantic -std=c99 -D_GNU_SOURCE
|
||||
|
@ -37,6 +36,6 @@ ${PROJECT}: ${OBJECTS} Makefile
|
|||
$(q)$(host-cc) -c ${HOSTCCFLAGS} $< -o $@
|
||||
|
||||
clean:
|
||||
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS})
|
||||
$(q)rm -rf $(PROJECT) $(OBJECTS)
|
||||
|
||||
distclean: clean
|
||||
|
|
Loading…
Add table
Reference in a new issue