Commit 036e9c17 authored by Lauren Wehrmeister's avatar Lauren Wehrmeister Committed by TrustedFirmware Code Review
Browse files

Merge changes I635cf82e,Iee3b4e0d into integration

* changes:
  Makefile: Fix ${FIP_NAME} to be rebuilt only when needed
  Makefile: Do not mark file targets as .PHONY target
parents 009553fc 4727fd13
......@@ -1245,8 +1245,7 @@ checkpatch: locate-checkpatch
certtool: ${CRTTOOL}
.PHONY: ${CRTTOOL}
${CRTTOOL}:
${CRTTOOL}: FORCE
${Q}${MAKE} PLAT=${PLAT} USE_TBBR_DEFS=${USE_TBBR_DEFS} COT=${COT} OPENSSL_DIR=${OPENSSL_DIR} CRTTOOL=${CRTTOOL} --no-print-directory -C ${CRTTOOLPATH}
@${ECHO_BLANK_LINE}
@echo "Built $@ successfully"
......@@ -1262,6 +1261,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL}
endif
${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL}
$(eval ${CHECK_FIP_CMD})
${Q}${FIPTOOL} create ${FIP_ARGS} $@
${Q}${FIPTOOL} info $@
@${ECHO_BLANK_LINE}
......@@ -1278,6 +1278,7 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTTOOL}
endif
${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}
......@@ -1288,8 +1289,7 @@ fiptool: ${FIPTOOL}
fip: ${BUILD_PLAT}/${FIP_NAME}
fwu_fip: ${BUILD_PLAT}/${FWU_FIP_NAME}
.PHONY: ${FIPTOOL}
${FIPTOOL}:
${FIPTOOL}: FORCE
@${ECHO_BLANK_LINE}
@echo "Building $@"
ifdef UNIX_MK
......@@ -1302,12 +1302,10 @@ endif
@${ECHO_BLANK_LINE}
sptool: ${SPTOOL}
.PHONY: ${SPTOOL}
${SPTOOL}:
${SPTOOL}: FORCE
${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" SPTOOL=${SPTOOL} --no-print-directory -C ${SPTOOLPATH}
.PHONY: libraries
romlib.bin: libraries
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='${INCLUDES}' DEFINES='${DEFINES}' --no-print-directory -C ${ROMLIBPATH} all
# Call print_memory_map tool
......@@ -1320,8 +1318,7 @@ doc:
enctool: ${ENCTOOL}
.PHONY: ${ENCTOOL}
${ENCTOOL}:
${ENCTOOL}: FORCE
${Q}${MAKE} PLAT=${PLAT} BUILD_INFO=0 OPENSSL_DIR=${OPENSSL_DIR} ENCTOOL=${ENCTOOL} --no-print-directory -C ${ENCTOOLPATH}
@${ECHO_BLANK_LINE}
@echo "Built $@ successfully"
......@@ -1375,3 +1372,6 @@ help:
@echo ""
@echo "example: build all targets for the FVP platform:"
@echo " CROSS_COMPILE=aarch64-none-elf- make PLAT=fvp all"
.PHONY: FORCE
FORCE:;
......@@ -214,21 +214,28 @@ define TOOL_ADD_IMG
# This is the uppercase form of the first parameter
$(eval _V := $(call uppercase,$(1)))
# $(check_$(1)_cmd) variable is executed in the check_$(1) target and also
# is put into the ${CHECK_$(3)FIP_CMD} variable which is executed by the
# target ${BUILD_PLAT}/${$(3)FIP_NAME}.
$(eval check_$(1)_cmd := \
$(if $(value $(_V)),,$$$$(error "Platform '${PLAT}' requires $(_V). Please set $(_V) to point to the right file")) \
$(if $(wildcard $(value $(_V))),,$$$$(error '$(_V)=$(value $(_V))' was specified, but '$(value $(_V))' does not exist)) \
)
$(3)CRT_DEPS += check_$(1)
$(3)FIP_DEPS += check_$(1)
CHECK_$(3)FIP_CMD += $$(check_$(1)_cmd)
ifeq ($(4),1)
$(eval ENC_BIN := ${BUILD_PLAT}/$(1)_enc.bin)
$(call ENCRYPT_FW,$(value $(_V)),$(ENC_BIN))
$(call TOOL_ADD_IMG_PAYLOAD,$(1),$(value $(_V)),$(2),$(ENC_BIN),$(3), \
$(ENC_BIN))
else
$(call TOOL_ADD_IMG_PAYLOAD,$(1),$(value $(_V)),$(2),,$(3))
$(call TOOL_ADD_IMG_PAYLOAD,$(1),$(value $(_V)),$(2),$(if $(wildcard $(value $(_V))),$(value $(_V)),FORCE),$(3))
endif
.PHONY: check_$(1)
check_$(1):
$$(if $(value $(_V)),,$$(error "Platform '${PLAT}' requires $(_V). Please set $(_V) to point to the right file"))
$$(if $(wildcard $(value $(_V))),,$$(error '$(_V)=$(value $(_V))' was specified, but '$(value $(_V))' does not exist))
$(check_$(1)_cmd)
endef
################################################################################
......
......@@ -41,7 +41,6 @@ $(eval $(call add_define,ARM_ROTPK_LOCATION_ID))
# Force generation of the new hash if ROT_KEY is specified
ifdef ROT_KEY
HASH_PREREQUISITES = $(ROT_KEY) FORCE
FORCE:
else
HASH_PREREQUISITES = $(ROT_KEY)
endif
......
......@@ -212,6 +212,3 @@ mrvl_flash:
$(error "Platform '${PLAT}' for target '$@' requires WTP. Please set WTP to point to the right directory")
endif # WTP
.PHONY: FORCE
FORCE:;
......@@ -166,6 +166,3 @@ ${DOIMAGETOOL}: FORCE
.PHONY: mrvl_flash
mrvl_flash: ${BUILD_PLAT}/${BOOT_IMAGE} ${DOIMAGETOOL}
${DOIMAGETOOL} ${DOIMAGE_FLAGS} ${BUILD_PLAT}/${BOOT_IMAGE} ${BUILD_PLAT}/${FLASH_IMAGE}
.PHONY: FORCE
FORCE:;
......@@ -26,7 +26,5 @@ PLAT_INCLUDES += -I$(MV_DDR_PATH) \
BLE_LINKERFILE := $(BLE_PATH)/ble.ld.S
FORCE:
$(MV_DDR_LIB): FORCE
@+make -C $(MV_DDR_PATH) --no-print-directory PLAT_INCLUDES="$(PLAT_INCLUDES)" PLATFORM=$(PLAT) ARCH=AARCH64 OBJ_DIR=$(BUILD_PLAT)/ble
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment