OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 # Script to build a bootable keyfob-based chromeos system image from within | 7 # Script to build a bootable keyfob-based chromeos system image from within |
8 # a chromiumos setup. This assumes that all needed packages have been built into | 8 # a chromiumos setup. This assumes that all needed packages have been built into |
9 # the given target's root with binary packages turned on. This script will | 9 # the given target's root with binary packages turned on. This script will |
10 # build the Chrome OS image using only pre-built binary packages. | 10 # build the Chrome OS image using only pre-built binary packages. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 # TODO(clchiou): Remove this flag after arm verified boot is stable | 93 # TODO(clchiou): Remove this flag after arm verified boot is stable |
94 DEFINE_boolean crosbug12352_arm_kernel_signing ${FLAGS_FALSE} \ | 94 DEFINE_boolean crosbug12352_arm_kernel_signing ${FLAGS_FALSE} \ |
95 "Sign kernel partition for ARM images (temporary hack)." | 95 "Sign kernel partition for ARM images (temporary hack)." |
96 | 96 |
97 DEFINE_boolean enable_rootfs_verification ${FLAGS_TRUE} \ | 97 DEFINE_boolean enable_rootfs_verification ${FLAGS_TRUE} \ |
98 "Default all bootloaders to use kernel-based root fs integrity checking." | 98 "Default all bootloaders to use kernel-based root fs integrity checking." |
99 DEFINE_integer verity_error_behavior 3 \ | 99 DEFINE_integer verity_error_behavior 3 \ |
100 "Kernel verified boot error behavior (0: I/O errors, 1: panic, 2: nothing, \ | 100 "Kernel verified boot error behavior (0: I/O errors, 1: panic, 2: nothing, \ |
101 3: cros) Default: 3" | 101 3: cros) Default: 3" |
102 DEFINE_integer verity_depth 1 \ | 102 DEFINE_integer verity_depth 3 \ |
103 "Kernel verified boot hash tree depth. Default: 1" | 103 "Kernel verified boot hash tree depth. Default: 3" |
104 DEFINE_integer verity_max_ios -1 \ | 104 DEFINE_integer verity_max_ios -1 \ |
105 "Number of outstanding I/O operations dm-verity caps at. Default: -1" | 105 "Number of outstanding I/O operations dm-verity caps at. Default: -1" |
106 DEFINE_string verity_algorithm "sha1" \ | 106 DEFINE_string verity_algorithm "sha1" \ |
107 "Cryptographic hash algorithm used for kernel vboot. Default : sha1" | 107 "Cryptographic hash algorithm used for kernel vboot. Default : sha1" |
108 | 108 |
109 # Parse command line. | 109 # Parse command line. |
110 FLAGS "$@" || exit 1 | 110 FLAGS "$@" || exit 1 |
111 eval set -- "${FLAGS_ARGV}" | 111 eval set -- "${FLAGS_ARGV}" |
112 | 112 |
113 # Only now can we die on error. shflags functions leak non-zero error codes, | 113 # Only now can we die on error. shflags functions leak non-zero error codes, |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" | 811 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" |
812 fi | 812 fi |
813 | 813 |
814 print_time_elapsed | 814 print_time_elapsed |
815 | 815 |
816 echo "To copy to USB keyfob, do something like:" | 816 echo "To copy to USB keyfob, do something like:" |
817 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" | 817 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" |
818 echo "To convert to VMWare image, INSIDE the chroot, do something like:" | 818 echo "To convert to VMWare image, INSIDE the chroot, do something like:" |
819 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" | 819 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" |
820 echo "from the scripts directory where you entered the chroot." | 820 echo "from the scripts directory where you entered the chroot." |
OLD | NEW |