From f19e461f4f9704ed10b218813c68b611c75cf8e0 Mon Sep 17 00:00:00 2001 From: Karthikeyan Ramasubramanian Date: Tue, 20 Sep 2022 18:59:43 -0600 Subject: [PATCH] lib/metadata_hash: Include metadata_hash in verstage On boards where vboot starts before bootblock, build metadata_hash in verstage. This will allow to enable CBFS verification for such platforms. BUG=b:227809919 TEST=Build and boot to OS in Skyrim with CBFS verification enabled using x86 verstage and PSP verstage. Change-Id: I4269069b66ed66c7b1a47fdef2fd0a8054b2e6a1 Signed-off-by: Karthikeyan Ramasubramanian Reviewed-on: https://review.coreboot.org/c/coreboot/+/68134 Reviewed-by: Julius Werner Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/lib/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 8cd01ad02d..1c7bc22c1e 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -50,7 +50,11 @@ bootblock-y += prog_ops.c bootblock-y += cbfs.c bootblock-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c bootblock-y += libgcc.c +ifneq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) bootblock-$(CONFIG_CBFS_VERIFICATION) += metadata_hash.c +else # ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) +verstage-$(CONFIG_CBFS_VERIFICATION) += metadata_hash.c +endif # ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) bootblock-$(CONFIG_GENERIC_UDELAY) += timer.c bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c