bootlab turns "cross-compile a QNX program, rebuild the OS image, boot it in QEMU and check the serial console" into a single, CI-friendly command: bootlab doctor, bootlab new, bootlab build, bootlab up.

What it does

  • One command regenerates the QNX image and boots it - no manual mkqnximage/QEMU juggling.
  • Assertions, not vibes - declare the serial lines that prove a healthy boot (Startup complete, your probe's output, a checksum) and get a PASS/FAIL exit code suitable for CI.
  • True arrival timing - every matched line is timestamped when it actually arrived on the serial stream, so boot-phase regressions show up as numbers.
  • No KVM required - the default QEMU configuration boots QNX 8.0 under TCG (software emulation), which works on unprivileged hosts and CI runners without nested virtualization.
  • No private host state in your repo - all machine-specific paths live in one bootlab.json; the tool itself is a single stdlib-only Python file.

A real run against QNX SDP 8.0 ends like this (full transcript in the README):

  [  21.4s] match: contains 'bootlab-probe: sysname=QNX'
  [  21.5s] match: contains 'Startup complete'
bootlab: PASS (4/4 assertions, 21.54s elapsed)

Where the QNX connection lives

  • bootlab is a stdlib-Python CLI. cmd_build() shells out to the QNX SDP 8.0 qcc cross-compiler; cmd_up() drives mkqnximage, the QNX 8.0 IFS image generator, then boots the produced image with qemu-system-x86_64 (IFS as kernel, serial assertions on stdio).
  • Snippet management writes real QNX buildfile entries (local/snippets/ifs_files.custom) plus a post_start.custom launcher fragment consumed by mkqnximage.
  • example/probe.c is a genuine QNX C program (qcc-compiled for qnx.target.x86_64) that prints the guest uname, a CLOCK_MONOTONIC reading, a deterministic prime checksum and done rc=0 - proof the guest booted, userspace ran and the code executed.
  • Field notes document the QNX-specific gotchas that cost real time: the silent qemu64 startup wedge, post_start.custom being a shell fragment rather than buildfile syntax, and mkqnximage caching behaviour.

Requirements

QNX SDP 8.0 itself is proprietary BlackBerry/QNX software and is not included; free non-commercial licenses are available through the QNX Everywhere program. Build and run instructions (QNX version, target = QEMU x86_64, toolchain = qcc) are in the README. MIT licensed.

Built With

  • c
  • ci
  • developer-tools
  • python
  • qemu
  • qnx
  • rtos
Share this project:

Updates