| 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 23 matching lines...) Expand all Loading... |
| 34 DEFINE_boolean installmask $FLAGS_TRUE \ | 34 DEFINE_boolean installmask $FLAGS_TRUE \ |
| 35 "Use INSTALL_MASK to shrink the resulting image." | 35 "Use INSTALL_MASK to shrink the resulting image." |
| 36 DEFINE_integer jobs -1 \ | 36 DEFINE_integer jobs -1 \ |
| 37 "How many packages to build in parallel at maximum." | 37 "How many packages to build in parallel at maximum." |
| 38 DEFINE_boolean statefuldev $FLAGS_FALSE \ | 38 DEFINE_boolean statefuldev $FLAGS_FALSE \ |
| 39 "Install development packages on stateful partition rather than the rootfs" | 39 "Install development packages on stateful partition rather than the rootfs" |
| 40 DEFINE_string to "" \ | 40 DEFINE_string to "" \ |
| 41 "The target image file or device" | 41 "The target image file or device" |
| 42 DEFINE_boolean withtest $FLAGS_FALSE \ | 42 DEFINE_boolean withtest $FLAGS_FALSE \ |
| 43 "Include packages required for testing and prepare image for testing" | 43 "Include packages required for testing and prepare image for testing" |
| 44 DEFINE_string factory_server $FLAGS_FALSE \ | 44 DEFINE_string factory_server "" \ |
| 45 "Build a factory install image pointing to given server." | 45 "Build a factory install image pointing to given server." |
| 46 | 46 |
| 47 # Parse command line. | 47 # Parse command line. |
| 48 FLAGS "$@" || exit 1 | 48 FLAGS "$@" || exit 1 |
| 49 eval set -- "${FLAGS_ARGV}" | 49 eval set -- "${FLAGS_ARGV}" |
| 50 | 50 |
| 51 # Only now can we die on error. shflags functions leak non-zero error codes, | 51 # Only now can we die on error. shflags functions leak non-zero error codes, |
| 52 # so will die prematurely if 'set -e' is specified before now. | 52 # so will die prematurely if 'set -e' is specified before now. |
| 53 set -e | 53 set -e |
| 54 | 54 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 418 |
| 419 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" | 419 OUTSIDE_OUTPUT_DIR="../build/images/${FLAGS_board}/${IMAGE_SUBDIR}" |
| 420 echo "Done. Image created in ${OUTPUT_DIR}" | 420 echo "Done. Image created in ${OUTPUT_DIR}" |
| 421 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" | 421 echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:" |
| 422 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" | 422 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" |
| 423 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" | 423 echo "To convert to VMWare image, OUTSIDE the chroot, do something like:" |
| 424 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" | 424 echo " ./image_to_vmware.sh --from=${OUTSIDE_OUTPUT_DIR}" |
| 425 echo "from the scripts directory where you entered the chroot." | 425 echo "from the scripts directory where you entered the chroot." |
| 426 | 426 |
| 427 trap - EXIT | 427 trap - EXIT |
| OLD | NEW |