Initial QNX8 QEMU images for x86_64 and arm64#5
Initial QNX8 QEMU images for x86_64 and arm64#5jgetas wants to merge 28 commits intoeclipse-score:mainfrom
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.
| module_name = "score_rules_imagefs", | ||
| remote = "https://github.com/eclipse-score/rules_imagefs.git", | ||
| commit = "38d5a1a5e5d83faa5d00e4d2f31c303db0d0f7de", | ||
| ) |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
this should be synchornized with SDP in toolchain. I habve no idea howwe do it now ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
no register in repo, only in bazelrc
project_config.bzl
Outdated
| PROJECT_CONFIG = { | ||
| "asil_level": "QM", | ||
| "source_code": ["python"], | ||
| } No newline at end of file |
There was a problem hiding this comment.
lot of files are missing empty end line
| 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.
| @@ -0,0 +1,32 @@ | |||
| load("@score_rules_imagefs//rules/qnx:ifs.bzl", "qnx_ifs") | |||
|
|
|||
| qnx_ifs ( | |||
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.shhow 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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I'll try to outline this better in the README.
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.