A QNX system image is assembled by mkifs from a .build recipe: a list of files, attributes and directives that decides what lands in the image and where. The failure modes of a hand-edited recipe are nasty: a mistyped host path is only discovered when the image build runs, and a missing optional file can slip through as a board that boots without a driver. Two entries writing to the same in-image path silently shadow each other. An attribute typo (owner= instead of uid=, perms=0999) is ignored or misread, so the image ships with the wrong ownership and permissions. A $(VARIABLE) that nobody defined expands to nothing and corrupts a path. An image section with no startup entry produces an image that cannot boot.
None of these need a target board, or even the QNX SDP, to detect. They are static properties of the recipe text and the host files it references.
QNX Build Doctor parses .build files on any Linux, macOS, or Windows host, checks them against ten rules, and prints a structured report with line numbers, severities, and stable rule ids (BD001 to BD010): syntax errors, referenced host files that do not exist, duplicate target paths inside one image, undefined variables, perms values that are not valid octal, unknown attribute keys that mkifs would silently ignore, non-numeric uid/gid, image sections with no startup entry, absolute host paths, and empty image sections. It never invokes mkifs and never modifies the recipe. Exit code is 0 when no errors are found and 1 when errors exist, so the doctor drops straight into a pre-commit hook or CI step next to mkifs. A --json mode emits machine-readable diagnostics. 30 automated tests cover the parser, every rule with positive and negative cases, and end-to-end runs over the bundled samples.
Honest scope: this is host-side static validation by design; it does not run QNX or mkifs and does not replace them. It was built new for the QNX Global Hackathon 2026. Sample recipes and host files in the repo are fictional placeholders written for this project.
Built With
- node.js
- typescript
- vitest
