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

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

Issue 3529007: Add a script to put in a rootfs from one image into another. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: fix space Created 10 years, 2 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 | scripts/image_signing/swap_rootfs.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Sign the final build image using the "official" keys. 7 # Sign the final build image using the "official" keys.
8 # 8 #
9 # Prerequisite tools needed in the system path: 9 # Prerequisite tools needed in the system path:
10 # 10 #
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 else 179 else
180 return 1 180 return 1
181 fi 181 fi
182 } 182 }
183 183
184 # Re-sign the firmware AU payload inside the image rootfs with a new keys. 184 # Re-sign the firmware AU payload inside the image rootfs with a new keys.
185 # Args: IMAGE 185 # Args: IMAGE
186 resign_firmware_payload() { 186 resign_firmware_payload() {
187 local image=$1 187 local image=$1
188 188
189 if [ -n "${NO_FWUPDATE}" ]; then
190 echo "Skipping firmware update."
191 return
192 fi
193
189 # Grab firmware image from the autoupdate shellball. 194 # Grab firmware image from the autoupdate shellball.
190 local rootfs_dir=$(make_temp_dir) 195 local rootfs_dir=$(make_temp_dir)
191 mount_image_partition ${image} 3 ${rootfs_dir} 196 mount_image_partition ${image} 3 ${rootfs_dir}
192 # Force unmount of the rootfs on function exit as it is needed later. 197 # Force unmount of the rootfs on function exit as it is needed later.
193 trap "sudo umount -d ${rootfs_dir}" RETURN 198 trap "sudo umount -d ${rootfs_dir}" RETURN
194 199
195 local shellball_dir=$(make_temp_dir) 200 local shellball_dir=$(make_temp_dir)
196 # get_firmwarebin_from_shellball can fail if the image has no 201 # get_firmwarebin_from_shellball can fail if the image has no
197 # firmware update. 202 # firmware update.
198 get_firmwarebin_from_shellball \ 203 get_firmwarebin_from_shellball \
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 elif [ "${TYPE}" == "install" ]; then 365 elif [ "${TYPE}" == "install" ]; then
361 resign_firmware_payload ${INPUT_IMAGE} 366 resign_firmware_payload ${INPUT_IMAGE}
362 update_rootfs_hash ${INPUT_IMAGE} \ 367 update_rootfs_hash ${INPUT_IMAGE} \
363 ${KEY_DIR}/installer_kernel.keyblock \ 368 ${KEY_DIR}/installer_kernel.keyblock \
364 ${KEY_DIR}/recovery_kernel_data_key.vbprivk 369 ${KEY_DIR}/recovery_kernel_data_key.vbprivk
365 sign_for_factory_install 370 sign_for_factory_install
366 else 371 else
367 echo "Invalid type ${TYPE}" 372 echo "Invalid type ${TYPE}"
368 exit 1 373 exit 1
369 fi 374 fi
OLDNEW
« no previous file with comments | « no previous file | scripts/image_signing/swap_rootfs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698