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

Unified Diff: scripts/image_signing/resign_kernel_partition.sh

Issue 6368064: Allow signing scripts to (optionally) set the firmware and kernel versions (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: ws fix for real Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/image_signing/resign_image.sh ('k') | scripts/image_signing/sign_official_build.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/resign_kernel_partition.sh
diff --git a/scripts/image_signing/resign_kernel_partition.sh b/scripts/image_signing/resign_kernel_partition.sh
index 1b88cb2b473ff5eaf091f718f6884a8eae1306cd..fd7cfd398c201680a626708ea78198ec9342b175 100755
--- a/scripts/image_signing/resign_kernel_partition.sh
+++ b/scripts/image_signing/resign_kernel_partition.sh
@@ -9,12 +9,14 @@
# vbutil_kernel must be in the system path.
+SCRIPT_DIR=$(dirname $0)
+
# Abort on error
set -e
# Check arguments
-if [ $# -ne 4 ] ; then
- echo "usage: $0 src_kpart dst_vblock kernel_datakey kernel_keyblock"
+if [ $# -lt 4 ] || [ $# -gt 5 ]; then
+ echo "usage: $0 src_kpart dst_vblock kernel_datakey kernel_keyblock [version]"
exit 1
fi
@@ -22,17 +24,23 @@ fi
type -P vbutil_kernel &>/dev/null || \
( echo "vbutil_kernel tool not found."; exit 1; )
-src_kpart=$1
-dst_vblock=$2
-kernel_datakey=$3
-kernel_keyblock=$4
+SRC_KPART=$1
+DST_VBLOCK=$2
+KERNEL_DATAKEY=$3
+KERNEL_KEYBLOCK=$4
+VERSION=$5
+
+if [ -z $VERSION ]; then
+ VERSION=1
+fi
+echo "Using kernel version: $VERSION"
-vbutil_kernel \
- --repack "${dst_vblock}" \
+vbutil_kernel --repack "${DST_VBLOCK}" \
--vblockonly \
- --keyblock "${kernel_keyblock}" \
- --signprivate "${kernel_datakey}" \
- --oldblob "${src_kpart}"
+ --keyblock "${KERNEL_KEYBLOCK}" \
+ --signprivate "${KERNEL_DATAKEY}" \
+ --version "${VERSION}" \
+ --oldblob "${SRC_KPART}"
-echo "New kernel vblock was output to ${dst_vblock}"
+echo "New kernel vblock was output to ${DST_VBLOCK}"
« no previous file with comments | « scripts/image_signing/resign_image.sh ('k') | scripts/image_signing/sign_official_build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698