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

Side by Side Diff: build_image

Issue 2859005: Add Build Timer (Closed) Base URL: http://src.chromium.org/git/crosutils.git
Patch Set: space Created 10 years, 6 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
« no previous file with comments | « no previous file | common.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) 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if [[ $FLAGS_replace -eq $FLAGS_TRUE ]]; then 131 if [[ $FLAGS_replace -eq $FLAGS_TRUE ]]; then
132 sudo rm -rf "$OUTPUT_DIR" 132 sudo rm -rf "$OUTPUT_DIR"
133 else 133 else
134 echo "Directory $OUTPUT_DIR already exists." 134 echo "Directory $OUTPUT_DIR already exists."
135 echo "Use --build_attempt option to specify an unused attempt." 135 echo "Use --build_attempt option to specify an unused attempt."
136 echo "Or use --replace if you want to overwrite this directory." 136 echo "Or use --replace if you want to overwrite this directory."
137 exit 1 137 exit 1
138 fi 138 fi
139 fi 139 fi
140 140
141 # Be verbose to help debug failures.
142 set -x
143
144 # Create the output directory. 141 # Create the output directory.
145 mkdir -p "$OUTPUT_DIR" 142 mkdir -p "$OUTPUT_DIR"
146 143
147 cleanup_rootfs_loop() { 144 cleanup_rootfs_loop() {
148 sudo umount -d "$ROOT_FS_DIR" 145 sudo umount -d "$ROOT_FS_DIR"
149 } 146 }
150 147
151 cleanup_stateful_fs_loop() { 148 cleanup_stateful_fs_loop() {
152 sudo umount "${ROOT_FS_DIR}/usr/local" 149 sudo umount "${ROOT_FS_DIR}/usr/local"
153 sudo umount "${ROOT_FS_DIR}/var" 150 sudo umount "${ROOT_FS_DIR}/var"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 set +x 557 set +x
561 558
562 echo "Done. Image created in ${OUTPUT_DIR}" 559 echo "Done. Image created in ${OUTPUT_DIR}"
563 echo "Chromium OS image created as $PRISTINE_IMAGE_NAME" 560 echo "Chromium OS image created as $PRISTINE_IMAGE_NAME"
564 if [ "$FLAGS_recovery" -eq "$FLAGS_TRUE" ]; then 561 if [ "$FLAGS_recovery" -eq "$FLAGS_TRUE" ]; then
565 echo "Recovery image created as $PRISTINE_IMAGE_NAME" 562 echo "Recovery image created as $PRISTINE_IMAGE_NAME"
566 fi 563 fi
567 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then 564 if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then
568 echo "Developer image created as $DEVELOPER_IMAGE_NAME" 565 echo "Developer image created as $DEVELOPER_IMAGE_NAME"
569 fi 566 fi
567
568 print_time_elapsed
569
570 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" 570 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:"
571 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 571 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
572 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" 572 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:"
573 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" 573 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}"
574 echo "from the scripts directory where you entered the chroot." 574 echo "from the scripts directory where you entered the chroot."
OLDNEW
« no previous file with comments | « no previous file | common.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698