{"id":47795064,"url":"https://github.com/eclipse-score/toolchains_qnx","last_synced_at":"2026-04-03T16:13:57.001Z","repository":{"id":281180656,"uuid":"943998419","full_name":"eclipse-score/toolchains_qnx","owner":"eclipse-score","description":"Bazel toolchains for QNX","archived":false,"fork":false,"pushed_at":"2025-12-15T11:50:31.000Z","size":692,"stargazers_count":3,"open_issues_count":6,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-12-18T10:15:30.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://eclipse-score.github.io/toolchains_qnx","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-score.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-06T16:04:44.000Z","updated_at":"2025-12-15T11:46:34.000Z","dependencies_parsed_at":"2025-03-07T12:38:39.499Z","dependency_job_id":"505981f1-ee41-4be8-999d-cc291f84865f","html_url":"https://github.com/eclipse-score/toolchains_qnx","commit_stats":null,"previous_names":["eclipse-score/toolchains_qnx"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-score/toolchains_qnx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_qnx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_qnx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_qnx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_qnx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-score","download_url":"https://codeload.github.com/eclipse-score/toolchains_qnx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-score%2Ftoolchains_qnx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31362716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T16:13:56.007Z","updated_at":"2026-04-03T16:13:56.984Z","avatar_url":"https://github.com/eclipse-score.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bazel toolchains for QNX\n\n\u003e [!WARNING]\n\u003e **Deprecated:** This repository should not be used anymore.\n\u003e Starting with `v0.6`, use `https://github.com/eclipse-score/bazel_cpp_toolchains` instead.\n\nThis module implements support for [QNX SDP 8.0](https://www.qnx.com/products/everywhere/index.html) and QNX SDP 7.1.\n\n## Usage\n\nMODULE.bazel\n```\nbazel_dep(name = \"score_toolchains_qnx\", version = \"0.1\")\n\ntoolchains_qnx = use_extension(\"@score_toolchains_qnx//:extensions.bzl\", \"toolchains_qnx\")\ntoolchains_qnx.sdp(\n    url = \"http://example.com/qnx800.tar.gz\",\n    sha256 = \"\u003cpackage sha256\u003e\",\n    version = \"8.0.0\",\n)\n\nuse_repo(toolchains_qnx, \"toolchains_qnx_sdp\")\nuse_repo(toolchains_qnx, \"toolchains_qnx_qcc\")\n\nregister_toolchains(\"@toolchains_qnx_qcc//:qcc_x86_64\")\nregister_toolchains(\"@toolchains_qnx_qcc//:qcc_aarch64\")\n```\n\nFor QNX 7.1 archives (e.g. `deployed_qnx710.zip`), set `version = \"7.1.0\"` and `strip_prefix = \"qnx710\"` and use the `:x86_64-qnx7_1` / `:aarch64-qnx7_1` platforms.\n\n\u003eNOTE: registering toolchains above may make your life harder if you will need to use multiple\ntoolchains targeting same `arch` and `os` but with different SDP. In such case you may use\n`build:x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64` to register toolchain \nonly for certain build config.\n\n.bazelrc\n```\nbuild:x86_64-qnx --incompatible_strict_action_env\nbuild:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx\nbuild:x86_64-qnx --sandbox_writable_path=/var/tmp\n\nbuild:aarch64-qnx8 --incompatible_strict_action_env\nbuild:aarch64-qnx8 --platforms=@score_bazel_platforms//:arm64-qnx8_0\nbuild:aarch64-qnx8 --sandbox_writable_path=/var/tmp\n\nbuild:x86_64-qnx7 --incompatible_strict_action_env\nbuild:x86_64-qnx7 --platforms=@score_bazel_platforms//:x86_64-qnx7_1\nbuild:x86_64-qnx7 --sandbox_writable_path=/var/tmp\n\nbuild:aarch64-qnx7 --incompatible_strict_action_env\nbuild:aarch64-qnx7 --platforms=@score_bazel_platforms//:arm64-qnx7_1\nbuild:aarch64-qnx7 --sandbox_writable_path=/var/tmp\n```\n\nUSER .bazelrc\nIn case of QNX floating license setting is necessary you have to define the right value in your user .bazelrc like:\n```\ncommon --action_env=QNXLM_LICENSE_FILE=\u003cyour_license_url\u003e\n```\n\n```/var/tmp``` needs to be writeable inside of the sandbox because of the license management done by the QNX tools.\n\n## Where to obtain the QNX 8.0 SDP\n\nFollow the tutorial to obtain the SDP and corresponding license and install SDP via Software Center: \n- https://www.youtube.com/watch?v=DtWA5E-cFCo\n- https://www.youtube.com/watch?v=s8_rvkSfj10\n\nThe QNX SDP is by default installed to ```~/qnx800```.\nThe archive of this directory is the input for the toolchains_qnx extension.\n\nIt is currently assumed that the license is deployed to ```/opt/score_qnx/license/licenses```.\nBy default QNX tooling installs the license in ```~/.qnx/license/licenses```.\n\n## Using pre-packaged QNX 8.0 SDP\n\nPre-packaged SDP requires authentication with ones QNX login and password.\nFor this the ```tools/qnx_credential_helper.py``` needs to be used.\n\nThe credential helper is a standalone application and cannot be referenced as Bazel target.\nFor this the credential helper needs to be put:\n\n- as an absolute path:\n```\ncommon --credential_helper=*.qnx.com=/path/to/qnx_credential_helper.py\n```\n\n- in $PATH and referenced as:\n```\ncommon --credential_helper=*.qnx.com=qnx_credential_helper.py\n```\n\n- in your module source and referenced as:\n```\ncommon --credential_helper=*.qnx.com=%worksapce%/path/to/qnx_credential_helper.py\n```\n\nThe credentials are taken from .netrc or from enviroment variables ```SCORE_QNX_USER``` and ```SCORE_QNX_PASSWORD```.\n\n\n# Repository layout (testing bits)\n\n```\ntests/\n  BUILD\n  init_rpi4.build           # QNX buildfile for aarch64\n  init_x86_64.build         # QNX buildfile for x86_64\n  run_qemu.sh               # Wrapper to launch QEMU with our IFS + DTB\n  third_party/\n    qemu-aarch64/\n      bin/qemu-system-aarch64\n      share/qemu/...        # (keymaps/pc-bios as needed by your build)\n    raspi/\n      boot-files/bcm2711-rpi-4-b.dtb\n```\n\n---\n\n## Why a custom QEMU for aarch64?\n\nUbuntu 24.04’s packaged QEMU does not ship the `-M raspi4b` machine with BCM2711 peripherals needed for QNX bring-up on RPi 4. We therefore build the QEMU described in the Medium post above and add just the artifacts we need:\n\n- `third_party/qemu-aarch64/bin/qemu-system-aarch64`\n- `third_party/qemu-aarch64/share/qemu/*` assets such as keymaps / pc-bios\n- RPi4 DTB: `third_party/raspi/boot-files/bcm2711-rpi-4-b.dtb`\n\nThis makes the flow reproducible and independent of the host’s system QEMU.\n\n---\n\n## Building the IFS\n\nWe use a small Bazel rule (`qnx_ifs`) that wraps `mkifs`. For aarch64 we also pass `-r install` so the buildfile can reference staged files relative to `install/`.\n\nKey points:\n- The aarch64 image pulls in the RPi4 BSP’s `startup-bcm2711-rpi4`.\n- `main_cpp` is placed at `/usr/bin/main_cpp` inside the image (staged from `bazel-bin/install/usr/bin/main_cpp`).\n\nTypical build:\n\n```bash\nbazel build //...   --config=aarch64-qnx\n```\n\n---\n\n## Running under QEMU (aarch64)\n\nWe launch with the RPi4 machine, our DTB, and the IFS:\n\n```bash\nbazel run //tests:run_qemu\n# Internally runs something like:\n# third_party/qemu-aarch64/bin/qemu-system-aarch64 \\\n#   -M raspi4b \\\n#   -kernel bazel-bin/init_aarch64.ifs \\\n#   -dtb third_party/raspi/boot-files/bcm2711-rpi-4-b.dtb \\\n#   -append \"startup-bcm2711-rpi4 -vvv -D miniuart\" \\\n#   -serial stdio \\\n#   -nographic -d unimp -s\n```\n\nOn boot, `main_cpp` executes and prints a “Hello” to the console.\n\n---\n\n## x86_64 vs aarch64 (BUILD multiplexing)\n\nWe use `config_setting` to multiplex:\n- **x86_64**: builds an x86_64 IFS and uses the host QEMU for x86 experiments.\n- **aarch64**: builds the RPi4 IFS and runs with the vendored QEMU + DTB above.\n\nThis keeps one workspace supporting both flows cleanly.\n\n---\n\n## Credits\n\n- QEMU RPi4 approach and DTB based on this article https://olof-astrand.medium.com/more-experiments-with-qnx-and-qemu-d24fa1961d9c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-score%2Ftoolchains_qnx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-score%2Ftoolchains_qnx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-score%2Ftoolchains_qnx/lists"}