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 # --- BEGIN COMMON.SH BOILERPLATE --- | 10 # --- BEGIN COMMON.SH BOILERPLATE --- |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 # Flags | 43 # Flags |
44 DEFINE_string board "${DEFAULT_BOARD}" \ | 44 DEFINE_string board "${DEFAULT_BOARD}" \ |
45 "Board for which the image was built" | 45 "Board for which the image was built" |
46 DEFINE_boolean factory $FLAGS_FALSE \ | 46 DEFINE_boolean factory $FLAGS_FALSE \ |
47 "Modify the image for manufacturing testing" | 47 "Modify the image for manufacturing testing" |
48 DEFINE_boolean factory_install $FLAGS_FALSE \ | 48 DEFINE_boolean factory_install $FLAGS_FALSE \ |
49 "Modify the image for factory install shim" | 49 "Modify the image for factory install shim" |
50 | 50 |
51 # We default to TRUE so the buildbot gets its image. Note this is different | 51 # We default to TRUE so the buildbot gets its image. Note this is different |
52 # behavior from image_to_usb.sh | 52 # behavior from image_to_usb.sh |
53 DEFINE_boolean force_copy ${FLAGS_TRUE} "Always rebuild test image" | 53 DEFINE_boolean force_copy ${FLAGS_FALSE} "Always rebuild test image" |
54 DEFINE_string format "qemu" \ | 54 DEFINE_string format "qemu" \ |
55 "Output format, either qemu, vmware or virtualbox" | 55 "Output format, either qemu, vmware or virtualbox" |
56 DEFINE_string from "" \ | 56 DEFINE_string from "" \ |
57 "Directory containing rootfs.image and mbr.image" | 57 "Directory containing rootfs.image and mbr.image" |
58 DEFINE_boolean full "${FLAGS_FALSE}" "Build full image with all partitions." | 58 DEFINE_boolean full "${FLAGS_FALSE}" "Build full image with all partitions." |
59 DEFINE_boolean make_vmx ${FLAGS_TRUE} \ | 59 DEFINE_boolean make_vmx ${FLAGS_TRUE} \ |
60 "Create a vmx file for use with vmplayer (vmware only)." | 60 "Create a vmx file for use with vmplayer (vmware only)." |
61 DEFINE_integer mem "${DEFAULT_MEM}" \ | 61 DEFINE_integer mem "${DEFAULT_MEM}" \ |
62 "Memory size for the vm config in MBs (vmware only)." | 62 "Memory size for the vm config in MBs (vmware only)." |
63 DEFINE_integer rootfs_partition_size 1024 \ | 63 DEFINE_integer rootfs_partition_size 1024 \ |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 echo "${VMX_CONFIG}" | 282 echo "${VMX_CONFIG}" |
283 fi | 283 fi |
284 | 284 |
285 | 285 |
286 if [ "${FLAGS_format}" == "qemu" ]; then | 286 if [ "${FLAGS_format}" == "qemu" ]; then |
287 echo "If you have qemu-kvm installed, you can start the image by:" | 287 echo "If you have qemu-kvm installed, you can start the image by:" |
288 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=v
irtio " \ | 288 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=v
irtio " \ |
289 "-net user,hostfwd=tcp::9222-:22 \\" | 289 "-net user,hostfwd=tcp::9222-:22 \\" |
290 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" | 290 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" |
291 fi | 291 fi |
OLD | NEW |