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

Side by Side Diff: scripts/image_signing/sign_official_build.sh

Issue 6533015: Add script to in-place modify a recovery image to ssd (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: 80 chars Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scripts/image_signing/convert_recovery_to_ssd.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Sign the final build image using the "official" keys. 7 # Sign the final build image using the "official" keys.
8 # 8 #
9 # Prerequisite tools needed in the system path: 9 # Prerequisite tools needed in the system path:
10 # 10 #
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 extract_image_partition ${OUTPUT_IMAGE} 4 ${temp_kimageb} 405 extract_image_partition ${OUTPUT_IMAGE} 4 ${temp_kimageb}
406 ${SCRIPT_DIR}/resign_kernel_partition.sh ${temp_kimageb} ${temp_out_vb} \ 406 ${SCRIPT_DIR}/resign_kernel_partition.sh ${temp_kimageb} ${temp_out_vb} \
407 ${KEY_DIR}/kernel_data_key.vbprivk \ 407 ${KEY_DIR}/kernel_data_key.vbprivk \
408 ${KEY_DIR}/kernel.keyblock \ 408 ${KEY_DIR}/kernel.keyblock \
409 "${KERNEL_VERSION}" 409 "${KERNEL_VERSION}"
410 410
411 # Copy the installer vblock to the stateful partition. 411 # Copy the installer vblock to the stateful partition.
412 # TODO(gauravsh): Remove this if we get rid of the need to overwrite 412 # TODO(gauravsh): Remove this if we get rid of the need to overwrite
413 # the vblock during installs. Kern B could directly be signed by the 413 # the vblock during installs. Kern B could directly be signed by the
414 # SSD keys. 414 # SSD keys.
415 # Note: This vblock is also needed for the ability to convert a recovery
416 # image into the equivalent SSD image (convert_recovery_to_ssd.sh)
415 local stateful_dir=$(make_temp_dir) 417 local stateful_dir=$(make_temp_dir)
416 mount_image_partition ${OUTPUT_IMAGE} 1 ${stateful_dir} 418 mount_image_partition ${OUTPUT_IMAGE} 1 ${stateful_dir}
417 sudo cp ${temp_out_vb} ${stateful_dir}/vmlinuz_hd.vblock 419 sudo cp ${temp_out_vb} ${stateful_dir}/vmlinuz_hd.vblock
418 420
419 echo "Signed recovery image output to ${OUTPUT_IMAGE}" 421 echo "Signed recovery image output to ${OUTPUT_IMAGE}"
420 } 422 }
421 423
422 # Generate the factory install image. 424 # Generate the factory install image.
423 sign_for_factory_install() { 425 sign_for_factory_install() {
424 ${SCRIPT_DIR}/resign_image.sh ${INPUT_IMAGE} ${OUTPUT_IMAGE} \ 426 ${SCRIPT_DIR}/resign_image.sh ${INPUT_IMAGE} ${OUTPUT_IMAGE} \
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 resign_firmware_payload ${INPUT_IMAGE} 481 resign_firmware_payload ${INPUT_IMAGE}
480 update_rootfs_hash ${INPUT_IMAGE} \ 482 update_rootfs_hash ${INPUT_IMAGE} \
481 ${KEY_DIR}/installer_kernel.keyblock \ 483 ${KEY_DIR}/installer_kernel.keyblock \
482 ${KEY_DIR}/installer_kernel_data_key.vbprivk \ 484 ${KEY_DIR}/installer_kernel_data_key.vbprivk \
483 2 485 2
484 sign_for_factory_install 486 sign_for_factory_install
485 else 487 else
486 echo "Invalid type ${TYPE}" 488 echo "Invalid type ${TYPE}"
487 exit 1 489 exit 1
488 fi 490 fi
OLDNEW
« no previous file with comments | « scripts/image_signing/convert_recovery_to_ssd.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698