summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2022-12-05 19:27:57 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-16 12:25:46 +0000
commitb3f837ea4fa93c56ffd8825148b1c0a331dd6541 (patch)
tree1f324cca35715b4119698e2367619810d7676887
parenta72eda8f7e50da8a4cb5ab228f4141130546177f (diff)
downloadchrome-ec-b3f837ea4fa93c56ffd8825148b1c0a331dd6541.tar.gz
cr50: Add support for building platform/pinweaver
Add CONFIG_PLATFORM_PINWEAVER build flag, and support for building platform/pinweaver. BUG=b:262040869 TEST=make board=cr50 -j Change-Id: I993051af60ab4163c37726eac87bd98a8b60fc69 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4311234 Tested-by: Howard Yang <hcyang@google.com> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Howard Yang <hcyang@google.com>
-rw-r--r--board/cr50/build.mk1
-rw-r--r--common/build.mk15
-rw-r--r--include/config.h3
3 files changed, 19 insertions, 0 deletions
diff --git a/board/cr50/build.mk b/board/cr50/build.mk
index 8d7fe50b4e..a62a43bd1e 100644
--- a/board/cr50/build.mk
+++ b/board/cr50/build.mk
@@ -185,6 +185,7 @@ board-y += tpm2/virtual_nvmem.o
board-y += tpm_nvmem_ops.o
board-y += wp.o
board-$(CONFIG_PINWEAVER)+=pinweaver_tpm_imports.o
+board-$(CONFIG_PLATFORM_PINWEAVER)+=pinweaver_tpm_imports.o
TPM2_MODULE := linkedtpm2.cp.o
board-y += $(TPM2_MODULE)
diff --git a/common/build.mk b/common/build.mk
index da97209f3a..8f445c4815 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -219,6 +219,21 @@ $(out)/rma_key_from_blob.h: board/$(BOARD)/$(BLOB_FILE) util/bin2h.sh
endif
+# Build platform/pinweaver.
+ifeq ($(CONFIG_PLATFORM_PINWEAVER),y)
+PINWEAVERLIB := $(realpath ../pinweaver)
+CPPFLAGS += -I$(PINWEAVERLIB) -I$(PINWEAVERLIB)/eal/cr50
+CPPFLAGS += -D BIOMETRICS_DEV=false
+
+common-y += pinweaver.o
+common-y += pinweaver_eal.o
+
+$(out)/RW/common/pinweaver_eal.o: $(PINWEAVERLIB)/eal/cr50/pinweaver_eal.c
+ $(call quiet,c_to_o,CC )
+$(out)/RW/common/pinweaver.o: $(PINWEAVERLIB)/pinweaver.c
+ $(call quiet,c_to_o,CC )
+endif
+
# Build and link against libcryptoc.
ifeq ($(CONFIG_LIBCRYPTOC),y)
CRYPTOCLIB := $(realpath ../../third_party/cryptoc)
diff --git a/include/config.h b/include/config.h
index 86f06b4c6c..c45ca82b00 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2635,7 +2635,10 @@
* A feature which exchanges a low entropy secret with rate limits for a high
* entropy secret. This enables a set of vendor specific commands for Cr50.
*/
+/* Use Cr50 pinweaver */
#undef CONFIG_PINWEAVER
+/* Use platform/pinweaver */
+#undef CONFIG_PLATFORM_PINWEAVER
/*****************************************************************************/
/* PMU config */