Building a bootable QNX image and running it in QEMU should be one command. With the stock tools, it is not. qnxrun is a small Python CLI (stdlib only) that papers over the sharp edges of the mkqnximage flow:

  1. runimage needs host networking setup. It requires brctl, a setuid qemu-bridge-helper, and a bridge interface before it will launch QEMU at all. qnxrun launches QEMU directly with no NIC, so no host network setup is needed.
  2. The license lives in two places. The Software Center CLI stores it under /root/.qnx/license, while qcc reads $HOME/.qnx/license. qnxrun doctor spots the mismatch and build copies the license file into place.
  3. Image customisation is a snippet dance. Adding your binary means hand-writing local/snippets/ifs_files.custom and post_start.custom. qnxrun build generates both from --binary / --start-cmd.
  4. mkqnximage builds in the current directory and refuses non-empty dirs without --force. qnxrun handles both.

Commands: qnxrun doctor - check SDP, qcc, QEMU, license qnxrun new myapp - scaffold a hello-qnx project qnxrun build --binary ./hello-x86_64 - build a bootable QEMU image qnxrun run --project-dir ./qnx-image --timeout 60 - boot it, stream the serial console

Verified end to end on QNX SDP 8.0 (8.0.0.00141) and QEMU 8.2.2: a hello-world binary boots to "Hello from QNX 8.0!" on the serial console, and the QNX real-time patient monitor (https://github.com/sawi57003-ops/qnx-vitals-monitor) runs its full 90-second demo through qnxrun. x86_64 and aarch64le supported.

How it uses QNX: built specifically for the QNX SDP 8.0 workflow - drives mkqnximage (QNX image builder), qcc (QNX cross-compiler), and the QNX license system; generates QNX IFS entries and QNX boot commands; boots QNX 8.0 images in QEMU for x86_64 and aarch64le. Evidence files: qnxrun.py, README.md.

Build & run: Host Linux, Python 3.8+ (stdlib only, no dependencies). Requires QNX SDP 8.0 installed (default ~/qnx/sdp-8.0), qemu-system-x86_64 / qemu-system-aarch64. No build step: python3 qnxrun.py doctor to verify the setup. Full instructions in the repo README.

Built With

Share this project:

Updates

Submission history