From 03cc82b93b60084942203efe6d86ef11bad56cd0 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 4 Apr 2018 10:35:35 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/996514 Reviewed-by: Randall Spangler --- chip/g/build.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chip/g/build.mk b/chip/g/build.mk index 7e68564387..331c5b085f 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -186,6 +186,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)