Skip to content

Commit f8ec206

Browse files
committed
tpmtools: regenerate keystore in clean builds
Fix CI clean-workspace TPM tool builds by making the local keystore object depend on the generated root keystore source. F/CI
1 parent 9b36e62 commit f8ec206

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tools/tpm/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ debug: all
9191
swtpm:CFLAGS+=-DWOLFTPM_SWTPM
9292
swtpm:all
9393

94+
# The TPM host tools consume the generated root keystore just like the
95+
# bootloader build. In a clean CI workspace, regenerate it through the
96+
# top-level makefile before compiling the local keystore object.
97+
$(WOLFBOOTDIR)/src/keystore.c:
98+
$(Q)$(MAKE) -C $(WOLFBOOTDIR) src/keystore.c
99+
94100
# build objects
95101
$(OBJDIR)/%.o: %.c
96102
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
@@ -103,6 +109,8 @@ $(OBJDIR)/%.o: $(WOLFBOOT_LIB_WOLFTPM)/src/%.c
103109
$(OBJDIR)/%.o: $(WOLFBOOT_LIB_WOLFTPM)/hal/%.c
104110
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
105111

112+
$(OBJDIR)/keystore.o: $(WOLFBOOTDIR)/src/keystore.c
113+
106114
# build templates
107115
rot: $(OBJS_VIRT) rot.o
108116
@echo "Building Root of Trust (ROT) tool"

0 commit comments

Comments
 (0)