vboot2: api-level routines

I'm breaking the last chunk of vboot2 into smaller pieces as I add
tests.  This has the api-level routines actually called by depthcharge.

BUG=chromium:370082
BRANCH=none
TEST=make clean && VBOOT2=1 COV=1 make

Change-Id: Ic7c082fc5faa0b874b2fa5a15ebda7135dcafe0b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/200151
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
diff --git a/Makefile b/Makefile
index 326ba47..2acdb98 100644
--- a/Makefile
+++ b/Makefile
@@ -279,6 +279,7 @@
 
 # Firmware library source needed for smaller library 2
 FWLIB2_SRCS = \
+	firmware/2lib/2api.c \
 	firmware/2lib/2common.c \
 	firmware/2lib/2crc8.c \
 	firmware/2lib/2misc.c \
@@ -466,6 +467,12 @@
 	utility/pad_digest_utility \
 	utility/signature_digest_utility \
 	utility/verify_data
+
+ifneq (${VBOOT2},)
+UTIL_NAMES += \
+	utility/vb2_verify_fw
+endif
+
 endif
 
 UTIL_BINS_STATIC := $(addprefix ${BUILD}/,${UTIL_NAMES_STATIC})
@@ -571,6 +578,7 @@
 
 ifneq (${VBOOT2},)
 TEST_NAMES += \
+	tests/vb2_api_tests \
 	tests/vb2_common_tests \
 	tests/vb2_common2_tests \
 	tests/vb2_common3_tests \
@@ -1103,6 +1111,7 @@
 
 .PHONY: run2tests
 run2tests: test_setup
+	${RUNTEST} ${BUILD_RUN}/tests/vb2_api_tests
 	${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}