summaryrefslogtreecommitdiff
path: root/fuzz/build.mk
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2018-08-21 07:50:27 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-09-07 18:36:34 -0700
commit269ff3569799531fa2b7f7a5def012ea254ceb57 (patch)
tree5175c35320981d22707ed108bfe975ab29e37064 /fuzz/build.mk
parent8961872603f6d7b66ef97d444711e83d6a55e2f4 (diff)
downloadchrome-ec-269ff3569799531fa2b7f7a5def012ea254ceb57.tar.gz
cr50_fuzz: Add minimal fuzzer for pinweaver.
This adds a minimal pinweaver fuzzer as a foundation for further work. It will not be able to achieve good coverage because it doesn't have a proper description of the protocol, however it demonstrates that the prerequisites to build against dcrypto, nvmem_vars, and nvcounter are satisfied for the host board. CQ-DEPEND=CL:1183532 BRANCH=none BUG=chromium:876582 TEST=make -j buildfuzztests && ./build/host/cr50_fuzz/cr50_fuzz.exe Change-Id: I520d71c224d583c51dc3292dc051ee8de4a4116a Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1183534 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'fuzz/build.mk')
-rw-r--r--fuzz/build.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/fuzz/build.mk b/fuzz/build.mk
index 7a45116fe2..5e297b3d66 100644
--- a/fuzz/build.mk
+++ b/fuzz/build.mk
@@ -6,7 +6,7 @@
# fuzzer binaries
#
-fuzz-test-list-host = host_command_fuzz
+fuzz-test-list-host = cr50_fuzz host_command_fuzz
# For fuzzing targets libec.a is built from the ro objects and hides functions
# that collide with stdlib. The rw only objects are then linked against libec.a
@@ -20,4 +20,8 @@ fuzz-test-list-host = host_command_fuzz
# Does your object file need to link against cstdlib?
# Yes -> use <obj_name>-rw
# Otherwise use <obj_name>-y
-host_command_fuzz-rw = host_command_fuzz.o
+cr50_fuzz-rw = cr50_fuzz.o
+host_command_fuzz-y = host_command_fuzz.o
+
+$(out)/cr50_fuzz.exe: $(out)/cryptoc/libcryptoc.a
+$(out)/cr50_fuzz.exe: LDFLAGS_EXTRA+=-lcrypto