pmb.qemu package

Submodules

pmb.qemu.run module

pmb.qemu.run.command_qemu(config: Config, arch: Arch, cmdline_arg: str, qemu_audio: str | None, qemu_cpu: str | None, qemu_display: str, qemu_video: str, memory_size: int, port_ssh: int, use_host_qemu: bool, use_qemu_gl: bool, use_qemu_kvm: bool, use_qemu_tablet: bool, img_path: Path, img_path_2nd: Path | None = None) tuple[list[str | Path], dict[str, Path | str]]

Generate the full qemu command with arguments to run postmarketOS

pmb.qemu.run.create_gdk_loader_cache() Path

Create a gdk loader cache that can be used for running GTK UIs outside of the chroot.

pmb.qemu.run.create_second_storage(size: str, device: str) Path

Generate a second storage image if it does not exist.

Returns:

path to the image or None

pmb.qemu.run.install_depends(arch: Arch) None

Install any necessary qemu dependencies in native chroot

pmb.qemu.run.resize_image(img_size_new: str, img_path: Path) None

Truncates an image to a specific size. The value must be larger than the current image size, and it must be specified in MiB or GiB units (powers of 1024).

Parameters:
  • img_size_new – new image size in M or G

  • img_path – the path to the image

pmb.qemu.run.run(cmdline_arg: str, qemu_audio: str | None, qemu_cpu: str | None, qemu_display: str, qemu_video: str, memory_size: int, image_size: str | None, second_storage: str | None, port_ssh: int, use_efi: bool, use_host_qemu: bool, use_qemu_gl: bool, use_qemu_kvm: bool, use_qemu_tablet: bool) None

Run a postmarketOS image in qemu

pmb.qemu.run.system_image(device: str) Path

Returns path to rootfs for specified device. In case that it doesn’t exist, raise and exception explaining how to generate it.

pmb.qemu.run.which_qemu(arch: Arch) str

Finds the qemu executable or raises an exception otherwise

Module contents