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 # Helper script that generates the signed kernel image | 7 # Helper script that generates the signed kernel image |
8 | 8 |
9 # --- BEGIN COMMON.SH BOILERPLATE --- | 9 # --- BEGIN COMMON.SH BOILERPLATE --- |
10 # Load common CrOS utilities. Inside the chroot this file is installed in | 10 # Load common CrOS utilities. Inside the chroot this file is installed in |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 DEFINE_string root "/dev/sd%D%P" \ | 57 DEFINE_string root "/dev/sd%D%P" \ |
58 "Expected device root partition" | 58 "Expected device root partition" |
59 # If provided, will automatically add verified boot arguments. | 59 # If provided, will automatically add verified boot arguments. |
60 DEFINE_string rootfs_image "" \ | 60 DEFINE_string rootfs_image "" \ |
61 "Optional path to the rootfs device or image.(Default: \"\")" | 61 "Optional path to the rootfs device or image.(Default: \"\")" |
62 DEFINE_string rootfs_hash "" \ | 62 DEFINE_string rootfs_hash "" \ |
63 "Optional path to output the rootfs hash to. (Default: \"\")" | 63 "Optional path to output the rootfs hash to. (Default: \"\")" |
64 DEFINE_integer verity_error_behavior 2 \ | 64 DEFINE_integer verity_error_behavior 2 \ |
65 "Verified boot error behavior [0: I/O errors, 1: reboot, 2: nothing] \ | 65 "Verified boot error behavior [0: I/O errors, 1: reboot, 2: nothing] \ |
66 (Default: 2)" | 66 (Default: 2)" |
67 DEFINE_integer verity_tree_depth 1 \ | 67 DEFINE_integer verity_tree_depth 0 \ |
68 "Optional Verified boot hash tree depth. (Default: 1)" | 68 "Optional Verified boot hash tree depth. (Default: 0)" |
69 DEFINE_integer verity_max_ios -1 \ | 69 DEFINE_integer verity_max_ios -1 \ |
70 "Optional number of outstanding I/O operations. (Default: -1)" | 70 "Optional number of outstanding I/O operations. (Default: -1)" |
71 DEFINE_string verity_hash_alg "sha1" \ | 71 DEFINE_string verity_hash_alg "sha1" \ |
72 "Cryptographic hash algorithm used for dm-verity. (Default: sha1)" | 72 "Cryptographic hash algorithm used for dm-verity. (Default: sha1)" |
73 | 73 |
74 # TODO(clchiou): Remove this flag after arm verified boot is stable | 74 # TODO(clchiou): Remove this flag after arm verified boot is stable |
75 DEFINE_boolean crosbug12352_arm_kernel_signing ${FLAGS_FALSE} \ | 75 DEFINE_boolean crosbug12352_arm_kernel_signing ${FLAGS_FALSE} \ |
76 "Sign kernel partition for ARM images (temporary hack)." | 76 "Sign kernel partition for ARM images (temporary hack)." |
77 | 77 |
78 # Parse flags | 78 # Parse flags |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 info "Cleaning up temporary files: ${WORK}" | 294 info "Cleaning up temporary files: ${WORK}" |
295 rm ${WORK} | 295 rm ${WORK} |
296 rmdir ${FLAGS_working_dir} | 296 rmdir ${FLAGS_working_dir} |
297 fi | 297 fi |
298 | 298 |
299 info "Kernel partition image emitted: ${FLAGS_to}" | 299 info "Kernel partition image emitted: ${FLAGS_to}" |
300 | 300 |
301 if [[ -f ${FLAGS_rootfs_hash} ]]; then | 301 if [[ -f ${FLAGS_rootfs_hash} ]]; then |
302 info "Root filesystem hash emitted: ${FLAGS_rootfs_hash}" | 302 info "Root filesystem hash emitted: ${FLAGS_rootfs_hash}" |
303 fi | 303 fi |
OLD | NEW |