Initial QNX8 QEMU images for x86_64 and arm64 - #5
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
There was a problem hiding this comment.
Pull request overview
This PR adds OS image modules for building QNX8 x86_64 and arm64 images that run on QEMU. The implementation requires QNX SDP 8.0.3 with virtio driver support for block and startup components.
Changes:
- Added QNX8 QEMU board configurations for x86_64 and arm64virt architectures with virtio drivers
- Integrated QNX toolchain dependencies and build configurations
- Created documentation and helper scripts for building and running the images
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| qnx8/boards/qemu-x86_64/target.build | Defines x86_64 QEMU target configuration including drivers, network setup, and startup scripts |
| qnx8/boards/qemu-x86_64/run-qemu-x86_64.sh | QEMU launch script for x86_64 with KVM acceleration and network/disk configuration |
| qnx8/boards/qemu-x86_64/qemu-x86_64.build | Build configuration for x86_64 QNX OS image with startup parameters |
| qnx8/boards/qemu-x86_64/net-start.sh | Network initialization script for x86_64 setting up static IP or DHCP |
| qnx8/boards/qemu-x86_64/mount-fs.sh | File system mounting script probing for QNX6 partitions |
| qnx8/boards/qemu-x86_64/misc-services.sh | Service startup script for qconn, sshd, and custom autostart |
| qnx8/boards/qemu-x86_64/initscript | Main initialization script orchestrating system startup sequence |
| qnx8/boards/qemu-x86_64/blk-start.sh | Block device driver initialization and RAM disk setup |
| qnx8/boards/qemu-x86_64/BUILD | Bazel build rules for creating the x86_64 IFS image and run script |
| qnx8/boards/qemu-arm64virt/target.build | Defines arm64virt QEMU target configuration with ARM-specific drivers |
| qnx8/boards/qemu-arm64virt/run-qemu-arm64virt.sh | QEMU launch script for arm64 with virt machine type |
| qnx8/boards/qemu-arm64virt/qemu-arm64virt.build | Build configuration for arm64 QNX OS image |
| qnx8/boards/qemu-arm64virt/net-start.sh | Network initialization script for arm64virt |
| qnx8/boards/qemu-arm64virt/mount-fs.sh | File system mounting script for arm64virt |
| qnx8/boards/qemu-arm64virt/misc-services.sh | Service startup script for arm64virt |
| qnx8/boards/qemu-arm64virt/initscript | Main initialization script for arm64virt |
| qnx8/boards/qemu-arm64virt/blk-start.sh | Block device driver initialization for arm64virt |
| qnx8/boards/qemu-arm64virt/BUILD | Bazel build rules for arm64virt IFS image |
| qnx8/boards/common/ssh_host_rsa_key.pub | SSH host RSA public key for sshd service |
| qnx8/boards/common/ssh_host_rsa_key | SSH host RSA private key |
| qnx8/boards/common/ssh_host_ed25519_key.pub | SSH host ED25519 public key |
| qnx8/boards/common/ssh_host_ed25519_key | SSH host ED25519 private key |
| qnx8/boards/common/common.build | Common build configuration shared between architectures including drivers, libraries, and utilities |
| qnx8/boards/common/BUILD | Bazel exports for common files used across board configurations |
| qnx8/README.md | Documentation for building and running QNX8 QEMU images |
| project_config.bzl | Updated project configuration removing rust source code entry |
| README.md | Root documentation describing OS images module purpose and features |
| MODULE.bazel | Added QNX toolchain dependency and configuration |
| .bazelrc | Added QNX toolchain settings and platform configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jörg Gittinger <156693757+jgetas@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jörg Gittinger <156693757+jgetas@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jörg Gittinger <156693757+jgetas@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jörg Gittinger <156693757+jgetas@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 31 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jörg Gittinger <156693757+jgetas@users.noreply.github.com>
| # target platform specific toolchains defined for QNX in this repo. | ||
| # Use --config=qnx8_0 for QNX platform builds | ||
| common:qnx8_0 --incompatible_strict_action_env | ||
| common:qnx8_0 --sandbox_writable_path=/var/tmp |
There was a problem hiding this comment.
please use name as in other repos ie arm64-qnx8
There was a problem hiding this comment.
I could do this but this is supposed to be used for x86_64 as well, because it is independent from target architecture - just using the host sdp. I did not want to create 2 configs with duplicate content.
There was a problem hiding this comment.
if " score_qnx_ifs_toolchain//:ifs-aarch64-qnx-sdp_8.0.0" is host x86 and target qnx8 arch/x86(is it ?) then why not the same here ?
| name = "score_qnx_imagefs_toolchain_pkg", | ||
| url = "https://www.qnx.com/download/download/87174/installation_qnx_803_260305.tar.xz", | ||
| sha256 = "9039fd6a4a639f06ea977afb93963a6fe8f8c46db727066709370d999c7232e0", | ||
| build_file = "//:sdp.BUILD", |
There was a problem hiding this comment.
its not going to work for others or ? this is dev dep anyway.
There was a problem hiding this comment.
? What do you mean? The sdp.BUILD? I wanted to have this in the rules_imagefs, but Nikola objected. Therefore I had to add it here. The content is IMHO generic for all QNX SDPs. So I don't expect this file will change.
There was a problem hiding this comment.
I am asking whether each consumer of this repo now needs to have this file ? since imagefs.sdp( is dev_dep here so it not exposed.
pawelrutkaq
left a comment
There was a problem hiding this comment.
Looks better, can You please create PR in ref_int to show usage there, before merging so we can see usability and correct if needed?
| name = "score_qnx_imagefs_toolchain_pkg", | ||
| url = "https://www.qnx.com/download/download/87174/installation_qnx_803_260305.tar.xz", | ||
| sha256 = "9039fd6a4a639f06ea977afb93963a6fe8f8c46db727066709370d999c7232e0", | ||
| build_file = "//:sdp.BUILD", |
There was a problem hiding this comment.
I am asking whether each consumer of this repo now needs to have this file ? since imagefs.sdp( is dev_dep here so it not exposed.
| # target platform specific toolchains defined for QNX in this repo. | ||
| # Use --config=qnx8_0 for QNX platform builds | ||
| common:qnx8_0 --incompatible_strict_action_env | ||
| common:qnx8_0 --sandbox_writable_path=/var/tmp |
There was a problem hiding this comment.
if " score_qnx_ifs_toolchain//:ifs-aarch64-qnx-sdp_8.0.0" is host x86 and target qnx8 arch/x86(is it ?) then why not the same here ?
| HOST_DLT_PORT=3490 | ||
| HOST_DOIP_PORT=13400 | ||
| # IP for SSH port forwarding. This value must match the IP address configured in guest QNX. | ||
| VM_IP=$NETWORK.20 |
There was a problem hiding this comment.
Can you please print out at begging netowrk vars& value and info that which can be set ?
1. Consistency Issues1.1 Massive code duplication between arm64virt and x86_64 boardsThe following files are identical between
This violates DRY and will cause maintenance drift. Fix: Move 1.2 Inconsistent DHCP config path in
|
| # | File | Issue |
|---|---|---|
| 1 | qnx8/boards/qemu-arm64virt/BUILD |
Trailing space after qnx_ifs (before paren) |
| 2 | MODULE.bazel |
Inconsistent closing paren indentation on imagefs.toolchain ( ) instead of )) |
| 3 | README.md |
Trailing space: # OS images |
| 4 | qnx8/README.md |
Multiple consecutive blank lines (line 236, etc.) |
| 5 | run-qemu-arm64virt.sh |
Comment says "Images generated by mkqnximage" — but images are generated by Bazel/mkifs, not mkqnximage |
| 6 | run-qemu-x86_64.sh |
Same "mkqnximage" comment |
| 7 | common.build |
[type=link] /tmp_discovery=/run/lola_discovery — lola-specific symlink in "generic" common build |
| 8 | target.build (arm64) |
export HOME=/ in profile — should be export HOME=/root to match the init script's HOME=/root |
| 9 | target.build (x86_64) |
Same HOME=/ inconsistency |
| 10 | blk-start.sh (arm64) |
Timeout of 30s for waitfor /dev/hd0 — will cause very slow feedback on failure |
| 11 | common.build |
perms=455 for /usr/bin/passwd — likely should be perms=4555 (setuid) like login and su |
7. Summary of Requested Changes
Must fix before merge:
- Fix the
PCI_HW_MODULEcopy-paste error in arm64virt profile (BCM2711/RPi4 reference). - Fix the DHCP config path inconsistency between arm64 and x86_64.
- Fix the
dev_dependency = Trueissue on the imagefs extension — external consumers can't build. - Add x86_64 toolchain registration and build config.
- Fix the CI license check failure.
- Run
buildifieron all BUILD files. - Fix the
HOSTNAMEinconsistency (x86_64qemu→qemu-x86_64).
Should fix before merge:
- Deduplicate
misc-services.shandmount-fs.sh(move tocommon/). - Fix the
HOME=/vsHOME=/rootinconsistency in profiles. - Remove the lola-specific
/tmp_discoverysymlink from the genericcommon.buildor make it conditional. - Update stale dependency versions in
MODULE.bazel.
Should address via follow-up (architecture):
- Restructure
common.buildinto feature-specific fragments to enable future feature-based composition. - Add a Bazel provider to the
qnx_ifstarget carrying image metadata (arch, machine type, default ports). - Create a
qemu_targetmacro or rule that composes IFS + disk + network config into a runnable, dependable target. - Document ITF integration with example
py_itf_testusage. - Design the
rules_pkg-based content deployment pipeline (pkg_tar→qnx_content_partition→qemu_target).
Add OS image modules for building QNX8 x86_64 and arm64 images running on QEMU.
Dependency is mainly a QNX SDP 8.0.3 with virtio driver ("block" and "startup") support. See qnx8/README.md.