From f4dfd18b12d101f272a84d98ac708cc777a0a9b6 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 22 Aug 2012 17:00:40 -0700 Subject: [PATCH] Drop fixup_image_for_qemu.py; ChromeOS works fine in qemu/kvm without an xorg.conf fixup_image_for_qemu.py exists only to add an xorg.conf; however, Xorg's autodetection has handled qemu/kvm just fine for quite a while now, with or without -vga std. Drop the script and the call to it from image_to_vm.sh. BUG=None TEST=Build an image, confirm that it still works fine in kvm and autodetects an appropriate resolution. Change-Id: I9f550fef1eebe7387d232795105ec47bfa908f22 Reviewed-on: https://gerrit.chromium.org/gerrit/31181 Tested-by: Josh Triplett Reviewed-by: Rahul Chaturvedi Commit-Ready: Josh Triplett --- fixup_image_for_qemu.py | 57 ----------------------------------------- image_to_vm.sh | 3 --- 2 files changed, 60 deletions(-) delete mode 100755 fixup_image_for_qemu.py diff --git a/fixup_image_for_qemu.py b/fixup_image_for_qemu.py deleted file mode 100755 index 14a57dac87..0000000000 --- a/fixup_image_for_qemu.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Makes changes to mounted Chromium OS image to allow it to run with VMs - -This script changes two files within the Chromium OS image to let the image -work with VMs, particularly QEMU - -Currently this script does the following, -1.) Modify xorg.conf to advertize a screen which can do 1280x1024 -""" - -from optparse import OptionParser -import os -import stat -import sys - -USAGE = "usage: %prog --mounted_dir=directory" - -REPLACE_SCREEN_PAIR = ('Identifier "DefaultMonitor"', - 'Identifier "DefaultMonitor"\n HorizSync 28-51\n VertRefresh 43-60') -XORG_CONF_FILENAME = os.path.join('etc', 'X11', 'xorg.conf') - - -# Modify the xorg.conf file to change all screen sections -def FixXorgConf(mount_point): - xorg_conf_filename = os.path.join(mount_point, XORG_CONF_FILENAME) - f = open(xorg_conf_filename, 'r') - xorg_conf = f.read() - f.close() - - # Add refresh rates for the screen - xorg_conf = xorg_conf.replace(REPLACE_SCREEN_PAIR[0], - REPLACE_SCREEN_PAIR[1]) - - # Write the file back out. - f = open(xorg_conf_filename, 'w') - f.write(xorg_conf) - f.close() - -def main(): - parser = OptionParser(USAGE) - parser.add_option('--mounted_dir', dest='mounted_dir', - help='directory where the Chromium OS image is mounted') - (options, args) = parser.parse_args() - - if not options.mounted_dir: - parser.error("Please specify the mount point for the Chromium OS image"); - - FixXorgConf(options.mounted_dir) - - -if __name__ == '__main__': - main() diff --git a/image_to_vm.sh b/image_to_vm.sh index 258c1195d2..4b236ef6c8 100755 --- a/image_to_vm.sh +++ b/image_to_vm.sh @@ -157,9 +157,6 @@ sudo mount -o loop "${TEMP_ROOTFS}" "${TEMP_MNT}" mkdir -p "${TEMP_ESP_MNT}" sudo mount -o loop "${TEMP_ESP}" "${TEMP_ESP_MNT}" -sudo python "${SCRIPTS_DIR}/fixup_image_for_qemu.py" \ - --mounted_dir="${TEMP_MNT}" - # Modify the unverified usb template which uses a default usb_disk of sdb3 sudo sed -i -e 's/sdb3/sda3/g' "${TEMP_MNT}/boot/syslinux/usb.A.cfg"