Chromium Code Reviews| Index: scripts/image_signing/sign_firmware.sh |
| diff --git a/scripts/image_signing/sign_firmware.sh b/scripts/image_signing/sign_firmware.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..0ca8d458863e097ff6b5e5d3e695028298ef89dd |
| --- /dev/null |
| +++ b/scripts/image_signing/sign_firmware.sh |
| @@ -0,0 +1,42 @@ |
| +#!/bin/bash |
| + |
| +# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
|
scottz-goog
2011/03/15 02:51:34
2011
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +# Wrapper script for re-signing a firmware image. |
| + |
| +# Determine script directory |
| +SCRIPT_DIR=$(dirname $0) |
| + |
| +IN_FD=$1 |
| +KEY_DIR=$2 |
| +OUT_FD=$3 |
| + |
| +# Abort on error. |
| +set -e |
| + |
| +FIRMWARE_VERSION=1 |
| + |
| +if [ $# -ne 3 ]; then |
| + echo "Usage: $0 <input_fd> <key_dir> <output_fd>" |
|
scottz-goog
2011/03/15 02:51:34
fd? maybe this is obvious but I am totally just th
|
| + exit 1 |
| +fi |
| + |
| +temp_fd=$(mktemp) |
| +trap "rm ${temp_fd}" EXIT |
| + |
| +# Replace the root key in the GBB |
|
scottz-goog
2011/03/15 02:51:34
GBB? again most likely obvious..
|
| +gbb_utility -s \ |
| + --rootkey=${KEY_DIR}/root_key.vbpubk \ |
| + --recoverykey=${KEY_DIR}/recovery_key.vbpubk \ |
| + ${IN_FD} ${temp_fd} |
| + |
| +# Resign the firmware with new keys |
| +${SCRIPT_DIR}/resign_firmwarefd.sh ${temp_fd} ${OUT_FD} \ |
| + ${KEY_DIR}/firmware_data_key.vbprivk \ |
| + ${KEY_DIR}/firmware.keyblock \ |
| + ${KEY_DIR}/dev_firmware_data_key.vbprivk \ |
| + ${KEY_DIR}/dev_firmware.keyblock \ |
| + ${KEY_DIR}/kernel_subkey.vbpubk \ |
| + ${FIRMWARE_VERSION} |