summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-03-10 23:27:10 -0700
committerCommit Bot <commit-bot@chromium.org>2020-04-06 18:54:38 +0000
commitb1c6ef3892c4e36a1375249ce4494959d2457011 (patch)
tree2c584a236674c6d57c8064aec663d728e31812d6 /Makefile
parent509a887c5a89530e9748241625ad3cb25f5de3c5 (diff)
downloadvboot-b1c6ef3892c4e36a1375249ce4494959d2457011.tar.gz
Rewrite algorithm type parsers and make them globally available
There is some code strewn around between futility and the vb21-specific part of hostlib to allow parsing of textual algorithm names to vboot enums, but it is somewhat disorganized and not written in a super efficient way. This patch rewrites it and centralizes all the algorithm mapping stuff under 2crypto.c so it can be a single source of truth for all of vboot. (String parsing routines still need to stay in hostlib since not all firmware targets support things like stroul() and strcasecmp().) BRANCH=None BUG=None TEST=make runtests Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I719b2499992a6e4395a29231bc8b9a7680c5b174 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2099447 Reviewed-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index da3bf568..2b8655c1 100644
--- a/Makefile
+++ b/Makefile
@@ -361,6 +361,7 @@ FWLIB_SRCS = \
firmware/2lib/2common.c \
firmware/2lib/2context.c \
firmware/2lib/2crc8.c \
+ firmware/2lib/2crypto.c \
firmware/2lib/2ec_sync.c \
firmware/2lib/2gbb.c \
firmware/2lib/2hmac.c \
@@ -451,6 +452,7 @@ UTILLIB_SRCS = \
host/arch/${ARCH}/lib/crossystem_arch.c \
host/lib/chromeos_config.c \
host/lib/crossystem.c \
+ host/lib/crypto.c \
host/lib/file_keys.c \
host/lib/fmap.c \
host/lib/host_common.c \
@@ -487,6 +489,7 @@ HOSTLIB_SRCS = \
firmware/2lib/2common.c \
firmware/2lib/2context.c \
firmware/2lib/2crc8.c \
+ firmware/2lib/2crypto.c \
firmware/2lib/2hmac.c \
firmware/2lib/2kernel.c \
firmware/2lib/2nvstorage.c \
@@ -507,6 +510,7 @@ HOSTLIB_SRCS = \
host/arch/${ARCH}/lib/crossystem_arch.c \
host/lib/chromeos_config.c \
host/lib/crossystem.c \
+ host/lib/crypto.c \
host/lib/extract_vmlinuz.c \
host/lib/fmap.c \
host/lib/host_misc.c \
@@ -702,6 +706,7 @@ TEST2X_NAMES = \
tests/vb2_common_tests \
tests/vb2_common2_tests \
tests/vb2_common3_tests \
+ tests/vb2_crypto_tests \
tests/vb2_ec_sync_tests \
tests/vb2_gbb_tests \
tests/vb2_host_key_tests \
@@ -884,6 +889,8 @@ headers_install:
${Q}mkdir -p ${UI_DIR}
${Q}${INSTALL} -t ${UI_DIR} -m644 \
host/include/* \
+ firmware/2lib/include/2crypto.h \
+ firmware/2lib/include/2sysincludes.h \
firmware/include/gpt.h \
firmware/include/tlcl.h \
firmware/include/tss_constants.h \
@@ -1215,6 +1222,7 @@ run2tests: install_for_test
${RUNTEST} ${BUILD_RUN}/tests/vb2_common_tests
${RUNTEST} ${BUILD_RUN}/tests/vb2_common2_tests ${TEST_KEYS}
${RUNTEST} ${BUILD_RUN}/tests/vb2_common3_tests ${TEST_KEYS}
+ ${RUNTEST} ${BUILD_RUN}/tests/vb2_crypto_tests
${RUNTEST} ${BUILD_RUN}/tests/vb2_ec_sync_tests
${RUNTEST} ${BUILD_RUN}/tests/vb2_gbb_tests
${RUNTEST} ${BUILD_RUN}/tests/vb2_host_key_tests