security/vboot/Makefile.mk: Fix building vboot lib with OpenSIL

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 <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89114
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Michał Żygowski 2025-09-09 10:20:58 +02:00 committed by Yu-Ping Wu
commit 3e0457e087

View file

@ -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.