summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/Makefile1
-rw-r--r--payloads/libpayload/Makefile.inc9
-rw-r--r--payloads/libpayload/bin/lp.functions6
-rwxr-xr-xpayloads/libpayload/bin/lpgcc3
-rw-r--r--payloads/libpayload/vboot/Makefile.inc2
5 files changed, 19 insertions, 2 deletions
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index 2014cd4ec9..0104a11fbc 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -45,6 +45,7 @@ export obj ?= build
export objutil ?= $(obj)/util
export objk := $(objutil)/lp_kconfig
export absobj := $(abspath $(obj))
+VBOOT_SOURCE ?= $(coreboottop)/3rdparty/vboot
export KCONFIG_AUTOHEADER := $(obj)/config.h
export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc
index ac7bb81715..c540bb7dbc 100644
--- a/payloads/libpayload/Makefile.inc
+++ b/payloads/libpayload/Makefile.inc
@@ -131,6 +131,15 @@ install: real-target
$(foreach item,$(includes), \
install -m 755 -d $(DESTDIR)/libpayload/include/$(call extract_nth,2,$(item)); \
install -m 644 $(call extract_nth,1,$(item)) $(DESTDIR)/libpayload/include/$(call extract_nth,2,$(item)); )
+ printf " INSTALL $(DESTDIR)/libpayload/vboot\n"
+ install -m 755 -d $(DESTDIR)/libpayload/vboot
+ for file in `find $(VBOOT_SOURCE)/firmware/include \
+ $(VBOOT_SOURCE)/firmware/2lib/include \
+ -iname '*.h' -type f \
+ | sed 's,$(VBOOT_SOURCE)/firmware/,,'`; do \
+ install -m 755 -d $(DESTDIR)/libpayload/vboot/$$(dirname $$file); \
+ install -m 644 $(VBOOT_SOURCE)/firmware/$$file $(DESTDIR)/libpayload/vboot/$$file ; \
+ done
printf " INSTALL $(DESTDIR)/libpayload/bin\n"
install -m 755 -d $(DESTDIR)/libpayload/bin
install -m 755 bin/lpgcc $(DESTDIR)/libpayload/bin
diff --git a/payloads/libpayload/bin/lp.functions b/payloads/libpayload/bin/lp.functions
index fd26956243..d641e69991 100644
--- a/payloads/libpayload/bin/lp.functions
+++ b/payloads/libpayload/bin/lp.functions
@@ -63,3 +63,9 @@ if [ -d $BASE/../include ]; then
else
_INCDIR=$LIBPAYLOAD_PREFIX/include
fi
+
+if [ -d $BASE/../vboot ]; then
+ _VBOOTINCDIR=$BASE/../vboot/include
+else
+ _VBOOTINCDIR=$LIBPAYLOAD_PREFIX/../vboot/include
+fi
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index a0b736b5e3..2ad9ef525a 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -169,6 +169,9 @@ if [ $_LIBDIR = $_OBJ ]; then
fi
_CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/bsd/include"
+ _CFLAGS="$_CFLAGS -I$BASE/../../../3rdparty/vboot/firmware/include"
+else
+ _CFLAGS="$_CFLAGS -I$_VBOOTINCDIR"
fi
# Check for the -fno-stack-protector silliness
diff --git a/payloads/libpayload/vboot/Makefile.inc b/payloads/libpayload/vboot/Makefile.inc
index 8289f63945..9e9e90bcdd 100644
--- a/payloads/libpayload/vboot/Makefile.inc
+++ b/payloads/libpayload/vboot/Makefile.inc
@@ -1,7 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
-VBOOT_SOURCE ?= $(coreboottop)/3rdparty/vboot
-
VBOOT_BUILD_DIR ?= $(abspath $(obj)/external/vboot)
VBOOT_FW_LIB = $(VBOOT_BUILD_DIR)/vboot_fw.a
TLCL_LIB = $(VBOOT_BUILD_DIR)/tlcl.a