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
bootlabis a stdlib-Python CLI.cmd_build()shells out to the QNX SDP 8.0qcccross-compiler;cmd_up()drivesmkqnximage, the QNX 8.0 IFS image generator, then boots the produced image withqemu-system-x86_64(IFS as kernel, serial assertions on stdio).- Snippet management writes real QNX buildfile entries (
local/snippets/ifs_files.custom) plus apost_start.customlauncher fragment consumed by mkqnximage. example/probe.cis a genuine QNX C program (qcc-compiled forqnx.target.x86_64) that prints the guestuname, aCLOCK_MONOTONICreading, a deterministic prime checksum anddone 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
qemu64startup wedge,post_start.custombeing 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.