summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-07-16 10:54:27 -0700
committerCommit Bot <commit-bot@chromium.org>2019-07-17 19:39:50 +0000
commite7d2f636cb9c80e0c391b0eb4dddd5f15cd15d21 (patch)
tree55425efe753e21893c57f7b478ac4fe4ab43a58e
parentcb59e6d1dc263a35c9f1f97e042aef8dce71a3a3 (diff)
downloadchrome-ec-e7d2f636cb9c80e0c391b0eb4dddd5f15cd15d21.tar.gz
cr50: provide separate environment variable to enable crypto tests
Presently the CR50_DEV environment variable is overloaded, if its value is a number exceeding 1, it enables inclusion in the image of the dcrypto tests. To make things cleaner let's use a separate environment variable to add dcrypto tests to the image. Note that the tests still can not be enabled, as they do not fit into the flash code space. BRANCH=cr50, cr50-mp BUG=b:137659935 TEST=verified that image building with CRYPTO_TEST=1 fails due to exceeded code size. Change-Id: I550c219c1eefe01fbe035b85a1d5aae88ea439de Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704607 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rw-r--r--board/cr50/build.mk7
-rw-r--r--chip/g/dcrypto/dcrypto.h4
2 files changed, 6 insertions, 5 deletions
diff --git a/board/cr50/build.mk b/board/cr50/build.mk
index 4f3b513683..5b0d788401 100644
--- a/board/cr50/build.mk
+++ b/board/cr50/build.mk
@@ -18,7 +18,12 @@ ifeq ($(BOARD_MK_INCLUDED_ONCE),)
# List of variables which can be defined in the environment or set in the make
# command line.
-ENV_VARS := CR50_DEV CR50_SQA H1_RED_BOARD
+ENV_VARS := CR50_DEV CR50_SQA CRYPTO_TEST H1_RED_BOARD
+
+ifneq ($(CRYPTO_TEST),)
+CPPFLAGS += -DCRYPTO_TEST_SETUP
+endif
+
BOARD_MK_INCLUDED_ONCE=1
SIG_EXTRA = --cros
diff --git a/chip/g/dcrypto/dcrypto.h b/chip/g/dcrypto/dcrypto.h
index bf3333e883..7a186e790e 100644
--- a/chip/g/dcrypto/dcrypto.h
+++ b/chip/g/dcrypto/dcrypto.h
@@ -9,10 +9,6 @@
#ifndef __EC_CHIP_G_DCRYPTO_DCRYPTO_H
#define __EC_CHIP_G_DCRYPTO_DCRYPTO_H
-#if defined(CR50_DEV) && (CR50_DEV) > 1
-#define CRYPTO_TEST_SETUP
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif