From 535b549047a069b26788cfe2e8bf6128fb57196b Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 3 Feb 2018 12:57:38 +0100 Subject: [PATCH] tegra210: add a config for wrapping the bootblock as bct default to yes, but let mainboards overwrite it --- src/soc/nvidia/tegra210/Kconfig | 4 ++++ src/soc/nvidia/tegra210/Makefile.inc | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/soc/nvidia/tegra210/Kconfig b/src/soc/nvidia/tegra210/Kconfig index c7c1cf0a7a..f5ad0369eb 100644 --- a/src/soc/nvidia/tegra210/Kconfig +++ b/src/soc/nvidia/tegra210/Kconfig @@ -17,6 +17,10 @@ config SOC_NVIDIA_TEGRA210 if SOC_NVIDIA_TEGRA210 +config BOOTBLOCK_WRAP_BCT + bool + default y + config VBOOT select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE diff --git a/src/soc/nvidia/tegra210/Makefile.inc b/src/soc/nvidia/tegra210/Makefile.inc index a2b50c96c2..8eb097764c 100644 --- a/src/soc/nvidia/tegra210/Makefile.inc +++ b/src/soc/nvidia/tegra210/Makefile.inc @@ -101,6 +101,7 @@ rmodules_arm-y += monotonic_timer.c CPPFLAGS_common += -Isrc/soc/nvidia/tegra210/include/ +ifeq ($(CONFIG_BOOTBLOCK_WRAP_BCT),y) # We want to grab the bootblock right before it goes into the image and wrap # it inside a BCT, but ideally we would do that without making special, one # use modifications to the main ARM Makefile. We do this in two ways. First, @@ -130,6 +131,7 @@ $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin $(BCT_BIN) echo "BootLoader = $<,$(call loadaddr,bootblock),$(call loadaddr,bootblock),Complete;" >> $(BCT_WRAPPER) @printf " CBOOTIMAGE $(subst $(obj)/,,$(@))\n" $(CBOOTIMAGE) $(CBOOTIMAGE_OPTS) $(BCT_WRAPPER) $@ +endif # We need to ensure that TZ memory has enough space to hold TTB and resident EL3 # components (including BL31 and Secure OS)