| OLD | NEW |
| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 sign_for_factory_install() { | 407 sign_for_factory_install() { |
| 408 ${SCRIPT_DIR}/resign_image.sh ${INPUT_IMAGE} ${OUTPUT_IMAGE} \ | 408 ${SCRIPT_DIR}/resign_image.sh ${INPUT_IMAGE} ${OUTPUT_IMAGE} \ |
| 409 ${KEY_DIR}/installer_kernel_data_key.vbprivk \ | 409 ${KEY_DIR}/installer_kernel_data_key.vbprivk \ |
| 410 ${KEY_DIR}/installer_kernel.keyblock | 410 ${KEY_DIR}/installer_kernel.keyblock |
| 411 echo "Signed factory install image output to ${OUTPUT_IMAGE}" | 411 echo "Signed factory install image output to ${OUTPUT_IMAGE}" |
| 412 } | 412 } |
| 413 | 413 |
| 414 # Verification | 414 # Verification |
| 415 if [ "${TYPE}" == "verify" ]; then | 415 if [ "${TYPE}" == "verify" ]; then |
| 416 verify_image | 416 verify_image |
| 417 exit 1 | 417 exit 0 |
| 418 fi | 418 fi |
| 419 | 419 |
| 420 # Signing requires an output image name | 420 # Signing requires an output image name |
| 421 if [ -z "${OUTPUT_IMAGE}" ]; then | 421 if [ -z "${OUTPUT_IMAGE}" ]; then |
| 422 usage | 422 usage |
| 423 exit 1 | 423 exit 1 |
| 424 fi | 424 fi |
| 425 | 425 |
| 426 | 426 |
| 427 if [ "${TYPE}" == "ssd" ]; then | 427 if [ "${TYPE}" == "ssd" ]; then |
| (...skipping 26 matching lines...) Expand all Loading... |
| 454 resign_firmware_payload ${INPUT_IMAGE} | 454 resign_firmware_payload ${INPUT_IMAGE} |
| 455 update_rootfs_hash ${INPUT_IMAGE} \ | 455 update_rootfs_hash ${INPUT_IMAGE} \ |
| 456 ${KEY_DIR}/installer_kernel.keyblock \ | 456 ${KEY_DIR}/installer_kernel.keyblock \ |
| 457 ${KEY_DIR}/installer_kernel_data_key.vbprivk \ | 457 ${KEY_DIR}/installer_kernel_data_key.vbprivk \ |
| 458 2 | 458 2 |
| 459 sign_for_factory_install | 459 sign_for_factory_install |
| 460 else | 460 else |
| 461 echo "Invalid type ${TYPE}" | 461 echo "Invalid type ${TYPE}" |
| 462 exit 1 | 462 exit 1 |
| 463 fi | 463 fi |
| OLD | NEW |