diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2020-03-09 10:58:37 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-03-23 08:34:23 +0000 |
commit | 0beddb5e237f23c59399b1c93f25230a6eab3372 (patch) | |
tree | 134f91e5b6d26dbefc9d2a79d42bbb2fb385a5ef /util/cbfstool/Makefile | |
parent | b3884dc59b3f84091136fbff0b8a790e1a4b91f3 (diff) |
cbfstool: Build vboot library
Currently cbfstool cherry-picks a few files from vboot and hopes these
files will work standalone without any dependencies. This is pretty
brittle (for example, CL:2084062 will break it), and could be improved
by building the whole vboot library and then linking against it.
Therefore, this patch creates a new target $(VBOOT_HOSTLIB) and includes
it as a dependency for cbfstool and ifittool.
To prevent building the vboot lib twice (one for cbfstool and the other
for futility) when building coreboot tools together, add the variable
'VBOOT_BUILD' in Makefile to define a shared build path among different
tools so that vboot files don't need to be recompiled.
Also ignore *.o.d and *.a for vboot library.
BRANCH=none
BUG=none
TEST=make -C util/cbfstool
TEST=make -C util/futility
TEST=Run 'make tools' and make sure common files such as 2sha1.c are
compiled only once
TEST=emerge-nami coreboot-utils
Change-Id: Ifc826896d895f53d69ea559a88f75672c2ec3146
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39390
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/Makefile')
-rw-r--r-- | util/cbfstool/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile index d5321f6959..5251b2d872 100644 --- a/util/cbfstool/Makefile +++ b/util/cbfstool/Makefile @@ -10,6 +10,7 @@ INSTALL ?= /usr/bin/env install OBJCOPY ?= objcopy VBOOT_SOURCE ?= $(top)/3rdparty/vboot +VBOOT_HOST_BUILD ?= $(abspath $(objutil)/vboot_lib) .PHONY: all all: cbfstool ifittool fmaptool rmodtool ifwitool cbfs-compression-tool @@ -35,6 +36,7 @@ clean: $(RM) $(objutil)/cbfstool/ifwitool $(ifwiobj) $(RM) $(objutil)/cbfstool/ifittool $(ifitobj) $(RM) $(objutil)/cbfstool/cbfs-compression-tool $(cbfscompobj) + $(RM) -r $(VBOOT_HOST_BUILD) linux_trampoline.c: linux_trampoline.S rm -f linux_trampoline.c |