summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-04-04 10:35:35 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-04-17 18:44:35 +0000
commit268220b6dc6101c5ec3a3f9d3de7854bc7f9388d (patch)
treed6b09fd8c4176da2f8745027983fbe925a721055
parente1ee7214751e1ccabe7414039b03e6465d933f16 (diff)
downloadchrome-ec-268220b6dc6101c5ec3a3f9d3de7854bc7f9388d.tar.gz
g: add Make variable for controlling blob swapping
The upcoming cr50-codesigner change will allow to use it for swapping arbitrary blobs in the Cr50 image before signing. Let's use this feature to replace test RMA public key with the prod one. BRANCH=cr50, cr50-mp BUG=b:73296144 TEST=with the rest of the patches in place verified that invoking make with CR50_SWAP_RMA_KEYS=1 causes swapping the RMA public key in the generated image. Change-Id: I4c9994c1a542f456b24d2066ecada9f92f1bfaf3 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/996514 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 03cc82b93b60084942203efe6d86ef11bad56cd0) Reviewed-on: https://chromium-review.googlesource.com/1015614
-rw-r--r--chip/g/build.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/chip/g/build.mk b/chip/g/build.mk
index c2a5bd360c..47bf42acf3 100644
--- a/chip/g/build.mk
+++ b/chip/g/build.mk
@@ -190,6 +190,11 @@ ifeq ($(CHIP_MK_INCLUDED_ONCE),)
CHIP_MK_INCLUDED_ONCE=1
else
+ifneq ($(CR50_SWAP_RMA_KEYS),)
+RMA_KEY_BASE := board/$(BOARD)/rma_key_blob
+RW_SIGNER_EXTRAS += --swap $(RMA_KEY_BASE).test,$(RMA_KEY_BASE).prod
+endif
+
$(out)/RW/ec.RW_B.flat: $(out)/RW/ec.RW.flat
$(out)/RW/ec.RW.flat $(out)/RW/ec.RW_B.flat: SIGNER_EXTRAS = $(RW_SIGNER_EXTRAS)