From 815193daeeef8913dce878e36c6608adb1c56bb5 Mon Sep 17 00:00:00 2001 From: Gaurav Shah Date: Fri, 1 Oct 2010 13:01:37 -0700 Subject: [PATCH] Add a script to put in a rootfs from one image into another. Also add an option to prevent sign_official_build from attempting to re-sign the firmware. This is needed because we want both the SSD and RECOVERY images to have the same rootfs for delta updates to work correctly. BUG=chromium-os:7242 TEST=manually verified that rootfs gets replaced correctly (by verifying the rootfs hash). Change-Id: I2ca4f2bef938ca14301fed6a0b16c1a7dc2ba6d9 Review URL: http://codereview.chromium.org/3529007 --- scripts/image_signing/sign_official_build.sh | 5 ++++ scripts/image_signing/swap_rootfs.sh | 29 ++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 scripts/image_signing/swap_rootfs.sh diff --git a/scripts/image_signing/sign_official_build.sh b/scripts/image_signing/sign_official_build.sh index 8bafcede29..d7565cdb0a 100755 --- a/scripts/image_signing/sign_official_build.sh +++ b/scripts/image_signing/sign_official_build.sh @@ -186,6 +186,11 @@ get_firmwarebin_from_shellball() { resign_firmware_payload() { local image=$1 + if [ -n "${NO_FWUPDATE}" ]; then + echo "Skipping firmware update." + return + fi + # Grab firmware image from the autoupdate shellball. local rootfs_dir=$(make_temp_dir) mount_image_partition ${image} 3 ${rootfs_dir} diff --git a/scripts/image_signing/swap_rootfs.sh b/scripts/image_signing/swap_rootfs.sh new file mode 100755 index 0000000000..f4564b08db --- /dev/null +++ b/scripts/image_signing/swap_rootfs.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Load common constants and variables. +. "$(dirname "$0")/common.sh" + +# Print usage string +usage() { + cat <