libpayload: Install vboot headers and add include paths to lpgcc

Hardware / Coreboot - Jakub Czapiga [semihalf.com] - 15 January 2022 00:22 UTC

New CBFS API uses commonlib/bsd/cbfs_serialized.h, which includes
vboot's vb2_sha.h. And, because vboot's includes are not available in libpayload's installation directory nor in lpgcc paths, it was causing compilation errors. This patch fixes this issue.

lpgcc will look for `vboot` directory like it is doing for `include` directory to create correct paths. However, if payload will be built using libpayload's build dir as a base, then vboot headers from 3rdparty/vboot will be used, as there is no way to pass VBOOT_SOURCE from makefile to lpgcc.

Moreover, this patch moves VBOOT_SOURCE to the main Makefile to make it available for installation target, to install headers from
vboot directory provided by caller.

Change-Id: I68dd7e1545cfcaf24547d8a9fe289447c79da222

395f5b3129 libpayload: Install vboot headers and add include paths to lpgcc
payloads/libpayload/Makefile | 1 +
payloads/libpayload/Makefile.inc | 9 +++++++++
payloads/libpayload/bin/lp.functions | 6 ++++++
payloads/libpayload/bin/lpgcc | 3 +++
payloads/libpayload/vboot/Makefile.inc | 2 --
5 files changed, 19 insertions(+), 2 deletions(-)

Upstream: review.coreboot.org


  • Share