diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-02-20 16:51:59 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-02-25 08:44:58 +0000 |
commit | dd9c1447ac2625e8f78af07bb88a417b908ab34b (patch) | |
tree | 0768b0de50fc1eb33d4a4c9988d133a5f6573e3b /Makefile.rules | |
parent | 8a94ea4fbd7ef283af35ec5aa472a819f5a2a337 (diff) | |
download | chrome-ec-dd9c1447ac2625e8f78af07bb88a417b908ab34b.tar.gz |
cr50: enable signed RW images
This signs the RW firmware (with a non-secret key). The RO
firmware will verify the RW firmware and jump to it if it's good.
Note that this isn't the final solution, just the beginning.
BUG=chrome-os-partner:37071
BRANCH=none
TEST=manual
Build and install it. You'll see something like this:
--- UART initialized after reboot ---
[Reset cause: reset-pin hard]
[Image: RO, cr50_v1.1.2929-27e1b82-dirty 2015-02-24 14:36:29 wfrichar@wfrichar-glaptop]
[0.000444 Verifying RW image...]
[0.423742 RW image verified]
[0.423946 Jumping to image RW[0.428492 UART initialized after sysjump]
[Image: RW, cr50_v1.1.2929-27e1b82-dirty 2015-02-24 14:36:29 wfrichar@wfrichar-glaptop]
[0.428931 Inits done]
Console is enabled; type HELP for help.
>
> sysinfo
Reset flags: 0x00000c02 (reset-pin sysjump hard)
Copy: RW
Jumped: yes
Flags: unlocked
>
Change-Id: Icafa554baca135ff1f80cbce4dad5f980e7fc122
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/253081
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile.rules b/Makefile.rules index 80ac99d9b3..0576035c7a 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -42,7 +42,8 @@ cmd_flat_to_obj = $(CC) -T $(out)/firmware_image.lds -nostdlib $(CPPFLAGS) \ cmd_elf_to_flat = $(OBJCOPY) -O binary $^ $@ cmd_elf_to_dis = $(OBJDUMP) -D $< > $@ cmd_elf_to_hex = $(OBJCOPY) -O ihex $^ $@ -cmd_obj_to_hex = $(OBJCOPY) -O ihex $^ $@ +cmd_bin_to_hex = $(OBJCOPY) -I binary -O ihex \ + --change-addresses $(_flash_base) $^ $@ cmd_elf = $(LD) $(objs) $(LDFLAGS) -o $@ -T $< -Map $(out)/$*.map cmd_exe = $(CC) $(objs) $(HOST_TEST_LDFLAGS) -o $@ cmd_c_to_o = $(CC) $(CFLAGS) -MMD -MF $@.d -c $< -o $@ @@ -178,8 +179,8 @@ $(out)/%.flat: $(out)/%.elf $(out)/%.hex: $(out)/%.elf $(call quiet,elf_to_hex,OBJCOPY) -$(out)/$(PROJECT).hex: $(out)/$(PROJECT).obj - $(call quiet,obj_to_hex,OBJCOPY) +$(out)/$(PROJECT).hex: $(out)/$(PROJECT).bin + $(call quiet,bin_to_hex,OBJCOPY) $(out)/%.elf: $(out)/%.lds $(objs) $(call quiet,elf,LD ) |