Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b470972
Update EBcLfSA to new integration structure
opajonk Mar 13, 2026
ee4e279
revert one change
opajonk Mar 17, 2026
6e1ccfa
change back - this is required
opajonk Mar 17, 2026
caa2fdd
latest commit - again
opajonk Mar 17, 2026
bf35aeb
Make QNX work
pawelrutkaq Mar 18, 2026
1720f19
Merge pull request #1 from qorix-group/pawelrutkaq_fix_qnx
opajonk Mar 18, 2026
23d822f
Fix module lock
pawelrutkaq Mar 18, 2026
98ac1e7
Merge pull request #2 from qorix-group/pawelrutkaq_fix_qnx
opajonk Mar 18, 2026
61a326f
fix formatting
opajonk Mar 18, 2026
d94a303
fix review findings
opajonk Mar 18, 2026
fbc9bcc
Use new lifecycle & health which includes our patch already
opajonk Mar 18, 2026
0d6853a
sync known_good and modules
opajonk Mar 18, 2026
3c84072
use http_file to download the archive
opajonk Mar 18, 2026
238f4e1
Refactor image building to be more clearer and faster
opajonk Mar 18, 2026
c62366f
extract EBcLfSA specific args from QEMU starter and make it generic
opajonk Mar 18, 2026
5a280c2
Merge branch 'main' into update_ebclfsa_integration
opajonk Mar 18, 2026
2ba01de
fix formatting
opajonk Mar 18, 2026
0a9c6a3
remove commented code, add check
opajonk Mar 19, 2026
fb9128e
switch to latest main of score_bazel_cpp_toolchains
opajonk Mar 19, 2026
200c534
drive-by-fix: script was not adapted to new file structure
opajonk Mar 20, 2026
d36eb3e
switch to latest main of score_bazel_cpp_toolchains
opajonk Mar 23, 2026
4bb2eb8
use latest devcontainer
opajonk Mar 23, 2026
b0f5f4a
switched to use tar files for encapsulating deployments
opajonk Mar 23, 2026
8d5fbb7
Merge branch 'main' into update_ebclfsa_integration
opajonk Mar 23, 2026
9572395
Add check for sshpass
opajonk Mar 23, 2026
bea0cc3
update lock file
opajonk Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build:_common --@score_communication//score/mw/com/flags:tracing_library=stub
build:_common --cxxopt=-Wno-error=mismatched-new-delete
build:_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
build:_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0

# Flags needed by datarouter
build:_common --@score_logging//score/datarouter/build_configuration_flags:persistent_logging=False
Expand All @@ -36,19 +36,18 @@ build:qnx-x86_64 --incompatible_enable_cc_toolchain_resolution
build:qnx-x86_64 --incompatible_strict_action_env
build:qnx-x86_64 --sandbox_writable_path=/var/tmp
build:qnx-x86_64 --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix
build:qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix
build:qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0
build:qnx-x86_64 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64
build:qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800

build:linux-x86_64 --config=_common
build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
build:linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix

build:eb-aarch64 --config=_common
build:eb-aarch64 --extra_toolchains=@gcc_toolchain//:aarch64_gcc_13
build:eb-aarch64 --platforms=@score_toolchains_gcc//platforms:aarch64-linux
build:eb-aarch64 --spawn_strategy=local

build:eb-aarch64 --extra_toolchains=@score_ebclfsa_toolchain//:aarch64-linux-sdk_0.1.0-ebclfsa
build:eb-aarch64 --extra_toolchains=@ferrocene_aarch64_ebclfsa//:rust_ferrocene_toolchain
build:eb-aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-sdk_0.1.0-ebclfsa

build:autosd-x86_64 --config=_common
build:autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eclipse-s-core",
"image": "ghcr.io/eclipse-score/devcontainer:v1.1.0",
"image": "ghcr.io/eclipse-score/devcontainer:v1.3.0",
"postCreateCommand": "bash .devcontainer/prepare_workspace.sh",
"postStartCommand": "ssh-keygen -f '/home/vscode/.ssh/known_hosts' -R '[localhost]:2222' || true"
}
1 change: 1 addition & 0 deletions .devcontainer/prepare_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sudo apt update
sudo apt install -y pipx

# Install gita
pipx ensurepath
pipx install gita

