libpayload: Make GPL commonlib includes available to payloads and tests
CB:77968 made some non-BSD commonlib files part of libpayload when CONFIG_LP_GPL is set. This patch exports those headers to the payload (again only when CONFIG_LP_GPL is set) so that payloads can also call the functions in them directly. Also make those includes available to tests so that their functions can be tested. There's no menuconfig for unit tests, so they are included unconditionally, but this should be fine since the tests are standalone and won't have to link with any proprietary third-party code. Change-Id: Ifc3e52ee5c3e51520f7b7d44b483bfcb0e8380f8 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81287 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
This commit is contained in:
committed by
Martin L Roth
parent
614fb7a51c
commit
c00c14077d
@ -133,6 +133,10 @@ install: real-target
|
||||
find include -type f -exec install -m644 {} $(DESTDIR)/libpayload/{} \;
|
||||
cd $(coreboottop)/src/commonlib/bsd && find include -type d -exec install -m755 -d $(abspath $(DESTDIR))/libpayload/{} \;
|
||||
cd $(coreboottop)/src/commonlib/bsd && find include -type f -exec install -m644 {} $(abspath $(DESTDIR))/libpayload/{} \;
|
||||
ifeq ($(CONFIG_LP_GPL),y)
|
||||
cd $(coreboottop)/src/commonlib && find include -type d -exec install -m755 -d $(abspath $(DESTDIR))/libpayload/{} \;
|
||||
cd $(coreboottop)/src/commonlib && find include -type f -exec install -m644 {} $(abspath $(DESTDIR))/libpayload/{} \;
|
||||
endif
|
||||
install -m 644 $(obj)/libpayload-config.h $(DESTDIR)/libpayload/include
|
||||
$(foreach item,$(includes), \
|
||||
install -m 755 -d $(DESTDIR)/libpayload/include/$(call extract_nth,2,$(item)); \
|
||||
|
@ -170,6 +170,9 @@ if [ $_LIBDIR = $_OBJ ]; then
|
||||
|
||||
_CFLAGS="$_CFLAGS -include $BASE/../../../src/commonlib/bsd/include/commonlib/bsd/compiler.h"
|
||||
_CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/bsd/include"
|
||||
if [ "$CONFIG_LP_GPL" = y ]; then
|
||||
_CFLAGS="$_CFLAGS -I$BASE/../../../src/commonlib/include"
|
||||
fi
|
||||
_CFLAGS="$_CFLAGS -I$BASE/../../../3rdparty/vboot/firmware/include"
|
||||
else
|
||||
_CFLAGS="$_CFLAGS -include $BASE/../include/commonlib/bsd/compiler.h"
|
||||
|
@ -34,6 +34,7 @@ TEST_CFLAGS := -include include/kconfig.h
|
||||
TEST_CFLAGS += -include $(coreboottop)/src/commonlib/bsd/include/commonlib/bsd/compiler.h
|
||||
TEST_CFLAGS += -Iinclude -Iinclude/mock
|
||||
TEST_CFLAGS += -I$(coreboottop)/src/commonlib/bsd/include
|
||||
TEST_CFLAGS += -I$(coreboottop)/src/commonlib/include
|
||||
TEST_CFLAGS += -I$(dir $(TEST_KCONFIG_AUTOHEADER))
|
||||
TEST_CFLAGS += -I$(VBOOT_SOURCE)/firmware/include
|
||||
|
||||
|
Reference in New Issue
Block a user