From 3e0457e087ec38aeb3ba18b2704e1c5abe502f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Tue, 9 Sep 2025 10:20:58 +0200 Subject: [PATCH] security/vboot/Makefile.mk: Fix building vboot lib with OpenSIL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the board uses OpenSIL, the OpenSIL include paths already include the $(top). Vboot patches the paths so that all of them include $(top) at the beginning. This however would result in the include paths from OpenSIL to include $(top) twice. Filter the paths that already contain the $(top) and strip the prefix. Then add the $(top) prefix again to all include paths to fix the problem. TEST=Build vboot lib selected by enabled measured boot on Gigabyte MZ33-AR1. Change-Id: Id67ea760f7b1ee2212f19a875c905771cdecdfa5 Signed-off-by: Michał Żygowski Reviewed-on: https://review.coreboot.org/c/coreboot/+/89114 Reviewed-by: Yu-Ping Wu Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) --- src/security/vboot/Makefile.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/security/vboot/Makefile.mk b/src/security/vboot/Makefile.mk index e9b3eb69f1..eb75975d04 100644 --- a/src/security/vboot/Makefile.mk +++ b/src/security/vboot/Makefile.mk @@ -9,8 +9,9 @@ ramstage-y += vboot_lib.c postcar-y += vboot_lib.c vboot-fixup-includes = $(patsubst -I%,-I$(top)/%,\ + $(patsubst -I$(top)/%,-I%,\ $(patsubst $(src)/%.h,$(top)/$(src)/%.h,\ - $(filter-out -I$(obj),$(1)))) + $(filter-out -I$(obj),$(1))))) # call with $1 = stage name to create rules for building the library # for the stage and adding it to the stage's set of object files.