Skip to content

Conversation

lool
Copy link
Contributor

@lool lool commented Oct 15, 2025

Add a new run-qemu.py helper script and update docs.

  • feat(scripts): Add run-qemu helper
  • refactor: Update README to use new run-qemu.py

Fixes: #66

lool added 2 commits October 15, 2025 16:25
Add a script to help with running QEMU:
- detects the EDK2 BIOS file on Linux and macOS
- looks for default filenames
- detects sector size
- (optionally) creates a COW disk
- emulates the lowest common denominator of supported boards
- passes all relevant devices to get to a GUI
- detects display backend
- offers headless mode

Fixes: qualcomm-linux#66

Signed-off-by: Loïc Minier <[email protected]>
Simplify our main README and leverage the new script.

Signed-off-by: Loïc Minier <[email protected]>
Copy link

Test Results

 2 files  ±0   6 suites  ±0   13m 38s ⏱️ ±0s
20 tests ±0  20 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 42e8ba5. ± Comparison against base commit e6d5312.

Copy link

Test jobs for commit 42e8ba5

Copy link

@lool
Copy link
Contributor Author

lool commented Oct 15, 2025

I tested this with:

  • ufs and sdcard images from our fileserver
  • on macOS and Linux
  • in the default GUI mode and in headless
  • passing extra args like memory
  • passing image file

This is a typical run on macOS:

% /path/to/run-qemu.py
Running: qemu-img create -b /Users/lminier/Downloads/daily-2025-10-14/disk-ufs.img -f qcow2 -F raw /var/folders/ck/_x41b6f91x993rvpkh0sw1nm04fpg8/T/qemu-cow-g2144upc/overlay.qcow
Formatting '/var/folders/ck/_x41b6f91x993rvpkh0sw1nm04fpg8/T/qemu-cow-g2144upc/overlay.qcow', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=4294967296 backing_file=/Users/lminier/Downloads/daily-2025-10-14/disk-ufs.img backing_fmt=raw lazy_refcounts=off refcount_bits=16
Running: qemu-system-aarch64 -cpu cortex-a57 -m 2048 -M virt -device virtio-gpu-pci -display cocoa -device usb-ehci,id=ehci -device usb-kbd -device usb-mouse -device virtio-scsi-pci,id=scsi1 -device scsi-hd,bus=scsi1.0,drive=disk1,physical_block_size=4096,logical_block_size=4096 -drive if=none,file=/var/folders/ck/_x41b6f91x993rvpkh0sw1nm04fpg8/T/qemu-cow-g2144upc/overlay.qcow,format=qcow2,id=disk1 -bios /opt/homebrew/opt/qemu/share/qemu/edk2-aarch64-code.fd

and on Debian:

/path/to/run-qemu.py --headless --image /path/to/disk-ufs.img
Running: qemu-img create -b /path/to/disk-ufs.img -f qcow2 -F raw /tmp/qemu-cow-knc3124_/overlay.qcow
Formatting '/tmp/qemu-cow-knc3124_/overlay.qcow', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=4294967296 backing_file=/path/to/disk-ufs.img backing_fmt=raw lazy_refcounts=off refcount_bits=16
Running: qemu-system-aarch64 -cpu cortex-a57 -m 2048 -M virt -device virtio-gpu-pci -display none -device usb-ehci,id=ehci -device usb-kbd -device usb-mouse -device virtio-scsi-pci,id=scsi1 -device scsi-hd,bus=scsi1.0,drive=disk1,physical_block_size=4096,logical_block_size=4096 -drive if=none,file=/tmp/qemu-cow-knc3124_/overlay.qcow,format=qcow2,id=disk1 -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -serial mon:stdio
UEFI firmware (version 2025.02-8 built at 02:18:11 on May 13 2025)

I can jump to the systemd-boot menu both in GUI and headless mode; I can see console boot messages and getty in headless mode, but not in GUI mode, and I can see the desktop in GUI mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QEMU support

1 participant