# Enable bash autocompletion for gita
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_ebclfsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
cache-save: ${{ github.event_name == 'push' }}
- name: Build for EB corbos Linux for Safety Applications and run tests
run: |
bazel build --lockfile_mode=error --config=eb-aarch64 //images/ebclfsa_aarch64/scrample_integration:run
bazel build --lockfile_mode=error --config=eb-aarch64 //images/ebclfsa_aarch64:run
- name: Upload test logs
uses: actions/upload-artifact@v5
with:
name: test-logs
path: |
bazel-bin/images/ebclfsa_aarch64/scrample_integration/*.log
bazel-bin/images/ebclfsa_aarch64/build/*.log
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{
"label": "Gita: Generate workspace",
"type": "shell",
"command": "gita",
"command": "/usr/local/py-utils/bin/gita",
"args": [
"clone",
"--preserve-path",
Expand Down
1,231 changes: 703 additions & 528 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bazel run //:docs_combo_experimental
- [Elektrobit corbos Linux for Safety Applications](./images/ebclfsa_aarch64/README.md)
- Linux x86_64

## Workspace support
## Workspace support

You can obtain a complete S-CORE workspace, i.e. a git checkout of all modules from `known_good.json`, on the specific branches / commits, integrated into one Bazel build.
This helps with cross-module development, debugging, and generally "trying out things".
Expand Down
49 changes: 13 additions & 36 deletions bazel_common/score_gcc_toolchains.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
# *******************************************************************************

bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2")
git_override(
module_name = "score_bazel_cpp_toolchains",
commit = "1a302d98b1f8f26864a38cb74761f891268a560f",
remote = "https://github.com/eclipse-score/bazel_cpp_toolchains.git",
)

gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
gcc.toolchain(
Expand All @@ -21,40 +26,13 @@ gcc.toolchain(
use_default_package = True,
version = "12.2.0",
)

# This is how new gcc more or less shall be registered: TBD by EB
# gcc.sdp(
# name = "fastdev_sdk",
# url = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
# strip_prefix = "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64",
# sha256 = "05b57bbc8d99d46df6b57f774c39a5a2664964ea7eb94147cbece08508c1f121",
# build_file = "//ebclfsa_aarch64/toolchain:gcc.BUILD",
# )
# gcc.toolchain(
# name = "score_ebclfsa_aarch64_toolchain",
# sdp_to_link = "fastdev_sdk",
# target_os = "linux",
# target_cpu = "aarch64",
# version = "12.2.0",
# extra_link_flags = [
# "-lpthread",
# ]
# )

# Workaround until above is fixed
bazel_dep(name = "score_toolchains_gcc", dev_dependency = True)
git_override(
# Elektrobit corbos Linux for Safety Applications needs a specific toolchain
module_name = "score_toolchains_gcc",
remote = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc.git",
tag = "0.5.0-beta", # corresponds to git sha 158921ffd9aabef41a2a03bca5baeaa9f4aa9d33
)

eb = use_extension("@score_toolchains_gcc//extensions:gcc.bzl", "gcc", dev_dependency = True)
eb.toolchain(
sha256 = "05b57bbc8d99d46df6b57f774c39a5a2664964ea7eb94147cbece08508c1f121",
strip_prefix = "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64",
url = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
gcc.toolchain(
name = "score_ebclfsa_toolchain",
runtime_ecosystem = "ebclfsa",
sdk_version = "0.1.0",
target_cpu = "aarch64",
target_os = "linux",
use_default_package = True,
)

bazel_dep(name = "os_autosd_toolchain", version = "0.0.1")
Expand All @@ -74,9 +52,8 @@ use_repo(autosd_10_gcc, "autosd_10_gcc_repo")
rpm_toolchain = use_extension("@rules_rpm//toolchain:extensions.bzl", "rpm_toolchain")
use_repo(rpm_toolchain, "rpm_toolchain")

use_repo(eb, "gcc_toolchain", "gcc_toolchain_gcc")

use_repo(
gcc,
"score_ebclfsa_toolchain",
"score_gcc_x86_64_toolchain",
)
8 changes: 8 additions & 0 deletions bazel_common/score_images.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ oci.pull(
)
use_repo(oci, "centos_stream10", "centos_stream10_linux_amd64")
use_repo(oci, "ubuntu_22_04", "ubuntu_22_04_linux_amd64")

http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

http_file(
name = "eb_corbos_toolkit_fastdev_archive",
sha256 = "9ca3891b27e4b7bbf6c519d8924283e89c03b62513a988f751a3ee3d10c293e4",
url = "https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
)
2 changes: 1 addition & 1 deletion bazel_common/score_modules_target_sw.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ git_override(
bazel_dep(name = "score_lifecycle_health")
git_override(
module_name = "score_lifecycle_health",
commit = "14ee704eeac03e03ca10bece5de8b694d3c5e2dd",
commit = "b72edf3a1c94fdf07295205b5cfa34576aab9235",
remote = "https://github.com/eclipse-score/lifecycle.git",
)

Expand Down
2 changes: 1 addition & 1 deletion bazel_common/score_modules_tooling.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
bazel_dep(name = "score_crates")
git_override(
module_name = "score_crates",
commit = "372438042bafe21146899dc1f89771a031d12ed0",
commit = "90539da0fd3e7e23e01f2b4de1679f7dfadd3b6b",
remote = "https://github.com/eclipse-score/score-crates.git",
)

Expand Down
31 changes: 31 additions & 0 deletions bazel_common/score_rust_toolchains.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,34 @@ git_override(
commit = "293337fd6402ec3dfbeb8f2d589f38ad9124dadd",
remote = "https://github.com/pawelrutkaq/rules_rust.git", # To be fixed once rule_rust is in score bazel registry
)

ferrocene = use_extension(
"@score_toolchains_rust//extensions:ferrocene_toolchain_ext.bzl",
"ferrocene_toolchain_ext",
)
ferrocene.toolchain(
name = "ferrocene_aarch64_ebclfsa",
coverage_tools_sha256 = "497958e925bc94833ea226d68f6d5ba38bd890f571c73e230141d2923e30dd94",
coverage_tools_strip_prefix = "779fbed05ae9e9fe2a04137929d99cc9b3d516fd/x86_64-unknown-linux-gnu",
coverage_tools_url = "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/coverage-tools-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-x86_64-unknown-linux-gnu.tar.gz",
exec_triple = "x86_64-unknown-linux-gnu",
extra_rustc_flags = [
"-Clink-arg=-Wl,--no-as-needed",
"-Clink-arg=-lstdc++",
"-Clink-arg=-static-libstdc++",
"-Clink-arg=-static",
"-Clink-arg=-lm",
"-Clink-arg=-lc",
],
sha256 = "b1f1eb1146bf595fe1f4a65d5793b7039b37d2cb6d395d1c3100fa7d0377b6c9",
target_compatible_with = [
"@platforms//cpu:aarch64",
"@platforms//os:linux",
],
target_triple = "aarch64-unknown-linux-gnu",
url = "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/ferrocene-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-aarch64-unknown-linux-gnu.tar.gz",
)
use_repo(
ferrocene,
"ferrocene_aarch64_ebclfsa",
)
25 changes: 24 additions & 1 deletion images/ebclfsa_aarch64/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,28 @@
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0

# *******************************************************************************
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")

alias(
name = "image",
actual = "//images/ebclfsa_aarch64/build:fastdev-image",
visibility = ["//visibility:public"],
)

sh_binary(
name = "run",
srcs = [
"//runners/qemu_aarch64/scripts:run_qemu.sh",
],
args = [
"$(locations :image)",
"-append",
"'root=/dev/vda1 sdk_enable lisa_syscall_whitelist=2026 rw sharedmem.enable_sharedmem=0 init=/usr/bin/ebclfsa-cflinit'",
],
data = [
":image",
],
env = {"RUNFILES_LIB_DEBUG": "1"},
use_bash_launcher = True,
)
72 changes: 72 additions & 0 deletions images/ebclfsa_aarch64/build/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

genrule(
name = "extract-fastdev-image",
srcs = ["@eb_corbos_toolkit_fastdev_archive//file"],
outs = [
"ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
"ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux",
],
cmd = "tar xzf $(location @eb_corbos_toolkit_fastdev_archive//file) -C $(RULEDIR)/ebcl-qemuarm64 && chmod +w $(RULEDIR)/ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic && ls -lah $(RULEDIR)/ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic > /tmp/foo",
visibility = [
"//visibility:public",
],
)

pkg_tar(
name = "crinit_config_tar",
srcs = [
"//images/ebclfsa_aarch64/build/config-overlay:etc/crinit/crinit.d/getty-console.crinit",
],
mode = "0755",
package_dir = "/etc/crinit/crinit.d",
)

pkg_tar(
name = "scripts_tar",
srcs = [
"//images/ebclfsa_aarch64/build/config-overlay:usr/bin/delayed-start.sh",
],
mode = "0755",
package_dir = "/usr/bin",
)

genrule(
name = "fastdev-image",
srcs = [
"//showcases:showcases_pkg_tar",
"//feature_integration_tests/configs:etc_configs",
":extract-fastdev-image",
":crinit_config_tar",
":scripts_tar",
"build_image.sh",
],
outs = [
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux",
],
cmd = " \
$(location build_image.sh) \
$(RULEDIR) \
$(RULEDIR)/ebcl-qemuarm64 \
$(RULEDIR)/ebcl-qemuarm64-deployed \
$(location //showcases:showcases_pkg_tar) \
$(location :crinit_config_tar) \
$(location :scripts_tar) \
",
visibility = [
"//visibility:public",
],
)
Loading
Loading