diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-05-03 13:24:10 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-05-04 11:34:08 -0700 |
commit | 825a2f8c7315520f62f6bb981b24f075ed5136e8 (patch) | |
tree | b9eb67420d31f58e2752c03d8e542af2ef4fdc53 /Makefile | |
parent | ef4ae8953cdef17940c8b3b75e28cb919fdf34fa (diff) | |
download | vboot-825a2f8c7315520f62f6bb981b24f075ed5136e8.tar.gz |
bdb: Integrate bdb_test
This patch integrate bdb_test with the root Makefile.
BUG=chrome-os-partner:51908
BRANCH=tot
TEST=make runtests
Change-Id: I6266199d8f3068d2e9349110e8351f20d027ab35
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/342091
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 51 |
1 files changed, 48 insertions, 3 deletions
@@ -302,6 +302,8 @@ FWLIB20 = ${BUILD}/vboot_fw20.a # Vboot 2.1 (not yet ready - see firmware/README) FWLIB21 = ${BUILD}/vboot_fw21.a +BDBLIB = ${BUILD}/bdb.a + # Firmware library sources needed by VbInit() call VBINIT_SRCS = \ firmware/lib/crc8.c \ @@ -370,6 +372,11 @@ FWLIB21_SRCS = \ firmware/lib21/misc.c \ firmware/lib21/packed_key.c +BDBLIB_SRCS = \ + firmware/bdb/bdb.c \ + firmware/bdb/sha.c \ + firmware/bdb/rsa.c + # Support real TPM unless BIOS sets MOCK_TPM ifeq (${MOCK_TPM},) VBINIT_SRCS += \ @@ -420,11 +427,14 @@ FWLIB_OBJS = ${FWLIB_SRCS:%.c=${BUILD}/%.o} FWLIB2X_OBJS = ${FWLIB2X_SRCS:%.c=${BUILD}/%.o} FWLIB20_OBJS = ${FWLIB20_SRCS:%.c=${BUILD}/%.o} FWLIB21_OBJS = ${FWLIB21_SRCS:%.c=${BUILD}/%.o} -ALL_OBJS += ${FWLIB_OBJS} ${FWLIB2X_OBJS} ${FWLIB20_OBJS} ${FWLIB21_OBJS} +BDBLIB_OBJS = ${BDBLIB_SRCS:%.c=${BUILD}/%.o} +ALL_OBJS += ${FWLIB_OBJS} ${FWLIB2X_OBJS} ${FWLIB20_OBJS} ${FWLIB21_OBJS} \ + $(BDBLIB_OBJS} # Intermediate library for the vboot_reference utilities to link against. UTILLIB = ${BUILD}/libvboot_util.a UTILLIB21 = ${BUILD}/libvboot_util21.a +UTILBDB = ${BUILD}/libvboot_utilbdb.a UTILLIB_SRCS = \ cgpt/cgpt_create.c \ @@ -460,6 +470,12 @@ UTILLIB21_SRCS += \ UTILLIB21_OBJS = ${UTILLIB21_SRCS:%.c=${BUILD}/%.o} ALL_OBJS += ${UTILLIB21_OBJS} +UTILBDB_SRCS += \ + firmware/bdb/host.c + +UTILBDB_OBJS = ${UTILBDB_SRCS:%.c=${BUILD}/%.o} +ALL_OBJS += ${UTILBDB_OBJS} + # Externally exported library for some target userspace apps to link with # (cryptohome, updater, etc.) HOSTLIB = ${BUILD}/libvboot_host.a @@ -765,7 +781,10 @@ TEST21_NAMES = \ tests/vb21_host_misc_tests \ tests/vb21_host_sig_tests -TEST_NAMES += ${TEST2X_NAMES} ${TEST20_NAMES} ${TEST21_NAMES} +TESTBDB_NAMES = \ + tests/bdb_test + +TEST_NAMES += ${TEST2X_NAMES} ${TEST20_NAMES} ${TEST21_NAMES} ${TESTBDB_NAMES} # And a few more... TLCL_TEST_NAMES = \ @@ -791,6 +810,7 @@ TEST_FUTIL_BINS = $(addprefix ${BUILD}/,${TEST_FUTIL_NAMES}) TEST2X_BINS = $(addprefix ${BUILD}/,${TEST2X_NAMES}) TEST20_BINS = $(addprefix ${BUILD}/,${TEST20_NAMES}) TEST21_BINS = $(addprefix ${BUILD}/,${TEST21_NAMES}) +TESTBDB_BINS = $(addprefix ${BUILD}/,${TESTBDB_NAMES}) # Directory containing test keys TEST_KEYS = ${SRC_RUN}/tests/testkeys @@ -858,6 +878,7 @@ ${FWLIB_OBJS}: CFLAGS += -DUNROLL_LOOPS ${FWLIB2X_OBJS}: CFLAGS += -DUNROLL_LOOPS ${FWLIB20_OBJS}: CFLAGS += -DUNROLL_LOOPS ${FWLIB21_OBJS}: CFLAGS += -DUNROLL_LOOPS +${BDBLIB_OBJS}: CFLAGS += -DUNROLL_LOOPS # Workaround for coreboot on x86, which will power off asynchronously # without giving us a chance to react. This is not an example of the Right @@ -883,6 +904,7 @@ endif ${FWLIB20_OBJS}: INCLUDES += -Ifirmware/lib20/include ${FWLIB21_OBJS}: INCLUDES += -Ifirmware/lib21/include +${BDBLIB_OBJS}: INCLUDES += -Ifirmware/bdb # Linktest ensures firmware lib doesn't rely on outside libraries ${BUILD}/firmware/linktest/main_vbinit: ${VBINIT_OBJS} @@ -937,6 +959,15 @@ ${FWLIB21}: ${FWLIB2X_OBJS} ${FWLIB21_OBJS} @${PRINTF} " AR $(subst ${BUILD}/,,$@)\n" ${Q}ar qc $@ $^ +.PHONY: bdblib +bdblib: ${BDBLIB} + +${BDBLIB}: ${BDBLIB_OBJS} + @${PRINTF} " RM $(subst ${BUILD}/,,$@)\n" + ${Q}rm -f $@ + @${PRINTF} " AR $(subst ${BUILD}/,,$@)\n" + ${Q}ar qc $@ $^ + # ---------------------------------------------------------------------------- # Host library(s) @@ -966,6 +997,11 @@ ${UTILLIB21}: ${UTILLIB21_OBJS} ${FWLIB2X_OBJS} ${FWLIB21_OBJS} @${PRINTF} " AR $(subst ${BUILD}/,,$@)\n" ${Q}ar qc $@ $^ +${UTILBDB}: ${UTILBDB_OBJS} ${BDBLIB_OBJS} + @${PRINTF} " RM $(subst ${BUILD}/,,$@)\n" + ${Q}rm -f $@ + @${PRINTF} " AR $(subst ${BUILD}/,,$@)\n" + ${Q}ar qc $@ $^ # Link tests for external repos ${BUILD}/host/linktest/extern: ${HOSTLIB} @@ -1153,6 +1189,10 @@ ${TEST21_BINS}: ${UTILLIB21} ${TEST21_BINS}: INCLUDES += -Ihost/lib21/include -Ifirmware/lib21/include ${TEST21_BINS}: LIBS += ${UTILLIB21} +${TESTBDB_BINS}: ${UTILBDB} +${TESTBDB_BINS}: INCLUDES += -Ifirmware/bdb +${TESTBDB_BINS}: LIBS += ${UTILBDB_OBJS} ${BDBLIB_OBJS} + ${TESTLIB}: ${TESTLIB_OBJS} @${PRINTF} " RM $(subst ${BUILD}/,,$@)\n" ${Q}rm -f $@ @@ -1219,6 +1259,7 @@ ${BUILD}/tests/vboot_common3_tests: LDLIBS += ${CRYPTO_LIBS} ${BUILD}/tests/vb20_common2_tests: LDLIBS += ${CRYPTO_LIBS} ${BUILD}/tests/vb20_common3_tests: LDLIBS += ${CRYPTO_LIBS} ${BUILD}/tests/verify_kernel: LDLIBS += ${CRYPTO_LIBS} +${BUILD}/tests/bdb_test: LDLIBS += ${CRYPTO_LIBS} ${TEST21_BINS}: LDLIBS += ${CRYPTO_LIBS} @@ -1302,7 +1343,7 @@ ${FUTIL_CMD_LIST} ${FUTIL_STATIC_CMD_LIST}: # Frequently-run tests .PHONY: test_targets -test_targets:: runcgpttests runmisctests run2tests +test_targets:: runcgpttests runmisctests run2tests runbdbtests ifeq (${MINIMAL},) # Bitmap utility isn't compiled for minimal variant @@ -1421,6 +1462,10 @@ run2tests: test_setup ${RUNTEST} ${BUILD_RUN}/tests/vb21_host_misc_tests ${BUILD} ${RUNTEST} ${BUILD_RUN}/tests/vb21_host_sig_tests ${TEST_KEYS} +.PHONY: runbdbtests +runbdbtests: test_setup + ${RUNTEST} ${BUILD_RUN}/tests/bdb_test ${TEST_KEYS} + .PHONY: runfutiltests runfutiltests: test_setup tests/futility/run_test_scripts.sh ${TEST_INSTALL_DIR}/bin |