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

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

Issue 3020023: Add a script that will generate a new vblock given a kernel partition. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: use parens Created 10 years, 5 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 | « no previous file | 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
(Empty)
1 #!/bin/bash
2
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
5 # found in the LICENSE file.
6
7 # Script that just takes in a kernel partition and outputs a new vblock
8 # signed with the specific keys. For use on signing servers.
9
10 # vbutil_kernel must be in the system path.
11
12 # Abort on error
13 set -e
14
15 # Check arguments
16 if [ $# -ne 4 ] ; then
17 echo "usage: $0 src_kpart dst_vblock kernel_datakey kernel_keyblock"
18 exit 1
19 fi
20
21 # Make sure the tools we need are available.
22 type -P vbutil_kernel &>/dev/null || \
23 ( echo "vbutil_kernel tool not found."; exit 1; )
24
25 src_kpart=$1
26 dst_vblock=$2
27 kernel_datakey=$3
28 kernel_keyblock=$4
29
30 vbutil_kernel \
31 --repack "${dst_vblock}" \
32 --vblockonly \
33 --keyblock "${kernel_keyblock}" \
34 --signprivate "${kernel_datakey}" \
35 --oldblob "${src_kpart}"
36
37 echo "New kernel vblock was output to ${dst_vblock}"
38
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698