| 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. |
| 11 # The path to common.sh should be relative to your script's location. | 11 # The path to common.sh should be relative to your script's location. |
| 12 . "$(dirname "$0")/common.sh" | 12 . "$(dirname "$0")/common.sh" |
| 13 . "$(dirname "$0")/chromeos-common.sh" | 13 . "$(dirname "$0")/chromeos-common.sh" |
| 14 | 14 |
| 15 get_default_board | 15 get_default_board |
| 16 | 16 |
| 17 DEFAULT_VMDK="ide.vmdk" | 17 DEFAULT_VMDK="ide.vmdk" |
| 18 DEFAULT_VMX="chromiumos.vmx" | 18 DEFAULT_VMX="chromiumos.vmx" |
| 19 DEFAULT_VBOX_DISK="os.vdi" | 19 DEFAULT_VBOX_DISK="os.vdi" |
| 20 DEFAULT_QEMU_IMAGE="chromiumos_qemu.image" | 20 DEFAULT_QEMU_IMAGE="chromiumos_qemu_image.bin" |
| 21 | 21 |
| 22 MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" | 22 MOD_SCRIPTS_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_test_scripts" |
| 23 | 23 |
| 24 # Flags | 24 # Flags |
| 25 DEFINE_string board "${DEFAULT_BOARD}" \ | 25 DEFINE_string board "${DEFAULT_BOARD}" \ |
| 26 "Board for which the image was built" | 26 "Board for which the image was built" |
| 27 DEFINE_boolean factory $FLAGS_FALSE \ | 27 DEFINE_boolean factory $FLAGS_FALSE \ |
| 28 "Modify the image for manufacturing testing" | 28 "Modify the image for manufacturing testing" |
| 29 DEFINE_boolean factory_install $FLAGS_FALSE \ | 29 DEFINE_boolean factory_install $FLAGS_FALSE \ |
| 30 "Modify the image for factory install shim" | 30 "Modify the image for factory install shim" |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 guestOS = \"otherlinux\" | 222 guestOS = \"otherlinux\" |
| 223 ethernet0.addressType = \"generated\" | 223 ethernet0.addressType = \"generated\" |
| 224 floppy0.present = \"FALSE\"" | 224 floppy0.present = \"FALSE\"" |
| 225 | 225 |
| 226 if [[ "${FLAGS_make_vmx}" = "${FLAGS_TRUE}" ]]; then | 226 if [[ "${FLAGS_make_vmx}" = "${FLAGS_TRUE}" ]]; then |
| 227 echo "${VMX_CONFIG}" > "${FLAGS_to}/${FLAGS_vmx}" | 227 echo "${VMX_CONFIG}" > "${FLAGS_to}/${FLAGS_vmx}" |
| 228 echo "Wrote the following config to: ${FLAGS_to}/${FLAGS_vmx}" | 228 echo "Wrote the following config to: ${FLAGS_to}/${FLAGS_vmx}" |
| 229 echo "${VMX_CONFIG}" | 229 echo "${VMX_CONFIG}" |
| 230 fi | 230 fi |
| 231 | 231 |
| OLD | NEW |