OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |