| 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 # Script to convert the output of build_image.sh to a VMware image and write a | 7 # Script to convert the output of build_image.sh to a VMware image and write a |
| 8 # corresponding VMware config file. | 8 # corresponding VMware config file. |
| 9 | 9 |
| 10 # Load common constants. This should be the first executable line. | 10 # Load common constants. This should be the first executable line. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 ( [[ ${FLAGS_vdisk_size} < ${MIN_VDISK_SIZE_FULL} ]] || \ | 67 ( [[ ${FLAGS_vdisk_size} < ${MIN_VDISK_SIZE_FULL} ]] || \ |
| 68 [[ ${FLAGS_statefulfs_size} < ${MIN_STATEFUL_FS_SIZE_FULL} ]]); then | 68 [[ ${FLAGS_statefulfs_size} < ${MIN_STATEFUL_FS_SIZE_FULL} ]]); then |
| 69 die "Disk is too small for full, please select a vdisk size greater than \ | 69 die "Disk is too small for full, please select a vdisk size greater than \ |
| 70 ${MIN_VDISK_SIZE_FULL} and statefulfs size greater than \ | 70 ${MIN_VDISK_SIZE_FULL} and statefulfs size greater than \ |
| 71 ${MIN_STATEFUL_FS_SIZE_FULL}." | 71 ${MIN_STATEFUL_FS_SIZE_FULL}." |
| 72 fi | 72 fi |
| 73 | 73 |
| 74 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" | 74 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" |
| 75 # Default to the most recent image | 75 # Default to the most recent image |
| 76 if [ -z "${FLAGS_from}" ] ; then | 76 if [ -z "${FLAGS_from}" ] ; then |
| 77 FLAGS_from="$(./get_latest_image.sh)" | 77 FLAGS_from="$(./get_latest_image.sh --board=${FLAGS_board})" |
| 78 else | 78 else |
| 79 pushd "${FLAGS_from}" && FLAGS_from=`pwd` && popd | 79 pushd "${FLAGS_from}" && FLAGS_from=`pwd` && popd |
| 80 fi | 80 fi |
| 81 if [ -z "${FLAGS_to}" ] ; then | 81 if [ -z "${FLAGS_to}" ] ; then |
| 82 FLAGS_to="${FLAGS_from}" | 82 FLAGS_to="${FLAGS_from}" |
| 83 fi | 83 fi |
| 84 | 84 |
| 85 # Use this image as the source image to copy | 85 # Use this image as the source image to copy |
| 86 SRC_IMAGE="${FLAGS_from}/chromiumos_image.bin" | 86 SRC_IMAGE="${FLAGS_from}/chromiumos_image.bin" |
| 87 | 87 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 echo "${VMX_CONFIG}" | 277 echo "${VMX_CONFIG}" |
| 278 fi | 278 fi |
| 279 | 279 |
| 280 | 280 |
| 281 if [ "${FLAGS_format}" == "qemu" ]; then | 281 if [ "${FLAGS_format}" == "qemu" ]; then |
| 282 echo "If you have qemu-kvm installed, you can start the image by:" | 282 echo "If you have qemu-kvm installed, you can start the image by:" |
| 283 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic " \ | 283 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic " \ |
| 284 "-net user,hostfwd=tcp::922-:22 \\" | 284 "-net user,hostfwd=tcp::922-:22 \\" |
| 285 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" | 285 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" |
| 286 fi | 286 fi |
| OLD | NEW |