build: unify verbosity handling
This change introduces a few helper variables for dealing with verbose
and silent build modes: `silent`, `verbose`, `q` and `s`.
The `silent` and `verbose` variables are boolean values determining
whether the build system has been configured to run silently or
verbosely respectively (i.e. with `--silent` or `V=1`).
These two modes cannot be used together - if `silent` is truthy then
`verbose` is always falsy. As such:
make --silent V=1
... results in a silent build.
In addition to these boolean variables, we also introduce two new
variables - `s` and `q` - for use in rule recipes to conditionally
suppress the output of commands.
When building silently, `s` expands to a value which disables the
command that follows, and `q` expands to a value which supppresses
echoing of the command:
$(s)echo 'This command is neither echoed nor executed'
$(q)echo 'This command is executed but not echoed'
When building verbosely, `s` expands to a value which disables the
command that follows, and `q` expands to nothing:
$(s)echo 'This command is neither echoed nor executed'
$(q)echo 'This command is executed and echoed'
In all other cases, both `s` and `q` expand to a value which suppresses
echoing of the command that follows:
$(s)echo 'This command is executed but not echoed'
$(q)echo 'This command is executed but not echoed'
The `s` variable is predominantly useful for `echo` commands, where you
always want to suppress echoing of the command itself, whilst `q` is
more useful for all other commands.
Change-Id: I8d8ff6ed714d3cb401946c52955887ed7dca602b
Signed-off-by: Chris Kay <chris.kay@arm.com>
diff --git a/Makefile b/Makefile
index d73fc87..bbde1a7 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,7 @@
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
################################################################################
# Default values for build configurations, and their dependencies
@@ -93,23 +94,10 @@
# Process build options
################################################################################
-# Verbose flag
-ifeq (${V},0)
- Q:=@
- ECHO:=@echo
+ifeq ($(verbose),)
CHECKCODE_ARGS += --no-summary --terse
-else
- Q:=
- ECHO:=$(ECHO_QUIET)
-endif
-
-ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
- Q:=@
- ECHO:=$(ECHO_QUIET)
endif
-export Q ECHO
-
################################################################################
# Auxiliary tools (fiptool, cert_create, etc)
################################################################################
@@ -1477,7 +1465,7 @@
all: msg_start
msg_start:
- @echo "Building ${PLAT}"
+ $(s)echo "Building ${PLAT}"
ifeq (${ERROR_DEPRECATED},0)
# Check if deprecated declarations and cpp warnings should be treated as error or not.
@@ -1573,11 +1561,11 @@
# Add Secure Partition packages
ifeq (${NEED_SP_PKG},yes)
$(BUILD_PLAT)/sp_gen.mk: ${SP_MK_GEN} ${SP_LAYOUT_FILE} | ${BUILD_PLAT}
- @${PYTHON} "$<" "$@" $(filter-out $<,$^) $(BUILD_PLAT) ${COT} ${SP_DTS_LIST_FRAGMENT}
+ $(q)${PYTHON} "$<" "$@" $(filter-out $<,$^) $(BUILD_PLAT) ${COT} ${SP_DTS_LIST_FRAGMENT}
sp: $(DTBS) $(BUILD_PLAT)/sp_gen.mk $(SP_PKGS)
- @${ECHO_BLANK_LINE}
- @echo "Built SP Images successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo
+ $(s)echo "Built SP Images successfully"
+ $(s)echo
endif #(NEED_SP_PKG)
locate-checkpatch:
@@ -1590,37 +1578,37 @@
endif #(CHECKPATCH)
clean:
- @echo " CLEAN"
+ $(s)echo " CLEAN"
$(call SHELL_REMOVE_DIR,${BUILD_PLAT})
ifdef UNIX_MK
- ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
+ $(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
+ $(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
+ $(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:
- @echo " REALCLEAN"
+ $(s)echo " REALCLEAN"
$(call SHELL_REMOVE_DIR,${BUILD_BASE})
$(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*)
ifdef UNIX_MK
- ${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
+ $(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
+ $(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
+ $(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
checkcodebase: locate-checkpatch
- @echo " CHECKING STYLE"
- @if test -d .git ; then \
+ $(s)echo " CHECKING STYLE"
+ $(q)if test -d .git ; then \
git ls-files | grep -E -v 'libfdt|libc|docs|\.rst' | \
while read GIT_FILE ; \
do ${CHECKPATCH} ${CHECKCODE_ARGS} -f $$GIT_FILE ; \
@@ -1636,11 +1624,11 @@
fi
checkpatch: locate-checkpatch
- @echo " CHECKING STYLE"
- @if test -n "${CHECKPATCH_OPTS}"; then \
+ $(s)echo " CHECKING STYLE"
+ $(q)if test -n "${CHECKPATCH_OPTS}"; then \
echo " with ${CHECKPATCH_OPTS} option(s)"; \
fi
- ${Q}COMMON_COMMIT=$$(git merge-base HEAD ${BASE_COMMIT}); \
+ $(q)COMMON_COMMIT=$$(git merge-base HEAD ${BASE_COMMIT}); \
for commit in `git rev-list --no-merges $$COMMON_COMMIT..HEAD`; \
do \
printf "\n[*] Checking style of '$$commit'\n\n"; \
@@ -1655,44 +1643,44 @@
certtool: ${CRTTOOL}
${CRTTOOL}: FORCE
- ${Q}${MAKE} PLAT=${PLAT} USE_TBBR_DEFS=${USE_TBBR_DEFS} COT=${COT} OPENSSL_DIR=${OPENSSL_DIR} CRTTOOL=${CRTTOOL} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${CRTTOOLPATH} all
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(q)${MAKE} PLAT=${PLAT} USE_TBBR_DEFS=${USE_TBBR_DEFS} COT=${COT} OPENSSL_DIR=${OPENSSL_DIR} CRTTOOL=${CRTTOOL} DEBUG=${DEBUG} --no-print-directory -C ${CRTTOOLPATH} all
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
ifneq (${GENERATE_COT},0)
certificates: ${CRT_DEPS} ${CRTTOOL}
- ${Q}${CRTTOOL} ${CRT_ARGS}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @echo "Certificates can be found in ${BUILD_PLAT}"
- @${ECHO_BLANK_LINE}
+ $(q)${CRTTOOL} ${CRT_ARGS}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo "Certificates can be found in ${BUILD_PLAT}"
+ $(s)echo
endif #(GENERATE_COT)
${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL}
$(eval ${CHECK_FIP_CMD})
- ${Q}${FIPTOOL} create ${FIP_ARGS} $@
- ${Q}${FIPTOOL} info $@
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(q)${FIPTOOL} create ${FIP_ARGS} $@
+ $(q)${FIPTOOL} info $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
ifneq (${GENERATE_COT},0)
fwu_certificates: ${FWU_CRT_DEPS} ${CRTTOOL}
- ${Q}${CRTTOOL} ${FWU_CRT_ARGS}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @echo "FWU certificates can be found in ${BUILD_PLAT}"
- @${ECHO_BLANK_LINE}
+ $(q)${CRTTOOL} ${FWU_CRT_ARGS}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo "FWU certificates can be found in ${BUILD_PLAT}"
+ $(s)echo
endif #(GENERATE_COT)
${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL}
$(eval ${CHECK_FWU_FIP_CMD})
- ${Q}${FIPTOOL} create ${FWU_FIP_ARGS} $@
- ${Q}${FIPTOOL} info $@
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(q)${FIPTOOL} create ${FWU_FIP_ARGS} $@
+ $(q)${FIPTOOL} info $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
fiptool: ${FIPTOOL}
fip: ${BUILD_PLAT}/${FIP_NAME}
@@ -1700,85 +1688,85 @@
${FIPTOOL}: FORCE
ifdef UNIX_MK
- ${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} OPENSSL_DIR=${OPENSSL_DIR} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${FIPTOOLPATH} all
+ $(q)${MAKE} 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))
+ $(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL))
endif #(UNIX_MK)
romlib.bin: libraries FORCE
- ${Q}${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} ARM_ARCH_MINOR=${ARM_ARCH_MINOR} INCLUDES=$(call escape-shell,$(INCLUDES)) DEFINES=$(call escape-shell,$(DEFINES)) --no-print-directory -C ${ROMLIBPATH} all
+ $(q)${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} 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 \
+ $(q)PYTHONPATH=${CURDIR}/tools/memory \
${PYTHON} -m memory.memmap -sr ${BUILD_PLAT}
else
- ${Q}set PYTHONPATH=${CURDIR}/tools/memory && \
+ $(q)set PYTHONPATH=${CURDIR}/tools/memory && \
${PYTHON} -m memory.memmap -sr ${BUILD_PLAT}
endif
doc:
- @echo " BUILD DOCUMENTATION"
- ${Q}${MAKE} --no-print-directory -C ${DOCS_PATH} html
+ $(s)echo " BUILD DOCUMENTATION"
+ $(q)${MAKE} --no-print-directory -C ${DOCS_PATH} html
enctool: ${ENCTOOL}
${ENCTOOL}: FORCE
- ${Q}${MAKE} PLAT=${PLAT} BUILD_INFO=0 OPENSSL_DIR=${OPENSSL_DIR} ENCTOOL=${ENCTOOL} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${ENCTOOLPATH} all
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(q)${MAKE} PLAT=${PLAT} BUILD_INFO=0 OPENSSL_DIR=${OPENSSL_DIR} ENCTOOL=${ENCTOOL} DEBUG=${DEBUG} --no-print-directory -C ${ENCTOOLPATH} all
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
cscope:
- @echo " CSCOPE"
- ${Q}find ${CURDIR} -name "*.[chsS]" > cscope.files
- ${Q}cscope -b -q -k
+ $(s)echo " CSCOPE"
+ $(q)find ${CURDIR} -name "*.[chsS]" > cscope.files
+ $(q)cscope -b -q -k
help:
- @echo "usage: ${MAKE} [PLAT=<platform>] [OPTIONS] [TARGET]"
- @echo ""
- @echo "PLAT is used to specify which platform you wish to build."
- @echo "If no platform is specified, PLAT defaults to: ${DEFAULT_PLAT}"
- @echo ""
- @echo "platform = ${PLATFORM_LIST}"
- @echo ""
- @echo "Please refer to the User Guide for a list of all supported options."
- @echo "Note that the build system doesn't track dependencies for build "
- @echo "options. Therefore, if any of the build options are changed "
- @echo "from a previous build, a clean build must be performed."
- @echo ""
- @echo "Supported Targets:"
- @echo " all Build all individual bootloader binaries"
- @echo " bl1 Build the BL1 binary"
- @echo " bl2 Build the BL2 binary"
- @echo " bl2u Build the BL2U binary"
- @echo " bl31 Build the BL31 binary"
- @echo " bl32 Build the BL32 binary. If ARCH=aarch32, then "
- @echo " this builds secure payload specified by AARCH32_SP"
- @echo " certificates Build the certificates (requires 'GENERATE_COT=1')"
- @echo " fip Build the Firmware Image Package (FIP)"
- @echo " fwu_fip Build the FWU Firmware Image Package (FIP)"
- @echo " checkcodebase Check the coding style of the entire source tree"
- @echo " checkpatch Check the coding style on changes in the current"
- @echo " branch against BASE_COMMIT (default origin/master)"
- @echo " clean Clean the build for the selected platform"
- @echo " cscope Generate cscope index"
- @echo " distclean Remove all build artifacts for all platforms"
- @echo " certtool Build the Certificate generation tool"
- @echo " enctool Build the Firmware encryption tool"
- @echo " fiptool Build the Firmware Image Package (FIP) creation tool"
- @echo " sp Build the Secure Partition Packages"
- @echo " sptool Build the Secure Partition Package creation tool"
- @echo " dtbs Build the Device Tree Blobs (if required for the platform)"
- @echo " memmap Print the memory map of the built binaries"
- @echo " doc Build html based documentation using Sphinx tool"
- @echo ""
- @echo "Note: most build targets require PLAT to be set to a specific platform."
- @echo ""
- @echo "example: build all targets for the FVP platform:"
- @echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all"
+ $(s)echo "usage: ${MAKE} [PLAT=<platform>] [OPTIONS] [TARGET]"
+ $(s)echo ""
+ $(s)echo "PLAT is used to specify which platform you wish to build."
+ $(s)echo "If no platform is specified, PLAT defaults to: ${DEFAULT_PLAT}"
+ $(s)echo ""
+ $(s)echo "platform = ${PLATFORM_LIST}"
+ $(s)echo ""
+ $(s)echo "Please refer to the User Guide for a list of all supported options."
+ $(s)echo "Note that the build system doesn't track dependencies for build "
+ $(s)echo "options. Therefore, if any of the build options are changed "
+ $(s)echo "from a previous build, a clean build must be performed."
+ $(s)echo ""
+ $(s)echo "Supported Targets:"
+ $(s)echo " all Build all individual bootloader binaries"
+ $(s)echo " bl1 Build the BL1 binary"
+ $(s)echo " bl2 Build the BL2 binary"
+ $(s)echo " bl2u Build the BL2U binary"
+ $(s)echo " bl31 Build the BL31 binary"
+ $(s)echo " bl32 Build the BL32 binary. If ARCH=aarch32, then "
+ $(s)echo " this builds secure payload specified by AARCH32_SP"
+ $(s)echo " certificates Build the certificates (requires 'GENERATE_COT=1')"
+ $(s)echo " fip Build the Firmware Image Package (FIP)"
+ $(s)echo " fwu_fip Build the FWU Firmware Image Package (FIP)"
+ $(s)echo " checkcodebase Check the coding style of the entire source tree"
+ $(s)echo " checkpatch Check the coding style on changes in the current"
+ $(s)echo " branch against BASE_COMMIT (default origin/master)"
+ $(s)echo " clean Clean the build for the selected platform"
+ $(s)echo " cscope Generate cscope index"
+ $(s)echo " distclean Remove all build artifacts for all platforms"
+ $(s)echo " certtool Build the Certificate generation tool"
+ $(s)echo " enctool Build the Firmware encryption tool"
+ $(s)echo " fiptool Build the Firmware Image Package (FIP) creation tool"
+ $(s)echo " sp Build the Secure Partition Packages"
+ $(s)echo " sptool Build the Secure Partition Package creation tool"
+ $(s)echo " dtbs Build the Device Tree Blobs (if required for the platform)"
+ $(s)echo " memmap Print the memory map of the built binaries"
+ $(s)echo " doc Build html based documentation using Sphinx tool"
+ $(s)echo ""
+ $(s)echo "Note: most build targets require PLAT to be set to a specific platform."
+ $(s)echo ""
+ $(s)echo "example: build all targets for the FVP platform:"
+ $(s)echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all"
.PHONY: FORCE
FORCE:;
diff --git a/docs/Makefile b/docs/Makefile
index 5bc24db..9fd7d76 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,11 +1,13 @@
#
-# Copyright (c) 2019-2023, ARM Limited. All rights reserved.
+# Copyright (c) 2019-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Minimal makefile for Sphinx documentation
#
+include ../make_helpers/common.mk
+
# You can set these variables from the command line.
SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
@@ -13,20 +15,13 @@
SOURCEDIR = .
BUILDDIR = build
-V ?= 0
-ifeq ($(V),0)
- Q := @
-else
- Q :=
-endif
-
# Put it first so that "make" without argument is like "make help".
help:
- ${Q}$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+ $(q)$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
- ${Q}$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+.DEFAULT: Makefile
+ $(q)$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk b/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk
index 1af51f8..12e22e9 100644
--- a/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk
+++ b/drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk
@@ -26,8 +26,8 @@
# CST_BL31
define CST_BL31_RULE
$(1): $(2)
- @echo " Generating CSF Header for $$@ $$<"
- $(Q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
+ $(s)echo " Generating CSF Header for $$@ $$<"
+ $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
--app $(2) ${BL31_INPUT_FILE}
endef
@@ -36,8 +36,8 @@
# CST_BL32
define CST_BL32_RULE
$(1): $(2)
- @echo " Generating CSF Header for $$@ $$<"
- $(Q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
+ $(s)echo " Generating CSF Header for $$@ $$<"
+ $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
--app $(2) ${BL32_INPUT_FILE}
endef
@@ -46,8 +46,8 @@
# CST_BL33
define CST_BL33_RULE
$(1): $(2)
- @echo " Generating CSF Header for $$@ $$<"
- $(Q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
+ $(s)echo " Generating CSF Header for $$@ $$<"
+ $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
--app $(2) ${BL33_INPUT_FILE}
endef
@@ -56,8 +56,8 @@
# CST_SCP_BL2
define CST_SCP_BL2_RULE
$(1): $(2)
- @echo " Generating CSF Header for $$@ $$<"
- $(Q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
+ $(s)echo " Generating CSF Header for $$@ $$<"
+ $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
--app $(2) ${FUSE_INPUT_FILE}
endef
diff --git a/drivers/nxp/ddr/phy-gen2/ddrphy.mk b/drivers/nxp/ddr/phy-gen2/ddrphy.mk
index ba5c774..a09a278 100644
--- a/drivers/nxp/ddr/phy-gen2/ddrphy.mk
+++ b/drivers/nxp/ddr/phy-gen2/ddrphy.mk
@@ -12,9 +12,9 @@
DDR_PHY_H =
$(DDR_PHY_C): $(DDR_PHY_H) $(COMMON_HDRS) src
- @cp -r "$(DDR_PHY_PATH)/$@" "$(SRC_DIR)/$@"
+ $(q)cp -r "$(DDR_PHY_PATH)/$@" "$(SRC_DIR)/$@"
$(DDR_PHY_H): src
- @cp -r "$(DDR_PHY_PATH)/$@" "$(SRC_DIR)/$@"
+ $(q)cp -r "$(DDR_PHY_PATH)/$@" "$(SRC_DIR)/$@"
#------------------------------------------------
diff --git a/lib/romlib/Makefile b/lib/romlib/Makefile
index da3d3d5..9ade331 100644
--- a/lib/romlib/Makefile
+++ b/lib/romlib/Makefile
@@ -10,6 +10,7 @@
toolchains := aarch64
endif
+include ../../make_helpers/common.mk
include ../../make_helpers/toolchain.mk
ROMLIB_GEN = ./romlib_generator.py
@@ -29,13 +30,6 @@
WRAPPER_OBJS = $(WRAPPER_SOURCES:.s=.o)
endif
-V ?= 0
-ifeq ($(V),0)
- Q := @
-else
- Q :=
-endif
-
LDFLAGS := -Wl,--gc-sections -nostdlib
ifeq ($(DEBUG),1)
@@ -53,49 +47,49 @@
all: $(BUILD_DIR)/romlib.bin $(LIB_DIR)/libwrappers.a
%.o: %.s
- @echo " AS $@"
- $(Q)$(aarch64-as) -c $(ASFLAGS) -o $@ $<
+ $(s)echo " AS $@"
+ $(q)$(aarch64-as) -c $(ASFLAGS) -o $@ $<
$(BUILD_DIR)/%.o: %.s
- @echo " AS $@"
- $(Q)$(aarch64-as) -c $(ASFLAGS) -o $@ $<
+ $(s)echo " AS $@"
+ $(q)$(aarch64-as) -c $(ASFLAGS) -o $@ $<
$(BUILD_DIR)/romlib.ld: romlib.ld.S
- @echo " PP $@"
- $(Q)$(aarch64-cpp) -E $(PPFLAGS) -o $@ romlib.ld.S
+ $(s)echo " PP $@"
+ $(q)$(aarch64-cpp) -E $(PPFLAGS) -o $@ romlib.ld.S
$(BUILD_DIR)/romlib.elf: $(OBJS) $(BUILD_DIR)/romlib.ld
- @echo " LD $@"
- $(Q)$(aarch64-ld) -T $(BUILD_DIR)/romlib.ld -L$(LIB_DIR) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
+ $(s)echo " LD $@"
+ $(q)$(aarch64-ld) -T $(BUILD_DIR)/romlib.ld -L$(LIB_DIR) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(BUILD_DIR)/romlib.bin: $(BUILD_DIR)/romlib.elf
- @echo " BIN $@"
- $(Q)$(aarch64-oc) -O binary $(BUILD_DIR)/romlib.elf $@
+ $(s)echo " BIN $@"
+ $(q)$(aarch64-oc) -O binary $(BUILD_DIR)/romlib.elf $@
$(WRAPPER_DIR)/jmpvar.s: $(BUILD_DIR)/romlib.elf
- @echo " VAR $@"
- $(Q)$(ROMLIB_GEN) genvar --output $@ $<
+ $(s)echo " VAR $@"
+ $(q)$(ROMLIB_GEN) genvar --output $@ $<
$(LIB_DIR)/libwrappers.a: $(WRAPPER_DIR)/jmpvar.o $(WRAPPER_OBJS)
- @echo " AR $@"
- $(Q)$(aarch64-ar) -rc $@ $(WRAPPER_DIR)/jmpvar.o $(WRAPPER_OBJS)
+ $(s)echo " AR $@"
+ $(q)$(aarch64-ar) -rc $@ $(WRAPPER_DIR)/jmpvar.o $(WRAPPER_OBJS)
$(BUILD_DIR)/jmptbl.i: ../../$(PLAT_DIR)/jmptbl.i
- @echo " PRE $@"
- $(Q)$(ROMLIB_GEN) pre --output $@ --deps $(BUILD_DIR)/jmptbl.d $<
+ $(s)echo " PRE $@"
+ $(q)$(ROMLIB_GEN) pre --output $@ --deps $(BUILD_DIR)/jmptbl.d $<
$(WRAPPER_SOURCES) &: $(BUILD_DIR)/jmptbl.i
- @echo " WRP $<"
- $(Q)$(ROMLIB_GEN) genwrappers --bti=$(ENABLE_BTI) -b $(WRAPPER_DIR) $<
+ $(s)echo " WRP $<"
+ $(q)$(ROMLIB_GEN) genwrappers --bti=$(ENABLE_BTI) -b $(WRAPPER_DIR) $<
$(WRAPPER_OBJS): $(WRAPPER_DIR)/%.o: $(WRAPPER_DIR)/%.s
$(BUILD_DIR)/jmptbl.s: $(BUILD_DIR)/jmptbl.i
- @echo " TBL $@"
- $(Q)$(ROMLIB_GEN) gentbl --output $@ --bti=$(ENABLE_BTI) $<
+ $(s)echo " TBL $@"
+ $(q)$(ROMLIB_GEN) gentbl --output $@ --bti=$(ENABLE_BTI) $<
clean:
- @rm -f $(BUILD_DIR)/*
+ $(q)rm -f $(BUILD_DIR)/*
-include $(BUILD_DIR)/romlib.d
-include $(BUILD_DIR)/jmptbl.d
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 9eb9d1e..d27408c 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -148,8 +148,8 @@
# $(2) = output encrypted firmware binary
define ENCRYPT_FW
$(2): $(1) enctool
- $$(ECHO) " ENC $$<"
- $$(Q)$$(ENCTOOL) $$(ENC_ARGS) -i $$< -o $$@
+ $$(s)echo " ENC $$<"
+ $$(q)$$(ENCTOOL) $$(ENC_ARGS) -i $$< -o $$@
endef
# TOOL_ADD_PAYLOAD appends the command line arguments required by fiptool to
@@ -267,8 +267,8 @@
# GZIP
define GZIP_RULE
$(1): $(2)
- $(ECHO) " GZIP $$@"
- $(Q)gzip -n -f -9 $$< --stdout > $$@
+ $(s)echo " GZIP $$@"
+ $(q)gzip -n -f -9 $$< --stdout > $$@
endef
GZIP_SUFFIX := .gz
@@ -290,8 +290,8 @@
$(eval LIB := $(call uppercase, $(notdir $(1))))
$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | lib$(3)_dirs
- $$(ECHO) " CC $$<"
- $$(Q)$($(ARCH)-cc) $$($(LIB)_CFLAGS) $$(TF_CFLAGS) $$(CFLAGS) $(MAKE_DEP) -c $$< -o $$@
+ $$(s)echo " CC $$<"
+ $$(q)$($(ARCH)-cc) $$($(LIB)_CFLAGS) $$(TF_CFLAGS) $$(CFLAGS) $(MAKE_DEP) -c $$< -o $$@
-include $(DEP)
@@ -306,8 +306,8 @@
$(eval DEP := $(patsubst %.o,%.d,$(OBJ)))
$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | lib$(3)_dirs
- $$(ECHO) " AS $$<"
- $$(Q)$($(ARCH)-as) -x assembler-with-cpp $$(TF_CFLAGS_$(ARCH)) $$(ASFLAGS) $(MAKE_DEP) -c $$< -o $$@
+ $$(s)echo " AS $$<"
+ $$(q)$($(ARCH)-as) -x assembler-with-cpp $$(TF_CFLAGS_$(ARCH)) $$(ASFLAGS) $(MAKE_DEP) -c $$< -o $$@
-include $(DEP)
@@ -329,8 +329,8 @@
$(eval BL_CFLAGS := $($(call uppercase,$(3))_CFLAGS) $(PLAT_BL_COMMON_CFLAGS))
$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $(3)_dirs
- $$(ECHO) " CC $$<"
- $$(Q)$($(ARCH)-cc) $$(LTO_CFLAGS) $$(TF_CFLAGS) $$(CFLAGS) $(BL_CPPFLAGS) $(BL_CFLAGS) $(MAKE_DEP) -c $$< -o $$@
+ $$(s)echo " CC $$<"
+ $$(q)$($(ARCH)-cc) $$(LTO_CFLAGS) $$(TF_CFLAGS) $$(CFLAGS) $(BL_CPPFLAGS) $(BL_CFLAGS) $(MAKE_DEP) -c $$< -o $$@
-include $(DEP)
@@ -352,8 +352,8 @@
$(eval BL_ASFLAGS := $($(call uppercase,$(3))_ASFLAGS) $(PLAT_BL_COMMON_ASFLAGS))
$(OBJ): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $(3)_dirs
- $$(ECHO) " AS $$<"
- $$(Q)$($(ARCH)-as) -x assembler-with-cpp $$(TF_CFLAGS_$(ARCH)) $$(ASFLAGS) $(BL_CPPFLAGS) $(BL_ASFLAGS) $(MAKE_DEP) -c $$< -o $$@
+ $$(s)echo " AS $$<"
+ $$(q)$($(ARCH)-as) -x assembler-with-cpp $$(TF_CFLAGS_$(ARCH)) $$(ASFLAGS) $(BL_CPPFLAGS) $(BL_ASFLAGS) $(MAKE_DEP) -c $$< -o $$@
-include $(DEP)
@@ -373,8 +373,8 @@
$(eval BL_CPPFLAGS := $($(call uppercase,$(3))_CPPFLAGS) $(addprefix -D,$(BL_DEFINES)) $(addprefix -I,$(BL_INCLUDE_DIRS)) $(PLAT_BL_COMMON_CPPFLAGS))
$(1): $(2) $(filter-out %.d,$(MAKEFILE_LIST)) | $(3)_dirs
- $$(ECHO) " PP $$<"
- $$(Q)$($(ARCH)-cpp) -E $$(CPPFLAGS) $(BL_CPPFLAGS) $(TF_CFLAGS_$(ARCH)) -P -x assembler-with-cpp -D__LINKER__ $(MAKE_DEP) -o $$@ $$<
+ $$(s)echo " PP $$<"
+ $$(q)$($(ARCH)-cpp) -E $$(CPPFLAGS) $(BL_CPPFLAGS) $(TF_CFLAGS_$(ARCH)) -P -x assembler-with-cpp -D__LINKER__ $(MAKE_DEP) -o $$@ $$<
-include $(DEP)
@@ -466,8 +466,8 @@
all: ${LIB_DIR}/lib$(1).a
${LIB_DIR}/lib$(1).a: $(OBJS)
- $$(ECHO) " AR $$@"
- $$(Q)$($(ARCH)-ar) cr $$@ $$?
+ $$(s)echo " AR $$@"
+ $$(q)$($(ARCH)-ar) cr $$@ $$?
endef
# Generate the path to one or more preprocessed linker scripts given the paths
@@ -540,38 +540,38 @@
$(eval OBJS += $(MODULE_OBJS))
$(ELF): $(OBJS) $(DEFAULT_LINKER_SCRIPT) $(LINKER_SCRIPTS) | $(1)_dirs libraries $(BL_LIBS)
- $$(ECHO) " LD $$@"
+ $$(s)echo " LD $$@"
ifeq ($($(ARCH)-ld-id),arm-link)
- $$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) --entry=${1}_entrypoint \
+ $$(q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) --entry=${1}_entrypoint \
--predefine=$(call escape-shell,-D__LINKER__=$(__LINKER__)) \
--predefine=$(call escape-shell,-DTF_CFLAGS=$(TF_CFLAGS)) \
--map --list="$(MAPFILE)" --scatter=${PLAT_DIR}/scat/${1}.scat \
$(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS) $(OBJS)
else ifeq ($($(ARCH)-ld-id),gnu-gcc)
- $$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Wl,-Map=$(MAPFILE) \
+ $$(q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Wl,-Map=$(MAPFILE) \
$(addprefix -Wl$(comma)--script$(comma),$(LINKER_SCRIPTS)) -Wl,--script,$(DEFAULT_LINKER_SCRIPT) \
$(OBJS) $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS)
else
- $$(Q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Map=$(MAPFILE) \
+ $$(q)$($(ARCH)-ld) -o $$@ $$(TF_LDFLAGS) $$(LDFLAGS) $(BL_LDFLAGS) -Map=$(MAPFILE) \
$(addprefix -T ,$(LINKER_SCRIPTS)) --script $(DEFAULT_LINKER_SCRIPT) \
$(OBJS) $(LDPATHS) $(LIBWRAPPER) $(LDLIBS) $(BL_LIBS)
endif
ifeq ($(DISABLE_BIN_GENERATION),1)
- @${ECHO_BLANK_LINE}
- @echo "Built $$@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo
+ $(s)echo "Built $$@ successfully"
+ $(s)echo
endif
$(DUMP): $(ELF)
- $${ECHO} " OD $$@"
- $${Q}$($(ARCH)-od) -dx $$< > $$@
+ $$(s)echo " OD $$@"
+ $$(q)$($(ARCH)-od) -dx $$< > $$@
$(BIN): $(ELF)
- $${ECHO} " BIN $$@"
- $$(Q)$($(ARCH)-oc) -O binary $$< $$@
- @${ECHO_BLANK_LINE}
- @echo "Built $$@ successfully"
- @${ECHO_BLANK_LINE}
+ $$(s)echo " BIN $$@"
+ $$(q)$($(ARCH)-oc) -O binary $$< $$@
+ $(s)echo
+ $(s)echo "Built $$@ successfully"
+ $(s)echo
.PHONY: $(1)
ifeq ($(DISABLE_BIN_GENERATION),1)
@@ -629,13 +629,13 @@
$(eval DTBDEP := $(patsubst %.dtb,%.d,$(DOBJ)))
$(DPRE): $(2) | fdt_dirs
- $${ECHO} " CPP $$<"
+ $$(s)echo " CPP $$<"
$(eval DTBS := $(addprefix $(1)/,$(call SOURCES_TO_DTBS,$(2))))
- $$(Q)$($(ARCH)-cpp) -E $$(TF_CFLAGS_$(ARCH)) $$(DTC_CPPFLAGS) -MT $(DTBS) -MMD -MF $(DTSDEP) -o $(DPRE) $$<
+ $$(q)$($(ARCH)-cpp) -E $$(TF_CFLAGS_$(ARCH)) $$(DTC_CPPFLAGS) -MT $(DTBS) -MMD -MF $(DTSDEP) -o $(DPRE) $$<
$(DOBJ): $(DPRE) $(filter-out %.d,$(MAKEFILE_LIST)) | fdt_dirs
- $${ECHO} " DTC $$<"
- $$(Q)$($(ARCH)-dtc) $$(DTC_FLAGS) -d $(DTBDEP) -o $$@ $$<
+ $$(s)echo " DTC $$<"
+ $$(q)$($(ARCH)-dtc) $$(DTC_FLAGS) -d $(DTBDEP) -o $$@ $$<
-include $(DTBDEP)
-include $(DTSDEP)
diff --git a/make_helpers/common.mk b/make_helpers/common.mk
new file mode 100644
index 0000000..75d9f71
--- /dev/null
+++ b/make_helpers/common.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+ifndef common-mk
+ common-mk := $(lastword $(MAKEFILE_LIST))
+
+ include $(dir $(common-mk))utilities.mk
+
+ silent = $(call bool,$(findstring s,$(firstword ~$(MAKEFLAGS))))
+ verbose = $(if $(silent),,$(call bool,$(V)))
+
+ s = @$(if $(or $(verbose),$(silent)),: )
+ q = $(if $(verbose),,@)
+endif
diff --git a/make_helpers/defaults.mk b/make_helpers/defaults.mk
index a5c78ae..368d26d 100644
--- a/make_helpers/defaults.mk
+++ b/make_helpers/defaults.mk
@@ -294,9 +294,6 @@
# Use tbbr_oid.h instead of platform_oid.h
USE_TBBR_DEFS := 1
-# Build verbosity
-V := 0
-
# Whether to enable D-Cache early during warm boot. This is usually
# applicable for platforms wherein interconnect programming is not
# required to enable cache coherency after warm reset (eg: single cluster
diff --git a/make_helpers/unix.mk b/make_helpers/unix.mk
index 93e1fcc..4fd819a 100644
--- a/make_helpers/unix.mk
+++ b/make_helpers/unix.mk
@@ -9,9 +9,6 @@
ifndef UNIX_MK
UNIX_MK := $(lastword $(MAKEFILE_LIST))
- ECHO_BLANK_LINE := echo
- ECHO_QUIET := @\#
-
DIR_DELIM := /
PATH_SEP := :
@@ -21,24 +18,24 @@
# ${1} is the file to be copied.
# ${2} is the destination file name.
define SHELL_COPY
- ${Q}cp -f "${1}" "${2}"
+ $(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}"
+ $(q)cp -rf "${1}" "${2}"
endef
# ${1} is the file to be deleted.
define SHELL_DELETE
- -${Q}rm -f "${1}"
+ -$(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}
+ -$(q)rm -rf ${1}
endef
# ${1} is the directory to be generated.
@@ -48,13 +45,13 @@
ifneq (${1},${2})
${1} : ${2}
- ${Q}mkdir -p "${1}"
+ $(q)mkdir -p "${1}"
endif
endef
define SHELL_REMOVE_DIR
- -${Q}rm -rf "${1}"
+ -$(q)rm -rf "${1}"
endef
nul := /dev/null
diff --git a/make_helpers/windows.mk b/make_helpers/windows.mk
index de34eaf..2f5d51b 100644
--- a/make_helpers/windows.mk
+++ b/make_helpers/windows.mk
@@ -12,8 +12,6 @@
ifndef WINDOWS_MK
WINDOWS_MK := $(lastword $(MAKEFILE_LIST))
- ECHO_BLANK_LINE := @cmd /c echo.
- ECHO_QUIET := @rem
DIR_DELIM := $(strip \)
BIN_EXT := .exe
PATH_SEP := ;
diff --git a/plat/amlogic/axg/platform.mk b/plat/amlogic/axg/platform.mk
index 64b35d6..aadecab 100644
--- a/plat/amlogic/axg/platform.mk
+++ b/plat/amlogic/axg/platform.mk
@@ -85,10 +85,10 @@
distclean realclean clean: cleanimage
cleanimage:
- ${Q}${MAKE} -C ${DOIMAGEPATH} clean
+ $(q)${MAKE} -C ${DOIMAGEPATH} clean
${DOIMAGETOOL}:
- ${Q}${MAKE} -C ${DOIMAGEPATH}
+ $(q)${MAKE} -C ${DOIMAGEPATH}
${BUILD_PLAT}/bl31.img: ${BUILD_PLAT}/bl31.bin ${DOIMAGETOOL}
${DOIMAGETOOL} ${BUILD_PLAT}/bl31.bin ${BUILD_PLAT}/bl31.img
diff --git a/plat/amlogic/g12a/platform.mk b/plat/amlogic/g12a/platform.mk
index 799e106..15658d3 100644
--- a/plat/amlogic/g12a/platform.mk
+++ b/plat/amlogic/g12a/platform.mk
@@ -81,10 +81,10 @@
distclean realclean clean: cleanimage
cleanimage:
- ${Q}${MAKE} -C ${DOIMAGEPATH} clean
+ $(q)${MAKE} -C ${DOIMAGEPATH} clean
${DOIMAGETOOL}:
- ${Q}${MAKE} -C ${DOIMAGEPATH}
+ $(q)${MAKE} -C ${DOIMAGEPATH}
${BUILD_PLAT}/bl31.img: ${BUILD_PLAT}/bl31.bin ${DOIMAGETOOL}
${DOIMAGETOOL} ${BUILD_PLAT}/bl31.bin ${BUILD_PLAT}/bl31.img
diff --git a/plat/amlogic/gxl/platform.mk b/plat/amlogic/gxl/platform.mk
index 0a88482..31063a9 100644
--- a/plat/amlogic/gxl/platform.mk
+++ b/plat/amlogic/gxl/platform.mk
@@ -81,10 +81,10 @@
distclean realclean clean: cleanimage
cleanimage:
- ${Q}${MAKE} -C ${DOIMAGEPATH} clean
+ $(q)${MAKE} -C ${DOIMAGEPATH} clean
${DOIMAGETOOL}:
- ${Q}${MAKE} -C ${DOIMAGEPATH}
+ $(q)${MAKE} -C ${DOIMAGEPATH}
${BUILD_PLAT}/bl31.img: ${BUILD_PLAT}/bl31.bin ${DOIMAGETOOL}
${DOIMAGETOOL} ${BUILD_PLAT}/bl31.bin ${BUILD_PLAT}/bl31.img
diff --git a/plat/arm/board/arm_fpga/platform.mk b/plat/arm/board/arm_fpga/platform.mk
index 520a73a..cb78e35 100644
--- a/plat/arm/board/arm_fpga/platform.mk
+++ b/plat/arm/board/arm_fpga/platform.mk
@@ -134,7 +134,7 @@
endif
bl31.axf: bl31 dtbs ${BUILD_PLAT}/rom_trampoline.o ${BUILD_PLAT}/kernel_trampoline.o ${BUILD_PLAT}/build_axf.ld
- $(ECHO) " LD $@"
- $(Q)$($(ARCH)-ld) -T ${BUILD_PLAT}/build_axf.ld -L ${BUILD_PLAT} $(TF_LDFLAGS) $(PLAT_LDFLAGS) -s -n -o ${BUILD_PLAT}/bl31.axf
+ $(s)echo " LD $@"
+ $(q)$($(ARCH)-ld) -T ${BUILD_PLAT}/build_axf.ld -L ${BUILD_PLAT} $(TF_LDFLAGS) $(PLAT_LDFLAGS) -s -n -o ${BUILD_PLAT}/bl31.axf
all: bl31.axf
diff --git a/plat/arm/board/juno/platform.mk b/plat/arm/board/juno/platform.mk
index a00bf26..8eca0c5 100644
--- a/plat/arm/board/juno/platform.mk
+++ b/plat/arm/board/juno/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -134,7 +134,7 @@
endif
bl1_romlib.bin : $(BUILD_PLAT)/bl1.bin romlib.bin
- @echo "Building combined BL1 and ROMLIB binary for Juno $@"
+ $(s)echo "Building combined BL1 and ROMLIB binary for Juno $@"
./lib/romlib/gen_combined_bl1_romlib.sh -o bl1_romlib.bin $(BUILD_PLAT)
# Errata workarounds for Cortex-A53:
diff --git a/plat/hisilicon/hikey/platform.mk b/plat/hisilicon/hikey/platform.mk
index 807a915..63eca37 100644
--- a/plat/hisilicon/hikey/platform.mk
+++ b/plat/hisilicon/hikey/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -153,12 +153,12 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
diff --git a/plat/hisilicon/hikey960/platform.mk b/plat/hisilicon/hikey960/platform.mk
index fd11a4d..c2c3122 100644
--- a/plat/hisilicon/hikey960/platform.mk
+++ b/plat/hisilicon/hikey960/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -146,12 +146,12 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
diff --git a/plat/imx/imx7/common/imx7.mk b/plat/imx/imx7/common/imx7.mk
index 156c55d..950d8fd 100644
--- a/plat/imx/imx7/common/imx7.mk
+++ b/plat/imx/imx7/common/imx7.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -78,14 +78,14 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- @if [ ! -f $(ROT_KEY) ]; then \
+ $(s)echo " OPENSSL $@"
+ $(q)if [ ! -f $(ROT_KEY) ]; then \
${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null; \
fi
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
diff --git a/plat/imx/imx8m/imx8mm/platform.mk b/plat/imx/imx8m/imx8mm/platform.mk
index 3a87e44..40554c3 100644
--- a/plat/imx/imx8m/imx8mm/platform.mk
+++ b/plat/imx/imx8m/imx8mm/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2019-2023, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2019-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -134,14 +134,14 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- @if [ ! -f $(ROT_KEY) ]; then \
+ $(s)echo " OPENSSL $@"
+ $(q)if [ ! -f $(ROT_KEY) ]; then \
${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null; \
fi
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
diff --git a/plat/imx/imx8m/imx8mp/platform.mk b/plat/imx/imx8m/imx8mp/platform.mk
index 42dc781..5f4ddee 100644
--- a/plat/imx/imx8m/imx8mp/platform.mk
+++ b/plat/imx/imx8m/imx8mp/platform.mk
@@ -131,14 +131,14 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- @if [ ! -f $(ROT_KEY) ]; then \
+ $(s)echo " OPENSSL $@"
+ $(q)if [ ! -f $(ROT_KEY) ]; then \
${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null; \
fi
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
diff --git a/plat/marvell/armada/a3k/common/a3700_common.mk b/plat/marvell/armada/a3k/common/a3700_common.mk
index b9c28de..18f5430 100644
--- a/plat/marvell/armada/a3k/common/a3700_common.mk
+++ b/plat/marvell/armada/a3k/common/a3700_common.mk
@@ -150,90 +150,90 @@
$(if $(wildcard $(CRYPTOPP_LIBDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_LIB' was set to '$(CRYPTOPP_LIBDIR)', but '$(CRYPTOPP_LIBDIR)' does not exist"))
$(if $(wildcard $(CRYPTOPP_INCDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_INCDIR' was set to '$(CRYPTOPP_INCDIR)', but '$(CRYPTOPP_INCDIR)' does not exist"))
ifdef CRYPTOPP_PATH
- $(Q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile
+ $(q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile
endif
- $(Q)$(MAKE) --no-print-directory -C $(WTP)/wtptp/src/TBB_Linux -f TBB_linux.mak LIBDIR=$(CRYPTOPP_LIBDIR) INCDIR=$(CRYPTOPP_INCDIR)
+ $(q)$(MAKE) --no-print-directory -C $(WTP)/wtptp/src/TBB_Linux -f TBB_linux.mak LIBDIR=$(CRYPTOPP_LIBDIR) INCDIR=$(CRYPTOPP_INCDIR)
$(WTMI_MULTI_IMG): FORCE
- $(Q)$(MAKE) --no-print-directory -C $(WTP) WTMI_IMG=$(WTMI_IMG) DDR_TOPOLOGY=$(DDR_TOPOLOGY) CLOCKSPRESET=$(CLOCKSPRESET) WTMI
+ $(q)$(MAKE) --no-print-directory -C $(WTP) WTMI_IMG=$(WTMI_IMG) DDR_TOPOLOGY=$(DDR_TOPOLOGY) CLOCKSPRESET=$(CLOCKSPRESET) WTMI
$(BUILD_PLAT)/wtmi.bin: $(WTMI_MULTI_IMG)
- $(Q)cp -a $(WTMI_MULTI_IMG) $(BUILD_PLAT)/wtmi.bin
+ $(q)cp -a $(WTMI_MULTI_IMG) $(BUILD_PLAT)/wtmi.bin
$(TIMDDRTOOL): FORCE
# Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds
$(if $(value MV_DDR_PATH),,$(error "Platform '${PLAT}' for ddr tool requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
$(if $(wildcard $(value MV_DDR_PATH)/*),,$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' directory does not exist"))
$(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
- $(Q)$(MAKE) --no-print-directory -C $(WTP) MV_DDR_PATH=$(MV_DDR_PATH) DDR_TOPOLOGY=$(DDR_TOPOLOGY) mv_ddr
+ $(q)$(MAKE) --no-print-directory -C $(WTP) MV_DDR_PATH=$(MV_DDR_PATH) DDR_TOPOLOGY=$(DDR_TOPOLOGY) mv_ddr
$(BUILD_PLAT)/$(UART_IMAGE): $(BUILD_PLAT)/$(BOOT_IMAGE) $(BUILD_PLAT)/wtmi.bin $(TBB) $(TIMBUILD) $(TIMDDRTOOL)
- @$(ECHO_BLANK_LINE)
- @echo "Building uart images"
- $(Q)mkdir -p $(BUILD_PLAT)/$(BUILD_UART)
- $(Q)cp -a $(BUILD_PLAT)/wtmi.bin $(BUILD_PLAT)/$(BUILD_UART)/wtmi.bin
- $(Q)cp -a $(BUILD_PLAT)/$(BOOT_IMAGE) $(BUILD_PLAT)/$(BUILD_UART)/$(BOOT_IMAGE)
- $(Q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TIMBUILD) $(TIMBLDUARTARGS)
- $(Q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIM_UART_CFG)
- $(Q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIM_UART_CFG)
+ $(s)echo
+ $(s)echo "Building uart images"
+ $(q)mkdir -p $(BUILD_PLAT)/$(BUILD_UART)
+ $(q)cp -a $(BUILD_PLAT)/wtmi.bin $(BUILD_PLAT)/$(BUILD_UART)/wtmi.bin
+ $(q)cp -a $(BUILD_PLAT)/$(BOOT_IMAGE) $(BUILD_PLAT)/$(BUILD_UART)/$(BOOT_IMAGE)
+ $(q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TIMBUILD) $(TIMBLDUARTARGS)
+ $(q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIM_UART_CFG)
+ $(q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIM_UART_CFG)
ifeq ($(MARVELL_SECURE_BOOT),1)
- $(Q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIMN_UART_CFG)
- $(Q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIMN_UART_CFG)
+ $(q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIMN_UART_CFG)
+ $(q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIMN_UART_CFG)
endif
- $(Q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TBB) -r $(TIM_UART_CFG) -v -D
+ $(q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TBB) -r $(TIM_UART_CFG) -v -D
ifeq ($(MARVELL_SECURE_BOOT),1)
- $(Q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TBB) -r $(TIMN_UART_CFG)
+ $(q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TBB) -r $(TIMN_UART_CFG)
endif
- $(Q)tar czf $(BUILD_PLAT)/$(UART_IMAGE) -C $(BUILD_PLAT) $(UART_IMAGES)
- @$(ECHO_BLANK_LINE)
- @echo "Built $@ successfully"
- @$(ECHO_BLANK_LINE)
+ $(q)tar czf $(BUILD_PLAT)/$(UART_IMAGE) -C $(BUILD_PLAT) $(UART_IMAGES)
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
$(BUILD_PLAT)/$(FLASH_IMAGE): $(BUILD_PLAT)/$(BOOT_IMAGE) $(BUILD_PLAT)/wtmi.bin $(TBB) $(TIMBUILD) $(TIMDDRTOOL) $(TIM2IMG)
- @$(ECHO_BLANK_LINE)
- @echo "Building flash image"
- $(Q)cd $(BUILD_PLAT) && $(TIMBUILD) $(TIMBLDARGS)
- $(Q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIM_CFG)
- $(Q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIM_CFG)
+ $(s)echo
+ $(s)echo "Building flash image"
+ $(q)cd $(BUILD_PLAT) && $(TIMBUILD) $(TIMBLDARGS)
+ $(q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIM_CFG)
+ $(q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIM_CFG)
ifeq ($(MARVELL_SECURE_BOOT),1)
- $(Q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIMN_CFG)
- $(Q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIMN_CFG)
- @$(ECHO_BLANK_LINE)
- @echo "=======================================================";
- @echo " Secure boot. Encrypting wtmi and boot-image";
- @echo "=======================================================";
- @$(ECHO_BLANK_LINE)
- $(Q)cp $(BUILD_PLAT)/wtmi.bin $(BUILD_PLAT)/wtmi-align.bin
- $(Q)truncate -s %16 $(BUILD_PLAT)/wtmi-align.bin
- $(Q)${OPENSSL_BIN_PATH}/openssl enc -aes-256-cbc -e -in $(BUILD_PLAT)/wtmi-align.bin \
+ $(q)sed -i 's|WTMI_IMG|wtmi.bin|1' $(TIMN_CFG)
+ $(q)sed -i 's|BOOT_IMAGE|$(BOOT_IMAGE)|1' $(TIMN_CFG)
+ $(s)echo
+ $(s)echo "=======================================================";
+ $(s)echo " Secure boot. Encrypting wtmi and boot-image";
+ $(s)echo "=======================================================";
+ $(s)echo
+ $(q)cp $(BUILD_PLAT)/wtmi.bin $(BUILD_PLAT)/wtmi-align.bin
+ $(q)truncate -s %16 $(BUILD_PLAT)/wtmi-align.bin
+ $(q)${OPENSSL_BIN_PATH}/openssl enc -aes-256-cbc -e -in $(BUILD_PLAT)/wtmi-align.bin \
-out $(BUILD_PLAT)/$(WTMI_ENC_IMG) \
-K `cat $(IMAGESPATH)/aes-256.txt` -nosalt \
-iv `cat $(IMAGESPATH)/iv.txt` -p
- $(Q)truncate -s %16 $(BUILD_PLAT)/$(BOOT_IMAGE);
- $(Q)${OPENSSL_BIN_PATH}/openssl enc -aes-256-cbc -e -in $(BUILD_PLAT)/$(BOOT_IMAGE) \
+ $(q)truncate -s %16 $(BUILD_PLAT)/$(BOOT_IMAGE);
+ $(q)${OPENSSL_BIN_PATH}/openssl enc -aes-256-cbc -e -in $(BUILD_PLAT)/$(BOOT_IMAGE) \
-out $(BUILD_PLAT)/$(BOOT_ENC_IMAGE) \
-K `cat $(IMAGESPATH)/aes-256.txt` -nosalt \
-iv `cat $(IMAGESPATH)/iv.txt` -p
endif
- $(Q)cd $(BUILD_PLAT) && $(TBB) -r $(TIM_CFG) -v -D
+ $(q)cd $(BUILD_PLAT) && $(TBB) -r $(TIM_CFG) -v -D
ifeq ($(MARVELL_SECURE_BOOT),1)
- $(Q)cd $(BUILD_PLAT) && $(TBB) -r $(TIMN_CFG)
- $(Q)sed -i 's|wtmi.bin|$(WTMI_ENC_IMG)|1' $(TIMN_CFG)
- $(Q)sed -i 's|$(BOOT_IMAGE)|$(BOOT_ENC_IMAGE)|1' $(TIMN_CFG)
+ $(q)cd $(BUILD_PLAT) && $(TBB) -r $(TIMN_CFG)
+ $(q)sed -i 's|wtmi.bin|$(WTMI_ENC_IMG)|1' $(TIMN_CFG)
+ $(q)sed -i 's|$(BOOT_IMAGE)|$(BOOT_ENC_IMAGE)|1' $(TIMN_CFG)
endif
- $(Q)cd $(BUILD_PLAT) && $(TIM2IMG) $(TIM2IMGARGS) -o $(BUILD_PLAT)/$(FLASH_IMAGE)
- @$(ECHO_BLANK_LINE)
- @echo "Built $@ successfully"
- @$(ECHO_BLANK_LINE)
+ $(q)cd $(BUILD_PLAT) && $(TIM2IMG) $(TIM2IMGARGS) -o $(BUILD_PLAT)/$(FLASH_IMAGE)
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
clean realclean distclean: mrvl_clean
.PHONY: mrvl_clean
mrvl_clean:
- -$(Q)$(MAKE) --no-print-directory -C $(WTP) MV_DDR_PATH=$(MV_DDR_PATH) clean
- -$(Q)$(MAKE) --no-print-directory -C $(WTP)/wtptp/src/TBB_Linux -f TBB_linux.mak clean
+ -$(q)$(MAKE) --no-print-directory -C $(WTP) MV_DDR_PATH=$(MV_DDR_PATH) clean
+ -$(q)$(MAKE) --no-print-directory -C $(WTP)/wtptp/src/TBB_Linux -f TBB_linux.mak clean
ifdef CRYPTOPP_PATH
- -$(Q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile clean
+ -$(q)$(MAKE) --no-print-directory -C $(CRYPTOPP_PATH) -f GNUmakefile clean
endif
else # WTP
diff --git a/plat/marvell/armada/a8k/common/a8k_common.mk b/plat/marvell/armada/a8k/common/a8k_common.mk
index 4d8a87f..bdad8b5 100644
--- a/plat/marvell/armada/a8k/common/a8k_common.mk
+++ b/plat/marvell/armada/a8k/common/a8k_common.mk
@@ -176,17 +176,17 @@
.PHONY: mrvl_clean
mrvl_clean:
- @echo " Doimage CLEAN"
- ${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
+ $(s)echo " Doimage CLEAN"
+ $(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${DOIMAGEPATH} clean
${DOIMAGETOOL}: FORCE
- @$(DOIMAGE_LIBS_CHECK)
- ${Q}${MAKE} --no-print-directory -C ${DOIMAGEPATH}
+ $(q)$(DOIMAGE_LIBS_CHECK)
+ $(q)${MAKE} --no-print-directory -C ${DOIMAGEPATH}
${BUILD_PLAT}/${FLASH_IMAGE}: ${ROM_BIN_EXT} ${BUILD_PLAT}/${BOOT_IMAGE} ${DOIMAGETOOL}
- @${ECHO_BLANK_LINE}
- @echo "Building flash image"
- ${Q}${DOIMAGETOOL} ${DOIMAGE_FLAGS} ${BUILD_PLAT}/${BOOT_IMAGE} ${BUILD_PLAT}/${FLASH_IMAGE}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo
+ $(s)echo "Building flash image"
+ $(q)${DOIMAGETOOL} ${DOIMAGE_FLAGS} ${BUILD_PLAT}/${BOOT_IMAGE} ${BUILD_PLAT}/${FLASH_IMAGE}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
diff --git a/plat/marvell/armada/a8k/common/ble/ble.mk b/plat/marvell/armada/a8k/common/ble/ble.mk
index 752ab41..5ab6123 100644
--- a/plat/marvell/armada/a8k/common/ble/ble.mk
+++ b/plat/marvell/armada/a8k/common/ble/ble.mk
@@ -32,4 +32,4 @@
$(if $(value MV_DDR_PATH),,$(error "Platform '$(PLAT)' for BLE requires MV_DDR_PATH. Please set MV_DDR_PATH to point to the right directory"))
$(if $(wildcard $(value MV_DDR_PATH)/*),,$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' directory does not exist"))
$(if $(shell git -C $(value MV_DDR_PATH) rev-parse --show-cdup 2>&1),$(error "'MV_DDR_PATH=$(value MV_DDR_PATH)' was specified, but '$(value MV_DDR_PATH)' does not contain valid mv-ddr-marvell git repository"))
- @+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
+ $(q)+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(MV_DDR_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
diff --git a/plat/marvell/armada/common/marvell_common.mk b/plat/marvell/armada/common/marvell_common.mk
index f0e6edf..2561232 100644
--- a/plat/marvell/armada/common/marvell_common.mk
+++ b/plat/marvell/armada/common/marvell_common.mk
@@ -84,13 +84,13 @@
$(BUILD_PLAT)/$(BOOT_IMAGE): $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(FIP_NAME)
$(if $(shell find $(BUILD_PLAT)/bl1.bin -type f -size +128k),$(error "Image '$(BUILD_PLAT)/bl1.bin' is bigger than 128kB"))
- @cp $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
- @truncate -s %128K $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
- @cat $(BUILD_PLAT)/$(FIP_NAME) >> $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
- @truncate -s %4 $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
- @$(ECHO_BLANK_LINE)
- @echo "Built $@ successfully"
- @$(ECHO_BLANK_LINE)
+ $(q)cp $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
+ $(q)truncate -s %128K $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
+ $(q)cat $(BUILD_PLAT)/$(FIP_NAME) >> $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
+ $(q)truncate -s %4 $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
.PHONY: mrvl_bootimage
mrvl_bootimage: $(BUILD_PLAT)/$(BOOT_IMAGE)
diff --git a/plat/nxp/common/fip_handler/fuse_fip/fuse.mk b/plat/nxp/common/fip_handler/fuse_fip/fuse.mk
index 4e84d02..14ddefd 100644
--- a/plat/nxp/common/fip_handler/fuse_fip/fuse.mk
+++ b/plat/nxp/common/fip_handler/fuse_fip/fuse.mk
@@ -1,6 +1,6 @@
#
# Copyright 2018-2020 NXP
-# Copyright (c) 2023, Arm Limited. All rights reserved.
+# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -73,7 +73,7 @@
ifeq (${FUSE_PROV_FILE},)
else
${BUILD_PLAT}/${FUSE_PROV_FILE_SB}: ${FUSE_PROV_FILE}
- @echo " Generating CSF Header for $@ $<"
+ $(s)echo " Generating CSF Header for $@ $<"
$(CST_DIR)/create_hdr_esbc --in $< --out $@ --app_off ${CSF_HDR_SZ} \
--app $< ${FUSE_INPUT_FILE}
endif
@@ -81,7 +81,7 @@
ifeq (${FUSE_UP_FILE},)
else
${BUILD_PLAT}/${FUSE_UP_FILE_SB}: ${FUSE_UP_FILE}
- @echo " Generating CSF Header for $@ $<"
+ $(s)echo " Generating CSF Header for $@ $<"
$(CST_DIR)/create_hdr_esbc --in $< --out $@ --app_off ${CSF_HDR_SZ} \
--app $< ${FUSE_INPUT_FILE}
endif
@@ -94,6 +94,6 @@
endif
${FIPTOOL} create ${FUSE_FIP_ARGS} $@
${FIPTOOL} info $@
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
diff --git a/plat/nxp/common/tbbr/tbbr.mk b/plat/nxp/common/tbbr/tbbr.mk
index 4aac9d6..000e419 100644
--- a/plat/nxp/common/tbbr/tbbr.mk
+++ b/plat/nxp/common/tbbr/tbbr.mk
@@ -131,14 +131,14 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- @if [ ! -f $(ROT_KEY) ]; then \
+ $(s)echo " OPENSSL $@"
+ $(q)if [ ! -f $(ROT_KEY) ]; then \
${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null; \
fi
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif #MBEDTLS_DIR
diff --git a/plat/nxp/soc-lx2160a/ddr_fip.mk b/plat/nxp/soc-lx2160a/ddr_fip.mk
index f14a9e8..e717cbc 100644
--- a/plat/nxp/soc-lx2160a/ddr_fip.mk
+++ b/plat/nxp/soc-lx2160a/ddr_fip.mk
@@ -73,11 +73,11 @@
ifneq (${GENERATE_COT},0)
ddr_certificates: ${DDR_CRT_DEPS} ${CRTTOOL}
- ${Q}${CRTTOOL} ${DDR_CRT_ARGS}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @echo "DDR certificates can be found in ${BUILD_PLAT}"
- @${ECHO_BLANK_LINE}
+ $(q)${CRTTOOL} ${DDR_CRT_ARGS}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo "DDR certificates can be found in ${BUILD_PLAT}"
+ $(s)echo
endif
endif
endif
@@ -88,10 +88,10 @@
${BUILD_PLAT}/${DDR_FIP_NAME}: ${DDR_FIP_DEPS} ${FIPTOOL}
$(eval ${CHECK_DDR_FIP_CMD})
- ${Q}${FIPTOOL} create ${DDR_FIP_ARGS} $@
- ${Q}${FIPTOOL} info $@
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(q)${FIPTOOL} create ${DDR_FIP_ARGS} $@
+ $(q)${FIPTOOL} info $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
fip_ddr: ${BUILD_PLAT}/${DDR_FIP_NAME}
diff --git a/plat/nxp/soc-lx2160a/ddr_sb.mk b/plat/nxp/soc-lx2160a/ddr_sb.mk
index c11651e..119fc08 100644
--- a/plat/nxp/soc-lx2160a/ddr_sb.mk
+++ b/plat/nxp/soc-lx2160a/ddr_sb.mk
@@ -36,7 +36,7 @@
endif
%.sb: %
- @echo " Generating CSF Header for $@ $<"
+ $(s)echo " Generating CSF Header for $@ $<"
$(CST_DIR)/create_hdr_esbc --in $< --out $@ --app_off ${CSF_HDR_SZ} \
--app $< ${DDR_INPUT_FILE}
diff --git a/plat/qemu/qemu/platform.mk b/plat/qemu/qemu/platform.mk
index 436e425..066554a 100644
--- a/plat/qemu/qemu/platform.mk
+++ b/plat/qemu/qemu/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2023, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -79,12 +79,12 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
@@ -226,14 +226,14 @@
$(eval $(call add_define,ARM_PRELOADED_DTB_BASE))
qemu_fw.bios: bl1 fip
- $(ECHO) " DD $@"
- $(Q)cp ${BUILD_PLAT}/bl1.bin ${BUILD_PLAT}/$@
- $(Q)dd if=${BUILD_PLAT}/fip.bin of=${BUILD_PLAT}/$@ bs=64k seek=4 status=none
+ $(s)echo " DD $@"
+ $(q)cp ${BUILD_PLAT}/bl1.bin ${BUILD_PLAT}/$@
+ $(q)dd if=${BUILD_PLAT}/fip.bin of=${BUILD_PLAT}/$@ bs=64k seek=4 status=none
qemu_fw.rom: qemu_fw.bios
- $(ECHO) " DD $@"
- $(Q)cp ${BUILD_PLAT}/$^ ${BUILD_PLAT}/$@
- $(Q)dd if=/dev/zero of=${BUILD_PLAT}/$@ bs=1M seek=64 count=0 status=none
+ $(s)echo " DD $@"
+ $(q)cp ${BUILD_PLAT}/$^ ${BUILD_PLAT}/$@
+ $(q)dd if=/dev/zero of=${BUILD_PLAT}/$@ bs=1M seek=64 count=0 status=none
ifneq (${BL33},)
all: qemu_fw.bios qemu_fw.rom
diff --git a/plat/renesas/rcar/platform.mk b/plat/renesas/rcar/platform.mk
index 8e3f52e..4813949 100644
--- a/plat/renesas/rcar/platform.mk
+++ b/plat/renesas/rcar/platform.mk
@@ -351,13 +351,13 @@
LAYOUT_TOOLPATH ?= tools/renesas/rcar_layout_create
clean_layout_tool:
- @echo "clean layout tool"
- ${Q}${MAKE} -C ${LAYOUT_TOOLPATH} clean
+ $(s)echo "clean layout tool"
+ $(q)${MAKE} -C ${LAYOUT_TOOLPATH} clean
.PHONY: rcar_layout_tool
rcar_layout_tool:
- @echo "generating layout srecs"
- ${Q}${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH}
+ $(s)echo "generating layout srecs"
+ $(q)${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH}
# srecords
SREC_PATH = ${BUILD_PLAT}
@@ -365,16 +365,16 @@
BL31_ELF_SRC = ${SREC_PATH}/bl31/bl31.elf
clean_srecord:
- @echo "clean bl2 and bl31 srecs"
+ $(s)echo "clean bl2 and bl31 srecs"
rm -f ${SREC_PATH}/bl2.srec ${SREC_PATH}/bl31.srec
$(SREC_PATH)/bl2.srec: $(BL2_ELF_SRC)
- @echo "generating srec: $(SREC_PATH)/bl2.srec"
- $(Q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL2_ELF_SRC) $(SREC_PATH)/bl2.srec
+ $(s)echo "generating srec: $(SREC_PATH)/bl2.srec"
+ $(q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL2_ELF_SRC) $(SREC_PATH)/bl2.srec
$(SREC_PATH)/bl31.srec: $(BL31_ELF_SRC)
- @echo "generating srec: $(SREC_PATH)/bl31.srec"
- $(Q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL31_ELF_SRC) $(SREC_PATH)/bl31.srec
+ $(s)echo "generating srec: $(SREC_PATH)/bl31.srec"
+ $(q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL31_ELF_SRC) $(SREC_PATH)/bl31.srec
.PHONY: rcar_srecord
rcar_srecord: $(SREC_PATH)/bl2.srec $(SREC_PATH)/bl31.srec
diff --git a/plat/renesas/rzg/platform.mk b/plat/renesas/rzg/platform.mk
index 354eada..5da6052 100644
--- a/plat/renesas/rzg/platform.mk
+++ b/plat/renesas/rzg/platform.mk
@@ -249,13 +249,13 @@
LAYOUT_TOOLPATH ?= tools/renesas/rzg_layout_create
clean_layout_tool:
- @echo "clean layout tool"
- ${Q}${MAKE} -C ${LAYOUT_TOOLPATH} clean
+ $(s)echo "clean layout tool"
+ $(q)${MAKE} -C ${LAYOUT_TOOLPATH} clean
.PHONY: rzg_layout_create
rzg_layout_create:
- @echo "generating layout srecs"
- ${Q}${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH}
+ $(s)echo "generating layout srecs"
+ $(q)${MAKE} CPPFLAGS="-D=AARCH64" --no-print-directory -C ${LAYOUT_TOOLPATH}
# srecords
SREC_PATH = ${BUILD_PLAT}
@@ -263,16 +263,16 @@
BL31_ELF_SRC = ${SREC_PATH}/bl31/bl31.elf
clean_srecord:
- @echo "clean bl2 and bl31 srecs"
+ $(s)echo "clean bl2 and bl31 srecs"
rm -f ${SREC_PATH}/bl2.srec ${SREC_PATH}/bl31.srec
$(SREC_PATH)/bl2.srec: $(BL2_ELF_SRC)
- @echo "generating srec: $(SREC_PATH)/bl2.srec"
- $(Q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL2_ELF_SRC) $(SREC_PATH)/bl2.srec
+ $(s)echo "generating srec: $(SREC_PATH)/bl2.srec"
+ $(q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL2_ELF_SRC) $(SREC_PATH)/bl2.srec
$(SREC_PATH)/bl31.srec: $(BL31_ELF_SRC)
- @echo "generating srec: $(SREC_PATH)/bl31.srec"
- $(Q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL31_ELF_SRC) $(SREC_PATH)/bl31.srec
+ $(s)echo "generating srec: $(SREC_PATH)/bl31.srec"
+ $(q)$($(ARCH)-oc) -O srec --srec-forceS3 $(BL31_ELF_SRC) $(SREC_PATH)/bl31.srec
.PHONY: rzg_srecord
rzg_srecord: $(SREC_PATH)/bl2.srec $(SREC_PATH)/bl31.srec
diff --git a/plat/rockchip/rk3399/drivers/m0/Makefile b/plat/rockchip/rk3399/drivers/m0/Makefile
index 2abcc18..e742591 100644
--- a/plat/rockchip/rk3399/drivers/m0/Makefile
+++ b/plat/rockchip/rk3399/drivers/m0/Makefile
@@ -6,6 +6,7 @@
toolchains := rk3399-m0
+include ../../../../../make_helpers/common.mk
include ../../../../../make_helpers/toolchain.mk
# Cross Compile
@@ -18,13 +19,6 @@
PLAT_M0 ?= rk3399m0
PLAT_M0_PMU ?= rk3399m0pmu
-ifeq (${V},0)
- Q=@
-else
- Q=
-endif
-export Q
-
.SUFFIXES:
INCLUDES += -Iinclude/ \
@@ -71,16 +65,16 @@
-include $(patsubst %.o,%.d,$(OBJ))
$(OBJ) : $(2)
- @echo " CC $$<"
- $$(Q)$(rk3399-m0-cc) $$(COMMON_FLAGS) $$(CFLAGS) $$(INCLUDES) -MMD -MT $$@ -c $$< -o $$@
+ $(s)echo " CC $$<"
+ $$(q)$(rk3399-m0-cc) $$(COMMON_FLAGS) $$(CFLAGS) $$(INCLUDES) -MMD -MT $$@ -c $$< -o $$@
endef
define MAKE_S
$(eval OBJ := $(1)/$(patsubst %.S,%.o,$(notdir $(2))))
$(OBJ) : $(2)
- @echo " AS $$<"
- $$(Q)$(rk3399-m0-cc) -x assembler-with-cpp $$(COMMON_FLAGS) $$(ASFLAGS) -c $$< -o $$@
+ $(s)echo " AS $$<"
+ $$(q)$(rk3399-m0-cc) -x assembler-with-cpp $$(COMMON_FLAGS) $$(ASFLAGS) -c $$< -o $$@
endef
define MAKE_OBJS
@@ -105,16 +99,16 @@
-include $(LINKERFILE).d
$(ELF) : $(OBJS) $(OBJS_COMMON) $(LINKERFILE)
- @echo " LD $@"
- $(Q)$(rk3399-m0-cc) -o $@ $(COMMON_FLAGS) $(LDFLAGS) -Wl,-Map=$(MAPFILE) -Wl,-T$(LINKERFILE) $(OBJS) $(OBJS_COMMON)
+ $(s)echo " LD $@"
+ $(q)$(rk3399-m0-cc) -o $@ $(COMMON_FLAGS) $(LDFLAGS) -Wl,-Map=$(MAPFILE) -Wl,-T$(LINKERFILE) $(OBJS) $(OBJS_COMMON)
%.bin : %.elf
- @echo " BIN $@"
- $(Q)$(rk3399-m0-oc) -O binary $< $@
+ $(s)echo " BIN $@"
+ $(q)$(rk3399-m0-oc) -O binary $< $@
$(ELF_PMU) : $(OBJS_COMMON) $(OBJS_PMU) $(LINKERFILE)
- @echo " LD $@"
- $(Q)$(rk3399-m0-cc) -o $@ $(COMMON_FLAGS) $(LDFLAGS) -Wl,-Map=$(MAPFILE_PMU) -Wl,-T$(LINKERFILE) $(OBJS_PMU) $(OBJS_COMMON)
+ $(s)echo " LD $@"
+ $(q)$(rk3399-m0-cc) -o $@ $(COMMON_FLAGS) $(LDFLAGS) -Wl,-Map=$(MAPFILE_PMU) -Wl,-T$(LINKERFILE) $(OBJS_PMU) $(OBJS_COMMON)
$(eval $(call MAKE_OBJS,$(BUILD),$(SOURCES_COMMON),$(1)))
$(eval $(call MAKE_OBJS,$(BUILD),$(SOURCES),$(1)))
diff --git a/plat/rpi/rpi3/platform.mk b/plat/rpi/rpi3/platform.mk
index 8034fa4..eaaff7d 100644
--- a/plat/rpi/rpi3/platform.mk
+++ b/plat/rpi/rpi3/platform.mk
@@ -73,13 +73,13 @@
# This target concatenates BL1 and the FIP so that the base addresses match the
# ones defined in the memory map
armstub: bl1 fip
- @echo " CAT $@"
- ${Q}cp ${BUILD_PLAT}/bl1.bin ${RPI3_BL1_PAD_BIN}
- ${Q}truncate --size=131072 ${RPI3_BL1_PAD_BIN}
- ${Q}cat ${RPI3_BL1_PAD_BIN} ${BUILD_PLAT}/fip.bin > ${RPI3_ARMSTUB8_BIN}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " CAT $@"
+ $(q)cp ${BUILD_PLAT}/bl1.bin ${RPI3_BL1_PAD_BIN}
+ $(q)truncate --size=131072 ${RPI3_BL1_PAD_BIN}
+ $(q)cat ${RPI3_BL1_PAD_BIN} ${BUILD_PLAT}/fip.bin > ${RPI3_ARMSTUB8_BIN}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
# Build config flags
# ------------------
@@ -213,11 +213,11 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
diff --git a/plat/socionext/synquacer/platform.mk b/plat/socionext/synquacer/platform.mk
index a6d9bef..a5ab4f7 100644
--- a/plat/socionext/synquacer/platform.mk
+++ b/plat/socionext/synquacer/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2018-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -72,12 +72,12 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif # TRUSTED_BOARD_BOOT
diff --git a/plat/socionext/uniphier/platform.mk b/plat/socionext/uniphier/platform.mk
index d466aa1..ebb9b8c 100644
--- a/plat/socionext/uniphier/platform.mk
+++ b/plat/socionext/uniphier/platform.mk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2017-2024, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -106,12 +106,12 @@
certificates: $(ROT_KEY)
$(ROT_KEY): | $(BUILD_PLAT)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null
$(ROTPK_HASH): $(ROT_KEY)
- @echo " OPENSSL $@"
- $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
+ $(s)echo " OPENSSL $@"
+ $(q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\
${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null
endif
@@ -136,5 +136,5 @@
.PHONY: bl2_gzip
bl2_gzip: $(BUILD_PLAT)/bl2.bin.gz
%.gz: %
- @echo " GZIP $@"
- $(Q)gzip -n -f -9 $< --stdout > $@
+ $(s)echo " GZIP $@"
+ $(q)gzip -n -f -9 $< --stdout > $@
diff --git a/plat/st/common/common_rules.mk b/plat/st/common/common_rules.mk
index 212a67d..8b81c7f 100644
--- a/plat/st/common/common_rules.mk
+++ b/plat/st/common/common_rules.mk
@@ -15,7 +15,7 @@
bl2: check_boot_device
check_boot_device:
- @if [ ${STM32MP_EMMC} != 1 ] && \
+ $(q)if [ ${STM32MP_EMMC} != 1 ] && \
[ ${STM32MP_SDMMC} != 1 ] && \
[ ${STM32MP_RAW_NAND} != 1 ] && \
[ ${STM32MP_SPI_NAND} != 1 ] && \
@@ -29,55 +29,55 @@
stm32image: ${STM32IMAGE}
${STM32IMAGE}: ${STM32IMAGE_SRC}
- ${Q}${MAKE} CPPFLAGS="" --no-print-directory -C ${STM32IMAGEPATH}
+ $(q)${MAKE} CPPFLAGS="" --no-print-directory -C ${STM32IMAGEPATH}
clean_stm32image:
- ${Q}${MAKE} --no-print-directory -C ${STM32IMAGEPATH} clean
+ $(q)${MAKE} --no-print-directory -C ${STM32IMAGEPATH} clean
check_dtc_version:
- @if [ ${DTC_VERSION} -lt 10407 ]; then \
+ $(q)if [ ${DTC_VERSION} -lt 10407 ]; then \
echo "dtc version too old (${DTC_V}), you need at least version 1.4.7"; \
false; \
fi
# Create DTB file for BL2
${BUILD_PLAT}/fdts/%-bl2.dts: fdts/%.dts fdts/${BL2_DTSI} | ${BUILD_PLAT} fdt_dirs
- @echo '#include "$(patsubst fdts/%,%,$<)"' > $@
- @echo '#include "${BL2_DTSI}"' >> $@
+ $(q)echo '#include "$(patsubst fdts/%,%,$<)"' > $@
+ $(q)echo '#include "${BL2_DTSI}"' >> $@
${BUILD_PLAT}/fdts/%-bl2.dtb: ${BUILD_PLAT}/fdts/%-bl2.dts
${BUILD_PLAT}/$(PLAT)-%.o: ${BUILD_PLAT}/fdts/%-bl2.dtb $(STM32_BINARY_MAPPING) bl2
- @echo " AS $${PLAT}.S"
- ${Q}$($(ARCH)-as) -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) ${ASFLAGS} ${TF_CFLAGS} \
+ $(s)echo " AS $${PLAT}.S"
+ $(q)$($(ARCH)-as) -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) ${ASFLAGS} ${TF_CFLAGS} \
-DDTB_BIN_PATH=\"$<\" \
-c $(word 2,$^) -o $@
$(eval $(call MAKE_LD,${STM32_TF_LINKERFILE},$(STM32_LD_FILE),bl2))
tf-a-%.elf: $(PLAT)-%.o ${STM32_TF_LINKERFILE}
- @echo " LDS $<"
+ $(s)echo " LDS $<"
ifeq ($($(ARCH)-ld-id),gnu-gcc)
- ${Q}$($(ARCH)-ld) -o $@ $(subst --,-Wl$(comma)--,${STM32_TF_ELF_LDFLAGS}) -nostartfiles -Wl,-Map=$(@:.elf=.map) -Wl,-dT ${STM32_TF_LINKERFILE} $<
+ $(q)$($(ARCH)-ld) -o $@ $(subst --,-Wl$(comma)--,${STM32_TF_ELF_LDFLAGS}) -nostartfiles -Wl,-Map=$(@:.elf=.map) -Wl,-dT ${STM32_TF_LINKERFILE} $<
else
- ${Q}$($(ARCH)-ld) -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $<
+ $(q)$($(ARCH)-ld) -o $@ ${STM32_TF_ELF_LDFLAGS} -Map=$(@:.elf=.map) --script ${STM32_TF_LINKERFILE} $<
endif
tf-a-%.bin: tf-a-%.elf
- ${Q}$($(ARCH)-oc) -O binary $< $@
- @echo
- @echo "Built $@ successfully"
- @echo
+ $(q)$($(ARCH)-oc) -O binary $< $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
tf-a-%.stm32: tf-a-%.bin ${STM32_DEPS}
- @echo
- @echo "Generate $@"
+ $(s)echo
+ $(s)echo "Generate $@"
$(eval LOADADDR = $(shell cat $(@:.stm32=.map) | grep '^RAM' | awk '{print $$2}'))
$(eval ENTRY = $(shell cat $(@:.stm32=.map) | grep "__BL2_IMAGE_START" | awk '{print $$1}'))
- ${Q}${STM32IMAGE} -s $< -d $@ \
+ $(q)${STM32IMAGE} -s $< -d $@ \
-l $(LOADADDR) -e ${ENTRY} \
-v ${STM32_TF_VERSION} \
-m ${STM32_HEADER_VERSION_MAJOR} \
-n ${STM32_HEADER_VERSION_MINOR} \
-b ${STM32_HEADER_BL2_BINARY_TYPE}
- @echo
+ $(s)echo
diff --git a/plat/st/stm32mp1/cert_create_tbbr.mk b/plat/st/stm32mp1/cert_create_tbbr.mk
index e747e39..fb9e5ec 100644
--- a/plat/st/stm32mp1/cert_create_tbbr.mk
+++ b/plat/st/stm32mp1/cert_create_tbbr.mk
@@ -11,7 +11,7 @@
PLAT_INCLUDE += -I${PLAT_DIR}include
src/stm32mp1_tbb_cert.o: ${PLAT_DIR}stm32mp1_tbb_cert.c
- ${Q}$(host-cc) -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@
+ $(q)$(host-cc) -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@
PLAT_OBJECTS = src/stm32mp1_tbb_cert.o
diff --git a/plat/st/stm32mp1/platform.mk b/plat/st/stm32mp1/platform.mk
index c411edf..a5217d2 100644
--- a/plat/st/stm32mp1/platform.mk
+++ b/plat/st/stm32mp1/platform.mk
@@ -275,8 +275,8 @@
ifeq ($(AARCH32_SP),sp_min)
# Create DTB file for BL32
${BUILD_PLAT}/fdts/%-bl32.dts: fdts/%.dts fdts/${BL32_DTSI} | ${BUILD_PLAT} fdt_dirs
- @echo '#include "$(patsubst fdts/%,%,$<)"' > $@
- @echo '#include "${BL32_DTSI}"' >> $@
+ $(q)echo '#include "$(patsubst fdts/%,%,$<)"' > $@
+ $(q)echo '#include "${BL32_DTSI}"' >> $@
${BUILD_PLAT}/fdts/%-bl32.dtb: ${BUILD_PLAT}/fdts/%-bl32.dts
endif
diff --git a/tools/amlogic/Makefile b/tools/amlogic/Makefile
index 5ff26e5..7a53437 100644
--- a/tools/amlogic/Makefile
+++ b/tools/amlogic/Makefile
@@ -10,11 +10,11 @@
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}
OBJECTS := doimage.o
-V := 0
HOSTCCFLAGS := -Wall -Werror -pedantic -std=c99 -D_GNU_SOURCE
@@ -24,26 +24,20 @@
HOSTCCFLAGS += -O2
endif
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
-
.PHONY: all clean distclean
all: ${PROJECT}
${PROJECT}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- ${Q}$(host-cc) ${OBJECTS} -o $@
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " HOSTLD $@"
+ $(q)$(host-cc) ${OBJECTS} -o $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
%.o: %.c Makefile
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${HOSTCCFLAGS} $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${HOSTCCFLAGS} $< -o $@
clean:
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS})
diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile
index 21523f6..7670939 100644
--- a/tools/cert_create/Makefile
+++ b/tools/cert_create/Makefile
@@ -5,7 +5,6 @@
#
PLAT := none
-V ?= 0
DEBUG := 0
CRTTOOL ?= cert_create${BIN_EXT}
BINARY := $(notdir ${CRTTOOL})
@@ -16,6 +15,7 @@
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
@@ -60,12 +60,6 @@
HOSTCCFLAGS += -O2 -DLOG_LEVEL=20
endif
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
-
HOSTCCFLAGS += ${DEFINES}
# USING_OPENSSL3 flag will be added to the HOSTCCFLAGS variable with the proper
# computed value.
@@ -89,19 +83,19 @@
all: --openssl ${BINARY}
${BINARY}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- @echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
+ $(s)echo " HOSTLD $@"
+ $(q)echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__; \
const char platform_msg[] = "${PLAT_MSG}";' | \
$(host-cc) -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o
- ${Q}$(host-cc) src/build_msg.o ${OBJECTS} ${LIB_DIR} ${LIB} -o $@
+ $(q)$(host-cc) src/build_msg.o ${OBJECTS} ${LIB_DIR} ${LIB} -o $@
%.o: %.c
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@
--openssl:
ifeq ($(DEBUG),1)
- @echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}"
+ $(s)echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}"
endif
clean:
diff --git a/tools/encrypt_fw/Makefile b/tools/encrypt_fw/Makefile
index 83f2f57..21309f7 100644
--- a/tools/encrypt_fw/Makefile
+++ b/tools/encrypt_fw/Makefile
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: BSD-3-Clause
#
-V ?= 0
BUILD_INFO ?= 1
DEBUG := 0
ENCTOOL ?= encrypt_fw${BIN_EXT}
@@ -16,6 +15,7 @@
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
@@ -38,11 +38,6 @@
HOSTCCFLAGS += -O2 -DLOG_LEVEL=10
endif
endif
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
HOSTCCFLAGS += ${DEFINES}
# USING_OPENSSL3 flag will be added to the HOSTCCFLAGS variable with the proper
@@ -68,18 +63,18 @@
all: --openssl ${BINARY}
${BINARY}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- @echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
+ $(s)echo " HOSTLD $@"
+ $(q)echo 'const char build_msg[] = "Built : "__TIME__", "__DATE__;' | \
$(host-cc) -c ${HOSTCCFLAGS} -xc - -o src/build_msg.o
- ${Q}$(host-cc) src/build_msg.o ${OBJECTS} ${LIB_DIR} ${LIB} -o $@
+ $(q)$(host-cc) src/build_msg.o ${OBJECTS} ${LIB_DIR} ${LIB} -o $@
%.o: %.c
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${HOSTCCFLAGS} ${INC_DIR} $< -o $@
--openssl:
ifeq ($(DEBUG),1)
- @echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}"
+ $(s)echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}"
endif
clean:
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
index 865ff4c..23c8e64 100644
--- a/tools/fiptool/Makefile
+++ b/tools/fiptool/Makefile
@@ -9,13 +9,13 @@
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}
PROJECT := $(notdir ${FIPTOOL})
OBJECTS := fiptool.o tbbr_config.o
-V ?= 0
STATIC ?= 0
override CPPFLAGS += -D_GNU_SOURCE -D_XOPEN_SOURCE=700
@@ -55,12 +55,6 @@
HOSTCCFLAGS += ${DEFINES}
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
-
ifneq (${PLAT},)
TF_PLATFORM_ROOT := ../../plat/
include ${MAKE_HELPERS_DIRECTORY}plat_helpers.mk
@@ -81,22 +75,22 @@
all: --openssl ${PROJECT}
${PROJECT}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- ${Q}$(host-cc) ${OBJECTS} -o $@ $(LDOPTS)
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " HOSTLD $@"
+ $(q)$(host-cc) ${OBJECTS} -o $@ $(LDOPTS)
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
%.o: %.c Makefile
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${CPPFLAGS} ${HOSTCCFLAGS} ${INCLUDE_PATHS} -MD -MP $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${CPPFLAGS} ${HOSTCCFLAGS} ${INCLUDE_PATHS} -MD -MP $< -o $@
-include $(DEPS)
--openssl:
ifeq ($(STATIC),0)
ifeq ($(DEBUG),1)
- @echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}"
+ $(s)echo "Selected OpenSSL version: ${OPENSSL_CURRENT_VER}"
endif
endif # STATIC
diff --git a/tools/marvell/doimage/Makefile b/tools/marvell/doimage/Makefile
index 6e59aa2..488b768 100644
--- a/tools/marvell/doimage/Makefile
+++ b/tools/marvell/doimage/Makefile
@@ -6,6 +6,7 @@
toolchains := host
+include ../../../make_helpers/common.mk
include ../../../make_helpers/toolchain.mk
PROJECT = doimage
@@ -36,16 +37,16 @@
all: ${PROJECT}
${PROJECT}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- ${Q}$(host-cc) ${OBJECTS} ${DOIMAGE_LD_FLAGS} -o $@
- @echo
- @echo "Built $@ successfully"
- @echo
+ $(s)echo " HOSTLD $@"
+ $(q)$(host-cc) ${OBJECTS} ${DOIMAGE_LD_FLAGS} -o $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
%.o: %.c Makefile
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
clean:
- ${Q}${RM} ${PROJECT}
- ${Q}${RM} ${OBJECTS}
+ $(q)${RM} ${PROJECT}
+ $(q)${RM} ${OBJECTS}
diff --git a/tools/nxp/create_pbl/Makefile b/tools/nxp/create_pbl/Makefile
index b6b3b04..7648b7f 100644
--- a/tools/nxp/create_pbl/Makefile
+++ b/tools/nxp/create_pbl/Makefile
@@ -9,13 +9,13 @@
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}
OBJECTS_1 := create_pbl.o
PROJECT_2 := byte_swap${BIN_EXT}
OBJECTS_2 := byte_swap.o
-V ?= 0
override CPPFLAGS += -D_GNU_SOURCE -D_XOPEN_SOURCE=700
CFLAGS := -Wall -Werror -pedantic -std=c99
@@ -26,12 +26,6 @@
endif
LDLIBS :=
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
-
INCLUDE_PATHS :=
.PHONY: all clean distclean
@@ -39,22 +33,22 @@
all: create_pbl byte_swap
${PROJECT_1}: ${OBJECTS_1} Makefile
- @echo " LD $@"
- ${Q}$(host-cc) ${OBJECTS_1} -o $@ ${LDLIBS}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " LD $@"
+ $(q)$(host-cc) ${OBJECTS_1} -o $@ ${LDLIBS}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
${PROJECT_2}: ${OBJECTS_2} Makefile
- @echo " LD $@"
- ${Q}$(host-cc) ${OBJECTS_2} -o $@ ${LDLIBS}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " LD $@"
+ $(q)$(host-cc) ${OBJECTS_2} -o $@ ${LDLIBS}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
%.o: %.c %.h Makefile
- @echo " CC $<"
- ${Q}$(host-cc) -c ${CPPFLAGS} ${CFLAGS} ${INCLUDE_PATHS} $< -o $@
+ $(s)echo " CC $<"
+ $(q)$(host-cc) -c ${CPPFLAGS} ${CFLAGS} ${INCLUDE_PATHS} $< -o $@
clean:
$(call SHELL_DELETE_ALL, ${PROJECT_1} ${OBJECTS_1})
diff --git a/tools/nxp/create_pbl/pbl_ch2.mk b/tools/nxp/create_pbl/pbl_ch2.mk
index e6f1d8b..bf05a12 100644
--- a/tools/nxp/create_pbl/pbl_ch2.mk
+++ b/tools/nxp/create_pbl/pbl_ch2.mk
@@ -15,12 +15,12 @@
ifeq ($(SECURE_BOOT),yes)
pbl: ${BUILD_PLAT}/bl2.bin
ifeq ($(RCW),"")
- ${Q}echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
+ $(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}
+ $(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};\
+ $(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 ;\
@@ -31,7 +31,7 @@
# Swapping of RCW is required for QSPi Chassis 2 devices
ifeq (${BOOT_MODE}, qspi)
ifeq ($(SWAP),1)
- ${Q}echo "Byteswapping RCW for QSPI"
+ $(s)echo "Byteswapping RCW for QSPI"
${BYTE_SWAP} ${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl;
endif # SWAP
endif # BOOT_MODE
@@ -39,22 +39,19 @@
endif
else # NON SECURE_BOOT
ifeq ($(RCW),"")
- ${Q}echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
+ $(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};
+ $(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)
- ${Q}echo "Byteswapping RCW for QSPI"
+ $(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
-
-
-
diff --git a/tools/nxp/create_pbl/pbl_ch3.mk b/tools/nxp/create_pbl/pbl_ch3.mk
index 9283474..15129e4 100644
--- a/tools/nxp/create_pbl/pbl_ch3.mk
+++ b/tools/nxp/create_pbl/pbl_ch3.mk
@@ -21,13 +21,13 @@
ifeq ($(SECURE_BOOT),yes)
pbl: ${BUILD_PLAT}/bl2.bin
ifeq ($(RCW),"")
- ${Q}echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
+ $(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}
+ $(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};\
+ $(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};\
# Add Block Copy command for 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}\
@@ -39,14 +39,14 @@
-o ${BUILD_PLAT}/rcw_sec.pbl
# Sign and add "Load Security Header command to PBI commands
- $(Q)$(CST_DIR)/create_hdr_pbi --out ${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl --in ${BUILD_PLAT}/rcw_sec.pbl ${PBI_INPUT_FILE}
+ $(q)$(CST_DIR)/create_hdr_pbi --out ${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl --in ${BUILD_PLAT}/rcw_sec.pbl ${PBI_INPUT_FILE}
# Append the bl2_hdr to the RCW image
- @echo "${bl2_hdr_loc}"
+ $(s)echo "${bl2_hdr_loc}"
dd if=${BUILD_PLAT}/hdr_bl2 of=${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl bs=1K seek=${bl2_hdr_loc}
# Append the bl2.bin to the RCW image
- @echo "${bl2_loc}"
+ $(s)echo "${bl2_loc}"
dd if=${BUILD_PLAT}/bl2.bin of=${BUILD_PLAT}/bl2_${BOOT_MODE}_sec.pbl bs=1K seek=${bl2_loc}
rm ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl
@@ -54,16 +54,16 @@
endif
else #SECURE_BOOT
ifeq ($(RCW),"")
- ${Q}echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
+ $(s)echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
else
- ${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
+ $(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
# Add Block Copy command and populate boot loc ptrfor 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 -f ${BL2_SRC_OFFSET};
# Append the bl2.bin to the RCW image
- @echo "bl2_loc is ${bl2_loc} KB"
+ $(s)echo "bl2_loc is ${bl2_loc} KB"
dd if=${BUILD_PLAT}/bl2.bin of=${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl bs=1K seek=${bl2_loc}
cd ${CREATE_PBL_TOOL_PATH}; ${MAKE} clean ; cd -;
diff --git a/tools/renesas/rcar_layout_create/makefile b/tools/renesas/rcar_layout_create/makefile
index 919c1de..8c2c054 100644
--- a/tools/renesas/rcar_layout_create/makefile
+++ b/tools/renesas/rcar_layout_create/makefile
@@ -6,6 +6,7 @@
toolchains := aarch64
+include ../../../make_helpers/common.mk
include ../../../make_helpers/toolchain.mk
###################################################
diff --git a/tools/renesas/rzg_layout_create/makefile b/tools/renesas/rzg_layout_create/makefile
index e1c242d..d2a54ea 100644
--- a/tools/renesas/rzg_layout_create/makefile
+++ b/tools/renesas/rzg_layout_create/makefile
@@ -6,6 +6,7 @@
toolchains := aarch64
+include ../../../make_helpers/common.mk
include ../../../make_helpers/toolchain.mk
###################################################
diff --git a/tools/sptool/Makefile b/tools/sptool/Makefile
index a913ce5..e336a0c 100644
--- a/tools/sptool/Makefile
+++ b/tools/sptool/Makefile
@@ -9,12 +9,12 @@
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}
PROJECT := $(notdir ${SPTOOL})
OBJECTS := sptool.o
-V ?= 0
override CPPFLAGS += -D_GNU_SOURCE -D_XOPEN_SOURCE=700
HOSTCCFLAGS := -Wall -Werror -pedantic -std=c99
@@ -24,12 +24,6 @@
HOSTCCFLAGS += -O2
endif
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
-
INCLUDE_PATHS := -I../../include/tools_share
.PHONY: all clean distclean
@@ -37,15 +31,15 @@
all: ${PROJECT}
${PROJECT}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- ${Q}$(host-cc) ${OBJECTS} -o $@ ${LDLIBS}
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " HOSTLD $@"
+ $(q)$(host-cc) ${OBJECTS} -o $@ ${LDLIBS}
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
%.o: %.c Makefile
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${CPPFLAGS} ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${CPPFLAGS} ${HOSTCCFLAGS} ${INCLUDE_PATHS} $< -o $@
clean:
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS})
diff --git a/tools/stm32image/Makefile b/tools/stm32image/Makefile
index c75e941..2b34ef8 100644
--- a/tools/stm32image/Makefile
+++ b/tools/stm32image/Makefile
@@ -9,11 +9,11 @@
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}
OBJECTS := stm32image.o
-V := 0
HOSTCCFLAGS := -Wall -Werror -pedantic -std=c99 -D_GNU_SOURCE
@@ -23,26 +23,20 @@
HOSTCCFLAGS += -O2
endif
-ifeq (${V},0)
- Q := @
-else
- Q :=
-endif
-
.PHONY: all clean distclean
all: ${PROJECT}
${PROJECT}: ${OBJECTS} Makefile
- @echo " HOSTLD $@"
- ${Q}$(host-cc) ${OBJECTS} -o $@
- @${ECHO_BLANK_LINE}
- @echo "Built $@ successfully"
- @${ECHO_BLANK_LINE}
+ $(s)echo " HOSTLD $@"
+ $(q)$(host-cc) ${OBJECTS} -o $@
+ $(s)echo
+ $(s)echo "Built $@ successfully"
+ $(s)echo
%.o: %.c Makefile
- @echo " HOSTCC $<"
- ${Q}$(host-cc) -c ${HOSTCCFLAGS} $< -o $@
+ $(s)echo " HOSTCC $<"
+ $(q)$(host-cc) -c ${HOSTCCFLAGS} $< -o $@
clean:
$(call SHELL_DELETE_ALL, ${PROJECT} ${OBJECTS})