Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: image_to_vm.sh

Issue 6768009: Use 1280x1024 resolution when running ChromeOS under qemu. (Closed) Base URL: ssh://gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Fix copyright year. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « fixup_image_for_qemu.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 sudo umount -d "${TEMP_ESP_MNT}" 182 sudo umount -d "${TEMP_ESP_MNT}"
183 rmdir "${TEMP_MNT}" "${TEMP_ESP_MNT}" 183 rmdir "${TEMP_MNT}" "${TEMP_ESP_MNT}"
184 } 184 }
185 trap cleanup INT TERM EXIT 185 trap cleanup INT TERM EXIT
186 mkdir -p "${TEMP_MNT}" 186 mkdir -p "${TEMP_MNT}"
187 enable_rw_mount "${TEMP_ROOTFS}" 187 enable_rw_mount "${TEMP_ROOTFS}"
188 sudo mount -o loop "${TEMP_ROOTFS}" "${TEMP_MNT}" 188 sudo mount -o loop "${TEMP_ROOTFS}" "${TEMP_MNT}"
189 mkdir -p "${TEMP_ESP_MNT}" 189 mkdir -p "${TEMP_ESP_MNT}"
190 sudo mount -o loop "${TEMP_ESP}" "${TEMP_ESP_MNT}" 190 sudo mount -o loop "${TEMP_ESP}" "${TEMP_ESP_MNT}"
191 191
192 sudo python "${SCRIPTS_DIR}/fixup_image_for_qemu.py" \
193 --mounted_dir="${TEMP_MNT}"
194
192 # Modify the unverified usb template which uses a default usb_disk of sdb3 195 # Modify the unverified usb template which uses a default usb_disk of sdb3
193 sudo sed -i -e 's/sdb3/sda3/g' "${TEMP_MNT}/boot/syslinux/usb.A.cfg" 196 sudo sed -i -e 's/sdb3/sda3/g' "${TEMP_MNT}/boot/syslinux/usb.A.cfg"
194 197
195 # Unmount everything prior to building a final image 198 # Unmount everything prior to building a final image
196 sync 199 sync
197 trap - INT TERM EXIT 200 trap - INT TERM EXIT
198 cleanup 201 cleanup
199 202
200 # TOOD(adlr): pick a size that will for sure accomodate the partitions. 203 # TOOD(adlr): pick a size that will for sure accomodate the partitions.
201 dd if=/dev/zero of="${TEMP_IMG}" bs=1 count=1 \ 204 dd if=/dev/zero of="${TEMP_IMG}" bs=1 count=1 \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 echo "${VMX_CONFIG}" 275 echo "${VMX_CONFIG}"
273 fi 276 fi
274 277
275 278
276 if [ "${FLAGS_format}" == "qemu" ]; then 279 if [ "${FLAGS_format}" == "qemu" ]; then
277 echo "If you have qemu-kvm installed, you can start the image by:" 280 echo "If you have qemu-kvm installed, you can start the image by:"
278 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=v irtio " \ 281 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=v irtio " \
279 "-net user,hostfwd=tcp::9222-:22 \\" 282 "-net user,hostfwd=tcp::9222-:22 \\"
280 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" 283 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}"
281 fi 284 fi
OLDNEW
« no previous file with comments | « fixup_image_for_qemu.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698