summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-05-05 11:36:24 -0500
committerCommit Bot <commit-bot@chromium.org>2021-05-07 16:17:45 +0000
commitafdc6bf6cefd4afa83b68967d34a512ac02f6544 (patch)
tree60ea0f6a78c6c489bb98039ea0a4917cc720839c
parent190e6a26d99a6763b302156a47ba8c2f74b6465e (diff)
downloadchrome-ec-afdc6bf6cefd4afa83b68967d34a512ac02f6544.tar.gz
CRYPTO_TEST_SETUP: enable dev features
Enable dev features in CRYPTO_TEST builds, so it's easier to update and rollback to MP images. Add the rollback command and disable update checks. BUG=b:186663661 TEST=make clobber ; make -j BOARD=cr50 make clobber ; make -j BOARD=cr50 CRYPTO_TEST=1 Change-Id: Id8929f67f206d3222c551532c91921bd646d2a50 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875480 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
-rw-r--r--board/cr50/board.h3
-rw-r--r--chip/g/upgrade_fw.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h
index c77eccd4e9..8ebe3086e6 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -568,6 +568,9 @@ enum nvmem_users {
#define DISABLE_SLEEP_TIME_TPM_WIPE (TPM_PROCESSING_TIME + TPM_RESET_TIME)
#ifdef CRYPTO_TEST_SETUP
+/* Enable unsafe dev features for CCD in crypto test builds */
+#define CONFIG_CMD_ROLLBACK
+
/* Remove console commands to save space */
#undef CONFIG_CMD_ECRST
#undef CONFIG_CMD_SYSRST
diff --git a/chip/g/upgrade_fw.c b/chip/g/upgrade_fw.c
index 7f15574e3b..9bbf796f0b 100644
--- a/chip/g/upgrade_fw.c
+++ b/chip/g/upgrade_fw.c
@@ -164,7 +164,7 @@ int usb_pdu_valid(struct upgrade_command *cmd_body, size_t cmd_size)
return 1;
}
-#ifdef CR50_DEV
+#if defined(CR50_DEV) || defined(CRYPTO_TEST_SETUP)
#ifndef CONFIG_IGNORE_G_UPDATE_CHECKS
#define CONFIG_IGNORE_G_UPDATE_CHECKS
#endif