summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-01-30 16:51:28 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-31 04:32:31 +0000
commit190eefb3ff227a229396091eef9012ad69d956df (patch)
tree3c1edeba95a07b7304a069c228f7c096ac783d3f
parent8db64da0926e95c4cc19145e911aa270e06a83c0 (diff)
downloadvboot-190eefb3ff227a229396091eef9012ad69d956df.tar.gz
sign_official_build.sh should work without dev-firmware keys
The signing scripts pass a bunch of args around, including paths to the keys used to sign dev-mode-specific firmware. That was only used on Alex and ZGB, so all the newer systems don't have those keys and the script falls over. This uses the normal firmware keys if the dev-firmware keys don't exist. This was an oversight with the original CL that touched resign_firmwarefd.sh BUG=chromium:453901 BRANCH=ToT TEST=manual Download a newer signed recovery image, say for nyan, and save it as scripts/image_signing/nyan-recovery-mp.bin Temporarily delete the developer firmware keys from the devkeys: rm -f tests/devkeys/dev_firmware* Now try resigning the recovery image: cd scripts/image_signing ./sign_official_build.sh recovery nyan-recovery-mp.bin \ ../../tests/devkeys/ signed.bin \ ../../tests/devkeys/key.versions It should work. Change-Id: I474811158cb33e16ad09c16b0db825c40217dd70 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/245151 Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xscripts/image_signing/resign_firmwarefd.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/image_signing/resign_firmwarefd.sh b/scripts/image_signing/resign_firmwarefd.sh
index 237d7cb2..d4cb5b8c 100755
--- a/scripts/image_signing/resign_firmwarefd.sh
+++ b/scripts/image_signing/resign_firmwarefd.sh
@@ -29,6 +29,12 @@ PREAMBLE_FLAG=$9
LOEM_OUTPUT_DIR=${10}
LOEMID=${11}
+if [ ! -e $DEV_FIRMWARE_KEYBLOCK ] || [ ! -e $DEV_FIRMWARE_DATAKEY ] ; then
+ echo "No dev firmware keyblock/datakey found. Reusing normal keys."
+ DEV_FIRMWARE_KEYBLOCK="$FIRMWARE_KEYBLOCK"
+ DEV_FIRMWARE_DATAKEY="$FIRMWARE_DATAKEY"
+fi
+
# pass optional args
[ -n "$VERSION" ] && VERSION="--version $VERSION"
[ -n "$PREAMBLE_FLAG" ] && PREAMBLE_FLAG="--flags $PREAMBLE_FLAG"