Skip to content

Initial QNX8 QEMU images for x86_64 and arm64#5

Open
jgetas wants to merge 28 commits intoeclipse-score:mainfrom
etas-contrib:feature/initial_qnx_support
Open

Initial QNX8 QEMU images for x86_64 and arm64#5
jgetas wants to merge 28 commits intoeclipse-score:mainfrom
etas-contrib:feature/initial_qnx_support

Conversation

@jgetas
Copy link
Copy Markdown

@jgetas jgetas commented Jan 15, 2026

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 15, 2026

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
2026/03/27 13:07:56 Downloading https://releases.bazel.build/8.3.1/release/bazel-8.3.1-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server (8.3.1) and connecting to it...
INFO: Invocation ID: 25d18506-6788-49c5-9fdf-107ed6201046
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'aspect_rules_lint', the root module requires module version aspect_rules_lint@1.3.1, but got aspect_rules_lint@1.5.3 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'buildifier_prebuilt', the root module requires module version buildifier_prebuilt@7.3.1, but got buildifier_prebuilt@8.2.0.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'score_bazel_platforms', the root module requires module version score_bazel_platforms@0.0.3, but got score_bazel_platforms@0.1.1 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:license-check': no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/os_images/os_images/BUILD
ERROR: no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/os_images/os_images/BUILD
INFO: Elapsed time: 9.458s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@jgetas jgetas marked this pull request as draft January 15, 2026 08:44
@kgraeper kgraeper requested a review from Copilot January 15, 2026 09:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

jgetas and others added 9 commits January 15, 2026 10:55
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>
@jgetas jgetas marked this pull request as ready for review March 26, 2026 14:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

jgetas and others added 3 commits March 26, 2026 15:38
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use name as in other repos ie arm64-qnx8

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

module_name = "score_rules_imagefs",
remote = "https://github.com/eclipse-score/rules_imagefs.git",
commit = "38d5a1a5e5d83faa5d00e4d2f31c303db0d0f7de",
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before merging release imagefs rules

imagefs = use_extension("@score_rules_imagefs//extensions:imagefs.bzl", "imagefs", dev_dependency = True)
imagefs.sdp(
name = "score_qnx_imagefs_toolchain_pkg",
url = "https://www.qnx.com/download/download/87174/installation_qnx_803_260305.tar.xz",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be synchornized with SDP in toolchain. I habve no idea howwe do it now ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. But I think it is no strict dependency from the build result, only if consumers want to pair it with compilation results from cpp toolchain. Therefore I thought let's merge the os_image first - currently nobody is using it anyway.
Maybe let's discuss on Monday in score infra meeting.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to use it right away in ref int. even before merging this as PoC and lifecycle is waiting in stands for it.

MODULE.bazel Outdated
"score_qnx_ifs_toolchain",
)

register_toolchains(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no register in repo, only in bazelrc

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok... will fix this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

PROJECT_CONFIG = {
"asil_level": "QM",
"source_code": ["python"],
} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lot of files are missing empty end line

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix

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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not going to work for others or ? this is dev dep anyway.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? 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.

@@ -0,0 +1,32 @@
load("@score_rules_imagefs//rules/qnx:ifs.bzl", "qnx_ifs")

qnx_ifs (
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the mechanism to import files into image from other bazel targets like in https://github.com/eclipse-score/reference_integration/blob/main/images/qnx_x86_64/build/BUILD#L59 exported via this repo. So the questions is if we shall rather provide also some extension from this repo too or macro so user can add it's own stuff easily?

Would be good that before merging this we have PoC PR in ref_int replacing current setup.

qnx8/README.md Outdated

### Autostart script

If the file `/opt/score/autostart.sh` exists on the mounted file system, it is executed at the end of the OS image startup sequence.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So after reading through 212 lines i could extract most important parts:

  • extern module cannot modify ifs (does not sound good, ie for some examples you need specific mount points, or additional qnx tools)
    -/opt/score/autostart.sh how this gets into the image ? The assumption is that provided qnx6fs has this ?
  • extern module must pack its stuff into qnx6fs

I tihnk this shall be breifly mentioned in main readme as MOST important points. Also I wonder whether this repo shall really provide abstraction via macro/extensions and gather all that from user so it's crystal clear. Now it's a bit foggy imho

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main idea is that the OS images are generic and not modified for individual use cases. If you want to use it for your whatever-tests, either create such a qnx6fs on your side and put all you want in it. Or boot with empty partition and populate it during runtime. The first qnx6fs partition on the external QEMU disk will automatically be mounted at /opt/score. If there is a "autostart.sh" on it, it will be automatically launched after boot.

Advantages are imho:

  • hiding complexity of creating OS images from testers
  • fast re-use by bazel cache
  • sort of standard OS foundation for target testing

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try to outline this better in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants