Skip to content

feat: add QNX process configuration, schema, docs for TimeSlave reference Integration - #158

Open
gordon9901 wants to merge 5 commits into
eclipse-score:mainfrom
gordon9901:ecarx_pr5_qnx_config_and_docs
Open

feat: add QNX process configuration, schema, docs for TimeSlave reference Integration#158
gordon9901 wants to merge 5 commits into
eclipse-score:mainfrom
gordon9901:ecarx_pr5_qnx_config_and_docs

Conversation

@gordon9901

@gordon9901 gordon9901 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR adds the configuration required to build and run the TimeSlave process on QNX:

  • Add QNX JSON configuration for TimeSlave (iface_name, PHC, QNX BPF shim settings)
  • Add a representative example configuration showing all supported fields
  • Add JSON Schema (Draft 2020-12) plus a Bazel validate_json_schema_test lint rule
  • Add Bazel build infrastructure: ITF framework, rules_pkg, rules_oci, score_rules_imagefs, json-schema-validator
  • Add QNX setup documentation covering prerequisites, build/run steps, and config usage
  • Add QEMU reference integration test verifying binary/config deployment, interface presence, and config loading under QNX

Closes #141

#test QNX

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

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]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 087203cc-77c9-4291-a70a-6ca7af7e6158
Computing main repo mapping: 
WARNING: /home/runner/work/time/time/MODULE.bazel:13:7: The attribute 'compatibility_level' in module() is a no-op and will be removed in a future Bazel release. Please remove it from your MODULE.bazel file.
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'rules_oci', the root module requires module version rules_oci@2.2.7, but got rules_oci@2.3.0 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 3 packages loaded
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Loading: 3 packages loaded
    currently loading: 
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)
Analyzing: target //:license-check (4 packages loaded, 0 targets configured)

Analyzing: target //:license-check (33 packages loaded, 10 targets configured)

Analyzing: target //:license-check (89 packages loaded, 10 targets configured)

Analyzing: target //:license-check (142 packages loaded, 807 targets configured)

Analyzing: target //:license-check (153 packages loaded, 3722 targets configured)

Analyzing: target //:license-check (153 packages loaded, 6154 targets configured)

Analyzing: target //:license-check (157 packages loaded, 9246 targets configured)

Analyzing: target //:license-check (165 packages loaded, 9284 targets configured)

Analyzing: target //:license-check (165 packages loaded, 9284 targets configured)

Analyzing: target //:license-check (165 packages loaded, 9284 targets configured)

Analyzing: target //:license-check (168 packages loaded, 11172 targets configured)

INFO: Analyzed target //:license-check (170 packages loaded, 11422 targets configured).
[9 / 16] checking cached actions
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 29.255s, Critical Path: 2.66s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

@gordon9901
gordon9901 force-pushed the ecarx_pr5_qnx_config_and_docs branch from 8a7b319 to d30c777 Compare August 7, 2026 04:46
@gordon9901 gordon9901 self-assigned this Aug 7, 2026
@gordon9901 gordon9901 changed the title Add QNX process configuration, schema, docs for TimeSlave reference Integration feat:add QNX process configuration, schema, docs for TimeSlave reference Integration Aug 7, 2026
@gordon9901 gordon9901 changed the title feat:add QNX process configuration, schema, docs for TimeSlave reference Integration feat: add QNX process configuration, schema, docs for TimeSlave reference Integration Aug 7, 2026
@@ -0,0 +1,94 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://eclipse-score.github.io/score_inc_time/time_slave_config_schema.json",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"$id": "https://eclipse-score.github.io/score_inc_time/time_slave_config_schema.json",
"$id": "https://eclipse-score.github.io/score_time/time_slave_config_schema.json",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

"default": 0,
"description": "gPTP domain number."
},
"pdelay_interval_ms": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we use the logarithmic values instead - as defined in the IEEE documents?
At least we should rename to:

Suggested change
"pdelay_interval_ms": {
"pdelay_req_interval_ms": {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Renamed to pdelay_req_interval_ms across the schema, parser, engine and all configs to match IEEE 1588 terminology. Kept the unit in milliseconds rather than switching to the log2 encoding — ms is far more intuitive for a user-facing config field; we can add a log2 variant later if strict IEEE parity is needed.

ParseOptionalBool(phc_obj, "enabled", cfg.enabled);
ParseOptionalString(phc_obj, "device", cfg.device);
ParseOptionalInt(phc_obj, "step_threshold_ns", cfg.step_threshold_ns);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are such kind of parsing functions not already avaliable in the json parser?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I first tried using score::json::GetAttribute + Result::value_or(), but hit two issues: GetAttribute's SFINAE only accepts reference_wrapper / Result<...> (not raw Object&), and value_or() collapses "key missing" and "wrong type" into the same path — so a type error would silently fall back to the default instead of failing fast. Our wrappers exist solely to draw that distinction; dropped the unused IsKeyNotFound helper while at it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you - maybe - create a ticket for the S-CORE json parser describing that issue? I guess, other will have the same issue ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will create an issue to explain this problem.

@BjoernAtBosch BjoernAtBosch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gordon9901
gordon9901 force-pushed the ecarx_pr5_qnx_config_and_docs branch from 08d0eeb to 1559010 Compare August 13, 2026 08:34
@@ -0,0 +1,57 @@
"""
Creates "validate_json_schema_test" test rule which validates the input "json" file against its "schema"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

package(default_visibility = ["//visibility:public"])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think the default public visibility is a good idea. we should know, which of targets are public and which are not

.. code-block:: shell

# (Once) Source the setup helper to register QNX and toolchain paths.
source tools/setup_toolchain.sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

where this script is present?

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Improvement: Add QNX process configuration, schema, documentation for TimeSlave reference Integration

3 participants