diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-09-19 17:51:05 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-09-21 02:45:17 +0000 |
commit | 65c59b7b1d7ecf82b8fcebf8348235bf715718b9 (patch) | |
tree | 711993b87bf726b3234acfeecab152d2ae5aa7fc | |
parent | d46a526ab30e44b17215d8e7ce28225164fc8ed9 (diff) | |
download | chrome-ec-65c59b7b1d7ecf82b8fcebf8348235bf715718b9.tar.gz |
cr50: use the latest Cr50 signer
Update make files to work with the latest version of the Cr50 signer.
Technically this is not necessary in the chip factory branch, as
signing does not have to happen in the branch, but it helps when a
board locked image from this branch needs to be created.
BRANCH=none
BUG=none
TEST=successfully created node locked images from this branch using
H1_DEVIDS=... make variable.
Change-Id: I0fe37bd66b1f2fb995ebd022ca0fd4e1eb46299f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1236919
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | Makefile.rules | 4 | ||||
-rw-r--r-- | chip/g/build.mk | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Makefile.rules b/Makefile.rules index d8bfd68bc7..7e97db98e3 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -60,8 +60,8 @@ cmd_flat_to_obj = $(CC) -T $(out)/firmware_image.lds -nostdlib $(CPPFLAGS) \ # Allow the .roshared section to overlap other sections (itself) cmd_ec_elf_to_flat ?= $(OBJCOPY) --set-section-flags .roshared=share \ -O binary $< $@ -cmd_elf_to_signed ?= sudo $(SIGNER) --key=util/signer/$(3) \ - --input=$< --format=bin --output=$@.signed $(SIGNER_EXTRAS) \ +cmd_elf_to_signed ?= $(SIGNER) --key=util/signer/$(3) \ + --input=$< --format=bin --output=$@.signed --b $(SIGNER_EXTRAS) \ && sudo chown $(shell whoami) $@.signed && mv $@.signed $@ cmd_elf_to_dis = $(OBJDUMP) -D $< > $@ cmd_elf_to_hex = $(OBJCOPY) -O ihex $< $@ diff --git a/chip/g/build.mk b/chip/g/build.mk index d425b4c09e..8ecb5b4792 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -121,13 +121,12 @@ endif MANIFEST := util/signer/ec_RW-manifest-dev.json CR50_RO_KEY ?= rom-testkey-A.pem +SIGNER = /usr/bin/cr50-codesigner ifeq ($(H1_DEVIDS),) CR50_RW_KEY = loader-testkey-A.pem -SIGNER = $(out)/util/signer SIGNER_EXTRAS = SIGNER_MANIFEST := $(MANIFEST) else -SIGNER = $(HOME)/bin/codesigner CR50_RW_KEY = cr50_rom0-dev-blsign.pem.pub RW_SIGNER_EXTRAS = -x util/signer/fuses.xml @@ -164,7 +163,7 @@ else DUMMY := $(shell /bin/cp $(MANIFEST) $(SIGNER_MANIFEST)) endif REPLACEMENT := $(shell printf \ - '\\n \\"DEV_ID0\\": %d,\\n \\"DEV_ID1\\": %d,' $(H1_DEVIDS)) + '\\n \\"DEV_ID0\\": %s,\\n \\"DEV_ID1\\": %s,' $(H1_DEVIDS)) NODE_JSON := $(shell sed -i \ "s/\"fuses\": {/\"fuses\": {$(REPLACEMENT)/" $(SIGNER_MANIFEST)) |