Skip to content

Commit 98820c1

Browse files
committed
Update EBcLfSA to new integration structure
- Add correct GCC toolchain and switch to official pre-release 2.0.0-beta1 of EB corbos Toolkit - Add Rust toolchain for aarch64 - Add patch for Lifecycle Health ACL on arm64
1 parent 5b82931 commit 98820c1

26 files changed

Lines changed: 915 additions & 851 deletions

File tree

.bazelrc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ build:_common --@score_communication//score/mw/com/flags:tracing_library=stub
1919
build:_common --cxxopt=-Wno-error=mismatched-new-delete
2020
build:_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
2121
build:_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
22-
build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
22+
build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
2323

2424
# Flags needed by datarouter
2525
build:_common --@score_logging//score/datarouter/build_configuration_flags:persistent_logging=False
@@ -41,14 +41,13 @@ build:qnx-x86_64 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64
4141
build:qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800
4242

4343
build:linux-x86_64 --config=_common
44-
build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
44+
build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0
4545
build:linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
4646

4747
build:eb-aarch64 --config=_common
48-
build:eb-aarch64 --extra_toolchains=@gcc_toolchain//:aarch64_gcc_13
49-
build:eb-aarch64 --platforms=@score_toolchains_gcc//platforms:aarch64-linux
50-
build:eb-aarch64 --spawn_strategy=local
51-
48+
build:eb-aarch64 --extra_toolchains=@score_ebclfsa_toolchain//:aarch64-linux-sdk_0.1.0-ebclfsa
49+
build:eb-aarch64 --extra_toolchains=@ferrocene_aarch64_ebclfsa//:rust_ferrocene_toolchain
50+
build:eb-aarch64 --platforms=@score_bazel_platforms//:aarch64-linux-sdk_0.1.0-ebclfsa
5251

5352
build:autosd-x86_64 --config=_common
5453
build:autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eclipse-s-core",
3-
"image": "ghcr.io/eclipse-score/devcontainer:v1.1.0",
3+
"image": "ghcr.io/eclipse-score/devcontainer:v1.2.0",
44
"postCreateCommand": "bash .devcontainer/prepare_workspace.sh",
55
"postStartCommand": "ssh-keygen -f '/home/vscode/.ssh/known_hosts' -R '[localhost]:2222' || true"
66
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ __pycache__/
2727
/.gita/
2828
/.gita-workspace.csv
2929
/build
30+
!images/ebclfsa_aarch64/build/
31+
!images/autosd_x86_64/build/
3032
artifacts

MODULE.bazel.lock

Lines changed: 601 additions & 515 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel_common/score_gcc_toolchains.MODULE.bazel

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
# *******************************************************************************
1313

1414
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2")
15+
git_override(
16+
module_name = "score_bazel_cpp_toolchains",
17+
commit = "043657585df356bab16bb742b24aa1b7996247db", # EBcLfSA toolchain update + LD_LIBRARY_PATH fix
18+
remote = "https://github.com/elektrobit-contrib/eclipse-score_bazel_cpp_toolchains.git",
19+
)
1520

