OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
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 # This script can change key (usually developer keys) and kernel config | 7 # This script can change key (usually developer keys) and kernel config |
8 # of a kernels on SSD. | 8 # of a kernels on SSD. |
9 | 9 |
10 SCRIPT_BASE="$(dirname "$0")" | 10 SCRIPT_BASE="$(dirname "$0")" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 KERNEL_PUBKEY="$FLAGS_keys/kernel_subkey.vbpubk" | 215 KERNEL_PUBKEY="$FLAGS_keys/kernel_subkey.vbpubk" |
216 | 216 |
217 debug_msg "Prerequisite check" | 217 debug_msg "Prerequisite check" |
218 ensure_files_exist \ | 218 ensure_files_exist \ |
219 "$KERNEL_KEYBLOCK" \ | 219 "$KERNEL_KEYBLOCK" \ |
220 "$KERNEL_DATAKEY" \ | 220 "$KERNEL_DATAKEY" \ |
221 "$KERNEL_PUBKEY" \ | 221 "$KERNEL_PUBKEY" \ |
222 "$FLAGS_image" || | 222 "$FLAGS_image" || |
223 exit 1 | 223 exit 1 |
224 | 224 |
| 225 # Make the root filesystem remountable if needed. |
| 226 if [ ${FLAGS_remove_rootfs_verification} = $FLAGS_TRUE ]; then |
| 227 local root_offset=$(partoffset "$FLAGS_image" 3) |
| 228 enable_rw_mount "$FLAGS_image" "$root_offset" |
| 229 fi |
| 230 |
225 resign_ssd_kernel "$FLAGS_image" || num_signed=$? | 231 resign_ssd_kernel "$FLAGS_image" || num_signed=$? |
226 | 232 |
227 debug_msg "Complete." | 233 debug_msg "Complete." |
228 if [ $num_signed -gt 0 -a $num_signed -le 2 ]; then | 234 if [ $num_signed -gt 0 -a $num_signed -le 2 ]; then |
229 # signed 1 or two kernels | 235 # signed 1 or two kernels |
230 echo "Successfully re-signed $num_signed kernel(s) on device $FLAGS_image". | 236 echo "Successfully re-signed $num_signed kernel(s) on device $FLAGS_image". |
231 else | 237 else |
232 err_die "Failed re-signing kernels." | 238 err_die "Failed re-signing kernels." |
233 fi | 239 fi |
234 } | 240 } |
235 | 241 |
236 main | 242 main |
OLD | NEW |