Commit Graph

18 Commits

Author SHA1 Message Date
Gaurav Shah
33c44fc14f Fix signing script: Add missing quotes around string test.
Change-Id: I01c5da48b6fdb48ae45cdb21a6ca7484ad6b09dc

Review URL: http://codereview.chromium.org/3106027
2010-08-20 12:28:51 -07:00
Gaurav Shah
8c762cb2cf set_chronos_password.sh: Add missing sudo while grepping the contents of shadow on root fs.
BUG=none
TEST=manual

Change-Id: Ie0d237c0dc6a2c45ffc33b2fcc22279127854ed9

Review URL: http://codereview.chromium.org/3146025
2010-08-20 12:28:14 -07:00
Gaurav Shah
0500524edd Hide packaged firmware AU signing behind a flag for now.
The exact firmware packaging is still very much in flux, not to mention current images don't have the firmware autoupdate package.

BUG=none
TEST=none

Change-Id: Idc60c2c9a8fbc83e0c786b4d4f96f371cdb4a49f

Review URL: http://codereview.chromium.org/3151027
2010-08-19 13:38:27 -07:00
Gaurav Shah
0c4c9bac3c Make signing script re-sign Firmware AU payload, and update rootfs hash.
The build signing script will now re-sign the chrome os AU payload in the image rootfs using the new keys. In addition, it will recalculate and update the RootFS hash (in the kernel partition) before re-signing the whole image using the new "official" keys.

BUG=3496, 5264
TEST=manual

>>>>>For testing rootfs hash updates

1) Ensure that image was build with the --enable_rootfs_verification flag
2) Mount the root file fs on the input image, and make a minor change to the root fs (e.g. adding a file)
3) Now boot from this image, drop into the shell and look for logs related to dm-bht in the dmesg output.
4) You should see dm-bht complaining about block hash mismatches
    $ dmesg | grep dm
      ..... <dm-bht errors>.......
      <errors of the form "dm-bht: Block hash match failed">

4) Now re-sign the modified image using the sign_official_build script. This will re-calculate and update the rootfs hash.
5) Boot from the re-signed image. Look at dmesg output.
6) You should see NO dm-bht errors.

>>>>>For testing re-signing of firmware payload

Grab the firmware autoupdate shellball from /usr/sbin/chromeos-firmwareupdate in the output image's rootfs partition (number 3). Extract the shellball (--sb_extract flag), and grab the firmware bios.bin from the temporary directory.
   $ unpack_firmwarefd.sh bios.bin
   $ vbutil_firmware --verify firmwareA.vblock --signpubkey KEY_DIR/firmware.vbpubk --fv firmwareA.data
    [Verification should succeed]
   $ gbb_utility -g bios.bin --rootkey=rootkey --recoverykey=recoverykey
   "rootkey" should be the same as KEY_DIR/root_key.vbpubk
   "recoverykey" should be the same as KEY_DIR/recovery_key.vbpubk

KEY_DIR: Directory containing the keys used to generate the output image.

Review URL: http://codereview.chromium.org/3083025
2010-08-16 13:29:00 -07:00
Bill Richardson
36ab7cd55b Adding a tool to embed a URL into the BIOS bitmaps.
BUG=chrome-os-partner:726

Review URL: http://codereview.chromium.org/3152020

Change-Id: I9739466c1c19e41ada8c716feedfc1b118551aac
2010-08-16 11:29:45 -07:00
Darin Petkov
dfa5a5b8c8 Fix set_lsb_release.sh issues with handling spaces in arguments.
Also, update the usage with examples.

BUG=5581
TEST=tested with "quoted arguments with spaces"

Change-Id: I4d3db4f9d4bf254069f08e8154d650d6ce4551f0

Review URL: http://codereview.chromium.org/3164010
2010-08-12 10:41:06 -07:00
Darin Petkov
11701c7bb2 Cleanup set_chronos_passowrd script. Also, use $PROG.
BUG=5580
TEST=changed password, reimaged device

Review URL: http://codereview.chromium.org/3164006
2010-08-11 11:08:47 -07:00
Darin Petkov
b7ddcb1caf A utility for updating /etc/lsb-release values.
BUG=5581
TEST=updated an image, updated a device, verified /etc/lsb-release

Review URL: http://codereview.chromium.org/3145008
2010-08-11 11:02:38 -07:00
Darin Petkov
5584d5bc5a Change chronos password rather than root.
Also, rename the script to reflect its specific purpose.

BUG=5580
TEST=ran on an image, installed and tested with new password

Review URL: http://codereview.chromium.org/3175003
2010-08-11 09:55:08 -07:00
Gaurav Shah
37522c9c0c Add a script to generate builds signed using the official keys.
The script sign_official_build.sh does the appropriate signing depending on whether an ssd, recovery or factory-install image is desired.

Also re-factors some common functionality into common.sh.

BUG=3496
TEST=manual

I haven't had a chance to test this on an actual machine running our firmware but will do that before I actually check-in. Thoughts I'd atleast get this out to get the review going.

Review URL: http://codereview.chromium.org/3066034
2010-08-04 15:20:52 -07:00
Darin Petkov
d9072f169f Add a customize_image script.
For now, it just updates the root password.

BUG=5080
TEST=ran the script,tried the image

Review URL: http://codereview.chromium.org/3061045
2010-08-03 10:02:08 -07:00
Gaurav Shah
b69a6bbfe7 Don't use hardcoded offsets for parsing.
Forgot to propagate the use of area_offset= pattern for ouput parsing to the unpacking script.

BUG=none
TEST=Tested by running on a firmware image with flashmap enabled. Correctly parsed the section offsets and sizes and output them to files.

Review URL: http://codereview.chromium.org/3050019
2010-07-27 11:45:07 -07:00
Gaurav Shah
89a663a6e6 Rename image re-signing utility (for compactness and consistency sake).
Review URL: http://codereview.chromium.org/3027027
2010-07-27 10:52:45 -07:00
Gaurav Shah
aa22a5dea5 Add script for re-signing final firmware images with the correct keys.
Also add a script for splitting a firmware image into component firmware data, vblocks and the GBB.

Note: The script uses fmap_decode, a utility to parse flashmap of a firmware image, and a part of the flashmap project:
http://code.google.com/p/flashmap/

BUG=3496
TEST=Tested with newer builds of firmware images with flashmaps enabled. Steps to verify:

1) Use script to re-sign an existing image with a new set of keys.
2) Use unpack_firmwarefd.sh to get individual firmware data and vblocks.
3) Use vbutil_firmware with the new keys. Verification should succeed with
   the newer keys but fail with the older ones.

Review URL: http://codereview.chromium.org/3026018
2010-07-27 10:52:07 -07:00
Gaurav Shah
58a7540397 Add a script that will generate a new vblock given a kernel partition.
For use on our signing servers. May merge this with other scripts once we drill down the right workflow.

BUG=3496
TEST=Just a wrapper around vbutil_kernel and works as intended.

Review URL: http://codereview.chromium.org/3020023
2010-07-26 17:56:33 -07:00
Gaurav Shah
536eaaaee7 Make re-signing script abort on error.
Review URL: http://codereview.chromium.org/2967011
2010-07-14 13:56:39 -07:00
Gaurav Shah
caa4789868 Add a script for standalone signing of Chrome OS images.
Also created a new directory in the vboot_reference source where all signing scripts and related miscellanea will go.

Review URL: http://codereview.chromium.org/2925011
2010-07-14 12:11:29 -07:00
Gaurav Shah
fc70d72aaa VBoot Reference: Refactoring Part 3
Refactor and restructure reference code into individual self-contain modules. I have revamped the way the code is structured to make it easy to determine which parts belong in the firmware and which are used by userland tools.

common/ - common utilities and stub functions (Firmware)
cryptolib/ - crypto library (Firmware)
misclibs/ - miscellaneous userland libraries (Userland)
sctips/ - Miscellaenous scripts (Userland)
tests/ - Tests (Userland)
vfirmware/ - Verified Firmware Implementation
vfirmware/firmware_image_fw.c (Firmware)
vfirmware/firmware_image.c (Userland)

vkernel/ - Verified Kernel Implementation
vkernel/kernel_image_fw.c (Firmware)
vkernel/kernel_image.c (Userland)

Review URL: http://codereview.chromium.org/1581005
2010-03-31 13:26:55 -07:00