1621
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
1722
gcc.toolchain(
@@ -21,40 +26,13 @@ gcc.toolchain(
2126
use_default_package = True,
2227
version = "12.2.0",
2328
)
24-
25-
# This is how new gcc more or less shall be registered: TBD by EB
26-
# gcc.sdp(
27-
# name = "fastdev_sdk",
28-
# url = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
29-
# strip_prefix = "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64",
30-
# sha256 = "05b57bbc8d99d46df6b57f774c39a5a2664964ea7eb94147cbece08508c1f121",
31-
# build_file = "//ebclfsa_aarch64/toolchain:gcc.BUILD",
32-
# )
33-
# gcc.toolchain(
34-
# name = "score_ebclfsa_aarch64_toolchain",
35-
# sdp_to_link = "fastdev_sdk",
36-
# target_os = "linux",
37-
# target_cpu = "aarch64",
38-
# version = "12.2.0",
39-
# extra_link_flags = [
40-
# "-lpthread",
41-
# ]
42-
# )
43-
44-
# Workaround until above is fixed
45-
bazel_dep(name = "score_toolchains_gcc", dev_dependency = True)
46-
git_override(
47-
# Elektrobit corbos Linux for Safety Applications needs a specific toolchain
48-
module_name = "score_toolchains_gcc",
49-
remote = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc.git",
50-
tag = "0.5.0-beta", # corresponds to git sha 158921ffd9aabef41a2a03bca5baeaa9f4aa9d33
51-
)
52-
53-
eb = use_extension("@score_toolchains_gcc//extensions:gcc.bzl", "gcc", dev_dependency = True)
54-
eb.toolchain(
55-
sha256 = "05b57bbc8d99d46df6b57f774c39a5a2664964ea7eb94147cbece08508c1f121",
56-
strip_prefix = "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64",
57-
url = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
29+
gcc.toolchain(
30+
name = "score_ebclfsa_toolchain",
31+
runtime_ecosystem = "ebclfsa",
32+
sdk_version = "0.1.0",
33+
target_cpu = "aarch64",
34+
target_os = "linux",
35+
use_default_package = True,
5836
)
5937

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

77-
use_repo(eb, "gcc_toolchain", "gcc_toolchain_gcc")
78-
7955
use_repo(
8056
gcc,
57+
"score_ebclfsa_toolchain",
8158
"score_gcc_x86_64_toolchain",
8259
)

bazel_common/score_modules_target_sw.MODULE.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ bazel_dep(name = "score_lifecycle_health")
6868
git_override(
6969
module_name = "score_lifecycle_health",
7070
commit = "14ee704eeac03e03ca10bece5de8b694d3c5e2dd",
71+
patch_strip = 1,
72+
patches = [
73+
"//patches/lifecycle_health:0001-fix-acl-for-arm64.patch",
74+
],
7175
remote = "https://github.com/eclipse-score/lifecycle.git",
7276
)
7377

bazel_common/score_modules_tooling.MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
bazel_dep(name = "score_crates")
1818
git_override(
1919
module_name = "score_crates",
20-
commit = "372438042bafe21146899dc1f89771a031d12ed0",
20+
commit = "492e701cb6414d8ac318c32884addd761bb6dbd4", # https://github.com/eclipse-score/score-crates/pull/25
2121
remote = "https://github.com/eclipse-score/score-crates.git",
2222
)
2323

bazel_common/score_rust_toolchains.MODULE.bazel

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,34 @@ git_override(
1919
commit = "293337fd6402ec3dfbeb8f2d589f38ad9124dadd",
2020
remote = "https://github.com/pawelrutkaq/rules_rust.git", # To be fixed once rule_rust is in score bazel registry
2121
)
22+
23+
ferrocene = use_extension(
24+
"@score_toolchains_rust//extensions:ferrocene_toolchain_ext.bzl",
25+
"ferrocene_toolchain_ext",
26+
)
27+
ferrocene.toolchain(
28+
name = "ferrocene_aarch64_ebclfsa",
29+
coverage_tools_sha256 = "497958e925bc94833ea226d68f6d5ba38bd890f571c73e230141d2923e30dd94",
30+
coverage_tools_strip_prefix = "779fbed05ae9e9fe2a04137929d99cc9b3d516fd/x86_64-unknown-linux-gnu",
31+
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",
32+
exec_triple = "x86_64-unknown-linux-gnu",
33+
extra_rustc_flags = [
34+
"-Clink-arg=-Wl,--no-as-needed",
35+
"-Clink-arg=-lstdc++",
36+
"-Clink-arg=-static-libstdc++",
37+
"-Clink-arg=-static",
38+
"-Clink-arg=-lm",
39+
"-Clink-arg=-lc",
40+
],
41+
sha256 = "b1f1eb1146bf595fe1f4a65d5793b7039b37d2cb6d395d1c3100fa7d0377b6c9",
42+
target_compatible_with = [
43+
"@platforms//cpu:aarch64",
44+
"@platforms//os:linux",
45+
],
46+
target_triple = "aarch64-unknown-linux-gnu",
47+
url = "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/ferrocene-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-aarch64-unknown-linux-gnu.tar.gz",
48+
)
49+
use_repo(
50+
ferrocene,
51+
"ferrocene_aarch64_ebclfsa",
52+
)

images/ebclfsa_aarch64/BUILD

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,26 @@
2121
# https://www.apache.org/licenses/LICENSE-2.0
2222
#
2323
# SPDX-License-Identifier: Apache-2.0
24-
2524
# *******************************************************************************
25+
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
26+
27+
alias(
28+
name = "image",
29+
actual = "//images/ebclfsa_aarch64/build:fastdev-image",
30+
visibility = ["//visibility:public"],
31+
)
32+
33+
sh_binary(
34+
name = "run",
35+
srcs = [
36+
"//runners/qemu_ebclfsa_aarch64/scripts:run_qemu.sh",
37+
],
38+
args = [
39+
"$(locations :image)",
40+
],
41+
data = [
42+
":image",
43+
],
44+
env = {"RUNFILES_LIB_DEBUG": "1"},
45+
use_bash_launcher = True,
46+
)

images/ebclfsa_aarch64/build/BUILD

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2025 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
13+
14+
genrule(
15+
name = "fetch-fastdev-archive",
16+
srcs = [],
17+
outs = ["fastdev-archive.tgz"],
18+
cmd = "wget -O $@ https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
19+
)
20+
21+
genrule(
22+
name = "extract-fastdev-image",
23+
srcs = [":fetch-fastdev-archive"],
24+
outs = [
25+
"ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
26+
"ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux",
27+
],
28+
cmd = "tar xzf $(location :fetch-fastdev-archive) -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",
29+
visibility = [
30+
"//visibility:public",
31+
],
32+
)
33+
34+
genrule(
35+
name = "fastdev-image",
36+
srcs = [
37+
"//showcases",
38+
"//feature_integration_tests/configs:etc_configs",
39+
":extract-fastdev-image",
40+
":config-overlay",
41+
"run_qemu.sh",
42+
],
43+
outs = [
44+
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
45+
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux",
46+
"qemu_deployment.log",
47+
],
48+
cmd = " \
49+
mkdir -p $(RULEDIR)/ebcl-qemuarm64-deployed &&\
50+
cp $(RULEDIR)/ebcl-qemuarm64/* $(RULEDIR)/ebcl-qemuarm64-deployed/ &&\
51+
$(location run_qemu.sh) $(RULEDIR)/ebcl-qemuarm64-deployed -pidfile $(RULEDIR)/qemu.pid > $(RULEDIR)/qemu_deployment.log &\
52+
sleep 30 ; \
53+
sshpass -p linux scp -rp -o StrictHostKeyChecking=no -P 2222 $(location //showcases:showcases)/* root@localhost:/ &&\
54+
sshpass -p linux scp -rp -o StrictHostKeyChecking=no -P 2222 $(location :config-overlay)/* root@localhost:/ &&\
55+
sshpass -p linux ssh -o StrictHostKeyChecking=no -p 2222 root@localhost sync &&\
56+
sshpass -p linux ssh -o StrictHostKeyChecking=no -p 2222 root@localhost crinit-ctl poweroff || true \
57+
sleep 5 \
58+
",
59+
visibility = [
60+
"//visibility:public",
61+
],
62+
)

0 commit comments

Comments
 (0)