TBB: add support to include certificates in a FIP image

This patch extends the FIP tool to include the certificates
generated by the 'cert_create' tool.

If GENERATE_COT build option is enabled, the Makefile adds the
certificates as dependencies to create the FIP file. Thus, make
target 'fip' will also build the certificates as part of the
Trusted Firmware build process.

Change-Id: I5eee500da7f7be6cfb6e3df0423599739d260074
diff --git a/Makefile b/Makefile
index 777e330..b5db629 100644
--- a/Makefile
+++ b/Makefile
@@ -286,6 +286,9 @@
 ifneq (${GENERATE_COT},0)
     $(eval CERTS := yes)
 
+    $(eval FIP_DEPS += certificates)
+    $(eval FIP_ARGS += --trusted-key-cert ${TRUSTED_KEY_CERT})
+
     ifneq (${CREATE_KEYS},0)
         $(eval CRT_ARGS += -n)
     endif
@@ -449,6 +452,8 @@
 
 $(eval FIP_DEPS += $(if $3,$(2),))
 $(eval FIP_ARGS += $(if $3,--bl$(1) $(2),))
+$(eval FIP_ARGS += $(if $4,--bl$(1)-cert $(BUILD_PLAT)/bl$(1).crt))
+$(eval FIP_ARGS += $(if $4,$(if $5,--bl$(1)-key-cert $(BUILD_PLAT)/bl$(1)_key.crt)))
 
 $(eval CRT_DEPS += $(if $4,$(2),))
 $(eval CRT_DEPS += $(if $4,$(if $6,$(6),)))