def _BuildCommand(self): qemu_exec = 'qemu-system-'+self._GetTargetSdkLegacyArch() qemu_command = [os.path.join(GetEmuRootForPlatform(self._emu_type), 'bin', qemu_exec)] qemu_command.extend(self._BuildQemuConfig()) qemu_command.append('-nographic') return qemu_command
def _BuildCommand(self): if self._target_cpu == 'arm64': qemu_exec = 'qemu-system-' + 'aarch64' elif self._target_cpu == 'x64': qemu_exec = 'qemu-system-' + 'x86_64' else: raise Exception('Unknown target_cpu %s:' % self._target_cpu) qemu_command = [ os.path.join(GetEmuRootForPlatform(self.EMULATOR_NAME), 'bin', qemu_exec) ] qemu_command.extend(self._BuildQemuConfig()) qemu_command.append('-nographic') return qemu_command
def _BuildCommand(self): aemu_folder = GetEmuRootForPlatform(self.EMULATOR_NAME) self._EnsureEmulatorExists(aemu_folder) aemu_path = os.path.join(aemu_folder, 'emulator') # `VirtioInput` is needed for touch input device support on Fuchsia. # `RefCountPipe` is needed for proper cleanup of resources when a process # that uses Vulkan dies inside the guest aemu_features = 'VirtioInput,RefCountPipe' # Configure the CPU to emulate. # On Linux, we can enable lightweight virtualization (KVM) if the host and # guest architectures are the same. if self._IsKvmEnabled(): aemu_features += ',KVM,GLDirectMem,Vulkan' else: if self._target_cpu != 'arm64': aemu_features += ',-GLDirectMem' # Use Swiftshader for Vulkan if requested gpu_target = 'swiftshader_indirect' if self._hardware_gpu: gpu_target = 'host' aemu_command = [aemu_path] if not self._enable_graphics: aemu_command.append('-no-window') # All args after -fuchsia flag gets passed to QEMU aemu_command.extend([ '-feature', aemu_features, '-window-size', '1024x600', '-gpu', gpu_target, '-verbose', '-fuchsia' ]) aemu_command.extend(self._BuildQemuConfig()) aemu_command.extend([ '-vga', 'none', '-device', 'virtio-keyboard-pci', '-device', 'virtio_input_multi_touch_pci_1', '-device', 'ich9-ahci,id=ahci' ]) if platform.machine() == 'x86_64': aemu_command.extend( ['-device', 'isa-debug-exit,iobase=0xf4,iosize=0x04']) logging.info(' '.join(aemu_command)) return aemu_command
def _BuildCommand(self): aemu_exec = 'emulator-headless' aemu_folder = GetEmuRootForPlatform(self._emu_type) self._EnsureEmulatorExists(aemu_folder) aemu_path = os.path.join(aemu_folder, aemu_exec) # `VirtioInput` is needed for touch input device support on Fuchsia. # `RefCountPipe` is needed for proper cleanup of resources when a process # that uses Vulkan dies inside the guest aemu_features = 'VirtioInput,RefCountPipe' # Configure the CPU to emulate. # On Linux, we can enable lightweight virtualization (KVM) if the host and # guest architectures are the same. if self._IsKvmEnabled(): aemu_features += ',KVM,GLDirectMem,Vulkan' else: if self._target_cpu != 'arm64': aemu_features += ',-GLDirectMem' # All args after -fuchsia flag gets passed to QEMU aemu_command = [ aemu_path, '-feature', aemu_features, '-window-size', '1024x600', '-gpu', 'swiftshader_indirect', '-fuchsia' ] aemu_command.extend(self._BuildQemuConfig()) aemu_command.extend([ '-vga', 'none', '-device', 'isa-debug-exit,iobase=0xf4,iosize=0x04', '-device', 'virtio-keyboard-pci', '-device', 'virtio_input_multi_touch_pci_1', '-device', 'ich9-ahci,id=ahci' ]) logging.info(' '.join(aemu_command)) return aemu_command
def _GetVulkanIcdFile(self): return os.path.join(GetEmuRootForPlatform(self.EMULATOR_NAME), 'lib64', 'vulkan', 'vk_swiftshader_icd.json')