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

Side by Side Diff: image_to_vm.sh

Issue 6749020: Do not enable the use_tablet flag in qemu, as this breaks the mouse. (Closed) Base URL: ssh://gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Remove fixup_image_for_qemu.py entirely. Created 9 years, 9 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 if [ "${FLAGS_format}" = "qemu" ]; then
193 sudo python "${SCRIPTS_DIR}/fixup_image_for_qemu.py" \
194 --mounted_dir="${TEMP_MNT}" \
195 --enable_tablet=true
196 else
197 sudo python "${SCRIPTS_DIR}/fixup_image_for_qemu.py" \
198 --mounted_dir="${TEMP_MNT}" \
199 --enable_tablet=false
200 fi
201
202 # Modify the unverified usb template which uses a default usb_disk of sdb3 192 # Modify the unverified usb template which uses a default usb_disk of sdb3
203 sudo sed -i -e 's/sdb3/sda3/g' "${TEMP_MNT}/boot/syslinux/usb.A.cfg" 193 sudo sed -i -e 's/sdb3/sda3/g' "${TEMP_MNT}/boot/syslinux/usb.A.cfg"
204 194
205 # Unmount everything prior to building a final image 195 # Unmount everything prior to building a final image
206 sync 196 sync
207 trap - INT TERM EXIT 197 trap - INT TERM EXIT
208 cleanup 198 cleanup
209 199
210 # TOOD(adlr): pick a size that will for sure accomodate the partitions. 200 # TOOD(adlr): pick a size that will for sure accomodate the partitions.
211 dd if=/dev/zero of="${TEMP_IMG}" bs=1 count=1 \ 201 dd if=/dev/zero of="${TEMP_IMG}" bs=1 count=1 \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 echo "${VMX_CONFIG}" 272 echo "${VMX_CONFIG}"
283 fi 273 fi
284 274
285 275
286 if [ "${FLAGS_format}" == "qemu" ]; then 276 if [ "${FLAGS_format}" == "qemu" ]; then
287 echo "If you have qemu-kvm installed, you can start the image by:" 277 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 " \ 278 echo "sudo kvm -m ${FLAGS_mem} -vga std -pidfile /tmp/kvm.pid -net nic,model=v irtio " \
289 "-net user,hostfwd=tcp::9222-:22 \\" 279 "-net user,hostfwd=tcp::9222-:22 \\"
290 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}" 280 echo " -hda ${FLAGS_to}/${DEFAULT_QEMU_IMAGE}"
291 fi 281 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