diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-02-10 09:31:34 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-10 15:45:52 -0800 |
commit | e10691fa7caacb3dc90f62180ad5d0146c6f08d0 (patch) | |
tree | 95673c9bf7090bbeacdc5bd424519c359e516fca /board | |
parent | 3d2ad2985aa16081cd6110482173d4f8d8297059 (diff) | |
download | chrome-ec-e10691fa7caacb3dc90f62180ad5d0146c6f08d0.tar.gz |
cr50: remove RO dependency on tpm2
The RO image is now required to be signed following a cumbersome
procedure. It turns out that it is rebuilt even if the underlying
source files do not change. The reason being that it depends on tpm2
library and even includes it during linking (without actually linking
anything in), this was done to simplify the makefile.
This patch decouples the RO image from the tpm2 library, as a result
the RO image is not rebuilt every time make runs.
BRANCH=none
BUG=chrome-os-partner:49950
TEST=ran several times the following commands:
$ rm -rf build/cr50 && make BOARD=cr50 -j
there is no race conditions, the library is built in time.
- verified that running 'make' the second time does not cause the RO
image to be rebuilt any more.
Change-Id: Idbf84f6ac01e1a6d3da363489b8fc74fd5a54da5
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/327192
Diffstat (limited to 'board')
-rw-r--r-- | board/cr50/build.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/cr50/build.mk b/board/cr50/build.mk index 9960700996..18683292ac 100644 --- a/board/cr50/build.mk +++ b/board/cr50/build.mk @@ -42,7 +42,6 @@ board-y += tpm2/trng.o # Build and link with an external library EXTLIB := $(realpath ../../third_party/tpm2) CFLAGS += -I$(EXTLIB) -LDFLAGS_EXTRA += -L$(out)/tpm2 -ltpm2 # For the benefit of the tpm2 library. INCLUDE_ROOT := $(abspath ./include) @@ -61,9 +60,10 @@ CFLAGS += -DUSER_MIN_HASH_STATE_SIZE=210 CFLAGS += -DEMBEDDED_MODE=1 # Add dependencies on that library -$(out)/RO/ec.RO.elf: $(out)/tpm2/libtpm2.a -$(out)/RW/ec.RW.elf: $(out)/tpm2/libtpm2.a -$(out)/RW/ec.RW_B.elf: $(out)/tpm2/libtpm2.a +$(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: LDFLAGS_EXTRA += -L$(out)/tpm2 -ltpm2 +$(out)/RW/ec.RW.elf $(out)/RW/ec.RW_B.elf: $(out)/tpm2/libtpm2.a + +#$(out)/RW/ec.RW_B.elf: $(out)/tpm2/libtpm2.a LDFLAGS_EXTRA += -L$(out)/tpm2 -ltpm2 # Force the external build each time, so it can look for changed sources. .PHONY: $(out)/tpm2/libtpm2.a |