Debian Codegraph @

3rdparty/vboot/scripts/image_signing/resign_firmwarefd.sh

raw symbols SCIP
1 #!/bin/sh
2
3 # Copyright 2014 The ChromiumOS Authors
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Abort on error
8 set -e
9
10 # This script is obsolete. The required functionality is now provided by the
11 # compiled futility executable, so all this does is invoke that. This wrapper
12 # should go away Real Soon Now.
13
14
15 # Which futility to run?
16 [ -z "$FUTILITY" ] && FUTILITY=futility
17
18 # required
19 SRC_FD=$1
20 DST_FD=$2
21 FIRMWARE_DATAKEY=$3
22 FIRMWARE_KEYBLOCK=$4
23 KERNEL_SUBKEY=$5
24 # optional
25 VERSION=$6
26 PREAMBLE_FLAG=$7
27 LOEM_OUTPUT_DIR=$8
28 LOEMID=$9
29
30 # pass optional args
31 [ -n "$VERSION" ] && VERSION="--version $VERSION"
32 [ -n "$PREAMBLE_FLAG" ] && PREAMBLE_FLAG="--flags $PREAMBLE_FLAG"
33 [ -n "$LOEM_OUTPUT_DIR" ] && LOEM_OUTPUT_DIR="--loemdir $LOEM_OUTPUT_DIR"
34 [ -n "$LOEMID" ] && LOEMID="--loemid $LOEMID"
35
36 exec ${FUTILITY} sign \
37 --signprivate $FIRMWARE_DATAKEY \
38 --keyblock $FIRMWARE_KEYBLOCK \
39 --kernelkey $KERNEL_SUBKEY \
40 $VERSION \
41 $PREAMBLE_FLAG \
42 $LOEM_OUTPUT_DIR \
43 $LOEMID \
44 $SRC_FD \
45 $DST_FD
46
47 echo UNABLE TO EXEC FUTILITY 1>&2
48 exit 1