| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 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 """Makes changes to mounted Chromium OS image to allow it to run with VMs | 7 """Makes changes to mounted Chromium OS image to allow it to run with VMs |
| 8 | 8 |
| 9 This script changes two files within the Chromium OS image to let the image | 9 This script changes two files within the Chromium OS image to let the image |
| 10 work with VMs, particularly QEMU | 10 work with VMs, particularly QEMU |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 import sys | 28 import sys |
| 29 | 29 |
| 30 USAGE = "usage: %prog --mounted_dir=directory --for_qemu=[true]" | 30 USAGE = "usage: %prog --mounted_dir=directory --for_qemu=[true]" |
| 31 | 31 |
| 32 POST_INST_IN_FILENAME = 'usr/sbin/chromeos-postinst' | 32 POST_INST_IN_FILENAME = 'usr/sbin/chromeos-postinst' |
| 33 POST_INST_OUT_FILENAME = 'postinst_vm' | 33 POST_INST_OUT_FILENAME = 'postinst_vm' |
| 34 XORG_CONF_FILENAME = os.path.join('etc', 'X11', 'xorg.conf') | 34 XORG_CONF_FILENAME = os.path.join('etc', 'X11', 'xorg.conf') |
| 35 | 35 |
| 36 EFI_CODE_MARKER_START = r'echo "Updating grub target for EFI BIOS"' | 36 EFI_CODE_MARKER_START = r'echo "Updating grub target for EFI BIOS"' |
| 37 EFI_CODE_MARKER_END = \ | 37 EFI_CODE_MARKER_END = \ |
| 38 r"""gpt -S boot -i $NEW_PART_NUM -b /tmp/oldpmbr.bin ${ROOT_DEV} 2>&1 | 38 r"""sh "${INSTALL_ROOT}"/usr/sbin/chromeos-firmwareupdate |
| 39 fi | 39 fi |
| 40 else""" | 40 else""" |
| 41 | 41 |
| 42 INPUT_SECTION_MARKER = r'Section "InputDevice"' | 42 INPUT_SECTION_MARKER = r'Section "InputDevice"' |
| 43 SECTION_END_MARKER = r'EndSection' | 43 SECTION_END_MARKER = r'EndSection' |
| 44 | 44 |
| 45 MOUSE_SECTION_IDENTIFIERS = [] | 45 MOUSE_SECTION_IDENTIFIERS = [] |
| 46 MOUSE_SECTION_IDENTIFIERS += ['Identifier "Mouse'] | 46 MOUSE_SECTION_IDENTIFIERS += ['Identifier "Mouse'] |
| 47 MOUSE_SECTION_IDENTIFIERS += ['Identifier "USBMouse'] | 47 MOUSE_SECTION_IDENTIFIERS += ['Identifier "USBMouse'] |
| 48 | 48 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if options.for_qemu not in ('true', 'false'): | 139 if options.for_qemu not in ('true', 'false'): |
| 140 parser.error("Please specify either true or false for --for_qemu") | 140 parser.error("Please specify either true or false for --for_qemu") |
| 141 | 141 |
| 142 FixPostInst(options.mounted_dir) | 142 FixPostInst(options.mounted_dir) |
| 143 if (options.for_qemu == 'true'): | 143 if (options.for_qemu == 'true'): |
| 144 FixXorgConf(options.mounted_dir) | 144 FixXorgConf(options.mounted_dir) |
| 145 | 145 |
| 146 | 146 |
| 147 if __name__ == '__main__': | 147 if __name__ == '__main__': |
| 148 main() | 148 main() |
| OLD | NEW |