Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 # Die on any errors. | 59 # Die on any errors. |
| 60 set -e | 60 set -e |
| 61 | 61 |
| 62 if [ -z "${FLAGS_board}" ] ; then | 62 if [ -z "${FLAGS_board}" ] ; then |
| 63 die "--board is required." | 63 die "--board is required." |
| 64 fi | 64 fi |
| 65 | 65 |
| 66 if [ "${FLAGS_full}" -eq "${FLAGS_TRUE}" ] && \ | 66 if [ "${FLAGS_full}" -eq "${FLAGS_TRUE}" ] && \ |
| 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 warn "Disk is too small for full, using minimu: vdisk size equal to \ |
|
petkov
2010/10/22 19:33:24
minimum
| |
| 70 ${MIN_VDISK_SIZE_FULL} and statefulfs size greater than \ | 70 ${MIN_VDISK_SIZE_FULL} and statefulfs size equal to \ |
| 71 ${MIN_STATEFUL_FS_SIZE_FULL}." | 71 ${MIN_STATEFUL_FS_SIZE_FULL}." |
| 72 FLAGS_vdisk_size=${MIN_VDISK_SIZE_FULL} | |
| 73 FLAGS_statefulfs_size=${MIN_STATEFUL_FS_SIZE_FULL} | |
| 72 fi | 74 fi |
| 73 | 75 |
| 74 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" | 76 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" |
| 75 # Default to the most recent image | 77 # Default to the most recent image |
| 76 if [ -z "${FLAGS_from}" ] ; then | 78 if [ -z "${FLAGS_from}" ] ; then |
| 77 FLAGS_from="$(./get_latest_image.sh --board=${FLAGS_board})" | 79 FLAGS_from="$(./get_latest_image.sh --board=${FLAGS_board})" |
| 78 else | 80 else |
| 79 pushd "${FLAGS_from}" && FLAGS_from=`pwd` && popd | 81 pushd "${FLAGS_from}" && FLAGS_from=`pwd` && popd |
| 80 fi | 82 fi |
| 81 if [ -z "${FLAGS_to}" ] ; then | 83 if [ -z "${FLAGS_to}" ] ; then |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 278 echo "${VMX_CONFIG}" | 280 echo "${VMX_CONFIG}" |
| 279 fi | 281 fi |
| 280 | 282 |
| 281 | 283 |
| 282 if [ "${FLAGS_format}" == "qemu" ]; then | 284 if [ "${FLAGS_format}" == "qemu" ]; then |
| 283 echo "If you have qemu-kvm installed, you can start the image by:" | 285 echo "If you have qemu-kvm installed, you can start the image by:" |
| 284 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=e 1000 " \ | 286 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=e 1000 " \ |
| 285 "-net user,hostfwd=tcp::922-:22 \\" | 287 "-net user,hostfwd=tcp::922-:22 \\" |
| 286 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" | 288 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" |
| 287 fi | 289 fi |
| OLD | NEW |