fvp: separate Measured Boot and fTPM config
The Measured Boot option not only enables the relevant config options
for TF-A and optee_os, but also building the fTPM TA and its Linux
driver. This is unnecessary when the consumer of the Event Log is not
fTPM but e.g. the PSA Attestation SP (as introduced in the next commit).
This commit modifies the MEASURED_BOOT option to only set the TF-A and
optee_os config, and adds the MEASURED_BOOT_FTPM option for the fTPM
related components. To keep backwards compatibility if MEASURED_BOOT is
selected, by default MEASURED_BOOT_FTPM is enabled too.
Reviewed-by: Gyorgy Szing <gyorgy.szing@arm.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
diff --git a/fvp.mk b/fvp.mk
index 42a7f3d..ebdcfdb 100644
--- a/fvp.mk
+++ b/fvp.mk
@@ -72,8 +72,15 @@
BOOT_IMG ?= $(OUT_PATH)/boot-fat.uefi.img
FTPM_PATH ?= $(ROOT)/ms-tpm-20-ref/Samples/ARM32-FirmwareTPM/optee_ta
-# Build ancillary components to access fTPM if Measured Boot is enabled.
ifeq ($(MEASURED_BOOT),y)
+# By default enable FTPM for backwards compatibility.
+MEASURED_BOOT_FTPM ?= y
+else
+$(call force,MEASURED_BOOT_FTPM,n,requires MEASURED_BOOT enabled)
+endif
+
+# Build ancillary components to access fTPM if Measured Boot is enabled.
+ifeq ($(MEASURED_BOOT_FTPM),y)
DEFCONFIG_FTPM ?= --br-defconfig build/br-ext/configs/ftpm_optee
DEFCONFIG_TPM_MODULE ?= --br-defconfig build/br-ext/configs/linux_ftpm
DEFCONFIG_TSS ?= --br-defconfig build/br-ext/configs/tss
@@ -186,7 +193,7 @@
.PHONY: linux-ftpm-module
linux-ftpm-module: linux
-ifeq ($(MEASURED_BOOT),y)
+ifeq ($(MEASURED_BOOT_FTPM),y)
linux-ftpm-module:
$(MAKE) -C $(LINUX_PATH) $(LINUX_COMMON_FLAGS) M=drivers/char/tpm \
modules_install INSTALL_MOD_PATH=$(LINUX_PATH)