diff options
-rw-r--r-- | Makefile.rules | 8 | ||||
-rw-r--r-- | chip/g/build.mk | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/Makefile.rules b/Makefile.rules index 1f776303ff..050d932e81 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -41,9 +41,9 @@ 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 ?= $(out)/util/signer --key=util/signer/$(3).pem \ +cmd_elf_to_signed ?= sudo $(out)/util/signer --key=util/signer/$(3) \ --input=$< --format=bin --output=$@.signed \ - && mv $@.signed $@ + && sudo chown $(shell whoami) $@.signed && mv $@.signed $@ cmd_elf_to_dis = $(OBJDUMP) -D $< > $@ cmd_elf_to_hex = $(OBJCOPY) -O ihex $< $@ cmd_bin_to_hex = $(OBJCOPY) -I binary -O ihex \ @@ -222,10 +222,10 @@ $(out)/RO/%.hex: $(out)/RO/%.elf $(out)/RO/%.smap $(call quiet,elf_to_hex,OBJCOPY) else $(out)/RO/%.flat: $(out)/RO/%.elf $(out)/RO/%.smap - $(call quiet,elf_to_signed,RO_SIGN,rom-testkey-A) + $(call quiet,elf_to_signed,RO_SIGN,$(CR50_RO_KEY)) $(out)/RW/%.flat: $(out)/RW/%.elf $(out)/RW/%.smap - $(call quiet,elf_to_signed,RW_SIGN,loader-testkey-A) + $(call quiet,elf_to_signed,RW_SIGN,loader-testkey-A.pem) $(out)/RO/%.hex: $(out)/RO/%.flat $(call quiet,bin_to_hex,OBJCOPY) diff --git a/chip/g/build.mk b/chip/g/build.mk index 11246a7fed..6db09c1307 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -78,3 +78,5 @@ ifneq ($(CONFIG_RW_B),) $(out)/$(PROJECT).obj: $(out)/RW/ec.RW_B.flat $(out)/RW/ec.RW_B.flat: $(out)/util/signer endif + +CR50_RO_KEY ?= rom-testkey-A.pem |