Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Issue 2938004: Add a script to re-sign Chrome OS images with keys of our choosing. (Closed)

Created:
10 years, 5 months ago by gauravsh
Modified:
9 years, 6 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Base URL:
ssh://git@chromiumos-git/crosutils.git
Visibility:
Public.

Description

Add a script to re-sign Chrome OS images with keys of our choosing. Currently the output of build_image signs the kernel partition with the recovery keys on the final image. This script allows us to replace the kernel vblock and resign the kernel with the right set of keys (for example, using the normal boot path kernel keys, or the keys for factory install, etc.) BUG=4623 TEST=Tested by running the script on one of the latest builbot images (801) and resigning with test kernel keys. The resulting image was dd-ed off to an SSD and was succesfully able to boot on one of our dev systems with our custom firmware with both dev mode and recovery mode turned off. To test (can do outside chroot): 1) Download the latest image from the buildbot (I used build 801) 2) Run script with the following arguments and paths adjusted below resign_image --from /path/to/chromiumos_image.bin \ --datakey /path/to/vboot_reference/tests/devkeys/kernel_data_key.vbprivk \ --keyblock /path/to/vboot_reference/tests/devkeys/kernel.keyblock \ --vsubkey /path/to/vboot_reference/tests/devkeys/kernel_subkey.vbpubk \ --vbutil_dir /path/to/vbutil/binaries --to image.out This re-signs the image with the normal test keys (instead of recovery as done by build_image) 3) Copy the image to an SSD drive dd if=image.out of=/dev/ssd [replace with the correct device] 4) Boot with the latest custom firmware in normal mode (recovery and dev mode turned off). 5) Profit!

Patch Set 1 #

Patch Set 2 : Moved as per Anush's comment #

Patch Set 3 : fix paths #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -0 lines) Patch
A bin/cros_resign_image.sh View 2 1 chunk +96 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
gauravsh
10 years, 5 months ago (2010-07-09 21:30:16 UTC) #1
anush
Drive by. Can we starting naming all new scripts with cros_* prefix and put them ...
10 years, 5 months ago (2010-07-09 21:34:38 UTC) #2
Randall Spangler
lgtm, thanks
10 years, 5 months ago (2010-07-09 21:39:05 UTC) #3
gauravsh
Moved and renamed script as per Anush's comment. Nick: I will wait for your lgtm ...
10 years, 5 months ago (2010-07-09 21:50:10 UTC) #4
Nick Sanders
10 years, 5 months ago (2010-07-10 00:46:00 UTC) #5
lgtm, 
thanks! this is exactly what I was looking for!

Powered by Google App Engine
This is Rietveld 408576698