Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 5 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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

build:qnx-x86_64 --config=_common
build:qnx-x86_64 --noexperimental_merged_skyframe_analysis_execution
Expand All @@ -40,14 +40,13 @@ build:itf-qnx-x86_64 --test_arg="--os=qnx"


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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ __pycache__/
/.gita/
/.gita-workspace.csv
build
!images/ebclfsa_aarch64/build/
!images/autosd_x86_64/build/
artifacts
11 changes: 8 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"args": [
"scripts/known_good/update_module_from_known_good.py",
"--override-type",
"local_path"
"local_path",
"--output-dir",
"bazel_common/"
],
"problemMatcher": []
},
Expand All @@ -28,8 +30,11 @@
"args": [
"scripts/known_good/update_module_from_known_good.py",
"--override-type",
"git"
]
"git",
"--output-dir",
"bazel_common/"
],
"problemMatcher": []
},
{
"label": "Gita: Generate workspace",
Expand Down
2 changes: 1 addition & 1 deletion bazel_common/score_basic_bazel.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bazel_dep(name = "rules_shell", version = "0.6.0")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "rules_pkg", version = "1.2.0")

bazel_dep(name = "rules_rpm", version = "0.1.0")
Expand Down
46 changes: 13 additions & 33 deletions bazel_common/score_gcc_toolchains.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@


bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2")
git_override(
module_name = "score_bazel_cpp_toolchains",
remote = "https://github.com/elektrobit-contrib/eclipse-score_bazel_cpp_toolchains.git",
commit = "df844e731be7cae5cc6e3c90cfec71849bae2cde", # EBcLfSA toolchain update
)
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)

gcc.toolchain(
Expand All @@ -23,40 +28,15 @@ gcc.toolchain(
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(
url = "https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
sha256 = "05b57bbc8d99d46df6b57f774c39a5a2664964ea7eb94147cbece08508c1f121",
strip_prefix = "fastdev-sdk-ubuntu-ebclfsa-ebcl-qemuarm64",
gcc.toolchain(
name = "score_ebclfsa_toolchain",
target_os = "linux",
target_cpu = "aarch64",
runtime_ecosystem = "ebclfsa",
sdk_version = "0.1.0",
use_default_package = True,
)


bazel_dep(name = "os_autosd_toolchain", version = "0.0.1")
# override with git
git_override(
Expand All @@ -72,8 +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_gcc_x86_64_toolchain",
"score_ebclfsa_toolchain",
)
4 changes: 4 additions & 0 deletions bazel_common/score_modules_target_sw.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ git_override(
module_name = "score_lifecycle_health",
remote = "https://github.com/eclipse-score/lifecycle.git",
commit = "14ee704eeac03e03ca10bece5de8b694d3c5e2dd",
patches = [
"//patches/lifecycle_health:0001-fix-acl-for-arm64.patch",
],
patch_strip = 1,
)

bazel_dep(name = "score_logging")
Expand Down
7 changes: 4 additions & 3 deletions bazel_common/score_modules_tooling.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
# Do not edit manually - use scripts/known_good/update_module_from_known_good.py

bazel_dep(name = "score_crates")
single_version_override(
git_override(
module_name = "score_crates",
version = "0.0.7",
remote = "https://github.com/eclipse-score/score-crates.git",
commit = "492e701cb6414d8ac318c32884addd761bb6dbd4", # https://github.com/eclipse-score/score-crates/pull/25
)

bazel_dep(name = "score_itf")
Expand All @@ -42,7 +43,7 @@ git_override(
bazel_dep(name = "score_bazel_platforms")
single_version_override(
module_name = "score_bazel_platforms",
version = "0.0.4",
version = "0.1.1",
)

bazel_dep(name = "score_test_scenarios")
Expand Down
36 changes: 35 additions & 1 deletion bazel_common/score_rust_toolchains.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
bazel_dep(name = "rules_rust", version = "0.61.0")
bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True)
bazel_dep(name = "score_toolchains_rust", version = "0.7.0", dev_dependency = True)
git_override(
module_name = "rules_rust",
remote = "https://github.com/pawelrutkaq/rules_rust.git", # To be fixed once rule_rust is in score bazel registry
commit = "293337fd6402ec3dfbeb8f2d589f38ad9124dadd",
)


ferrocene = use_extension(
"@score_toolchains_rust//extensions:ferrocene_toolchain_ext.bzl",
"ferrocene_toolchain_ext",
)

ferrocene.toolchain(
name = "ferrocene_aarch64_ebclfsa",
url = "https://github.com/eclipse-score/ferrocene_toolchain_builder/releases/download/1.0.1/ferrocene-779fbed05ae9e9fe2a04137929d99cc9b3d516fd-aarch64-unknown-linux-gnu.tar.gz",
sha256 = "b1f1eb1146bf595fe1f4a65d5793b7039b37d2cb6d395d1c3100fa7d0377b6c9",
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",
coverage_tools_sha256 = "497958e925bc94833ea226d68f6d5ba38bd890f571c73e230141d2923e30dd94",
coverage_tools_strip_prefix = "779fbed05ae9e9fe2a04137929d99cc9b3d516fd/x86_64-unknown-linux-gnu",
target_triple = "aarch64-unknown-linux-gnu",
exec_triple = "x86_64-unknown-linux-gnu",
extra_rustc_flags = [
"-Clink-arg=-Wl,--no-as-needed",
"-Clink-arg=-lstdc++", # this is what changed
"-Clink-arg=-static-libstdc++", # this is what changed
"-Clink-arg=-static",
"-Clink-arg=-lm",
"-Clink-arg=-lc",
],
target_compatible_with = [
"@platforms//cpu:aarch64",
"@platforms//os:linux",
],
)

use_repo(
ferrocene,
"ferrocene_aarch64_ebclfsa",
)
24 changes: 23 additions & 1 deletion images/ebclfsa_aarch64/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,27 @@
# 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_ebclfsa_aarch64/scripts:run_qemu.sh"
],

env = {"RUNFILES_LIB_DEBUG": "1"},
args = [
"$(locations :image)",
],
data = [
":image",
],
use_bash_launcher = True,
)
77 changes: 77 additions & 0 deletions images/ebclfsa_aarch64/build/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# *******************************************************************************
# 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
# *******************************************************************************

filegroup(
name = "scripts",
srcs = [
"//integration/images/ebclfsa_aarch64/persistency_integration/scripts:startup.sh",
],
visibility = ["//visibility:private"],
)

filegroup(
name = "configs",
srcs = [
"//integration/images/ebclfsa_aarch64/scrample_integration/etc:logging.json",
"//integration/images/ebclfsa_aarch64/scrample_integration/etc:mw_com_config.json",
],
visibility = ["//visibility:private"],
)

genrule(
name = "fetch-fastdev-archive",
srcs = [],
outs = ["fastdev-archive.tgz"],
cmd = "wget -O $@ https://github.com/elektrobit-contrib/eclipse-score_toolchains_gcc/releases/download/0.5.0-beta/fastdev-ubuntu-ebcl-deb-qemu-arm64.tgz"
)

genrule(
name = "extract-fastdev-image",
srcs = [":fetch-fastdev-archive"],
outs = [
"ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
"ebcl-qemuarm64/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux"
],
cmd = "tar xzf $(location :fetch-fastdev-archive) -C $(RULEDIR) && 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",
],
)

genrule(
name = "fastdev-image",
srcs = [
"//showcases:showcases_all",
"//feature_integration_tests/configs:etc_configs",
":extract-fastdev-image",
"run_qemu.sh",
],
cmd = " \
mkdir -p $(RULEDIR)/ebcl-qemuarm64-deployed &&\
cp $(RULEDIR)/ebcl-qemuarm64/* $(RULEDIR)/ebcl-qemuarm64-deployed/ &&\
$(location run_qemu.sh) $(RULEDIR)/ebcl-qemuarm64-deployed -pidfile $(RULEDIR)/qemu.pid > $(RULEDIR)/qemu_deployment.log &\
sleep 30 ; \
sshpass -p linux scp -rp -o StrictHostKeyChecking=no -P 2222 $(location //showcases:showcases_all) root@localhost:/showcases &&\
sshpass -p linux ssh -o StrictHostKeyChecking=no -p 2222 root@localhost sync &&\
sshpass -p linux ssh -o StrictHostKeyChecking=no -p 2222 root@localhost crinit-ctl poweroff || true \
sleep 5 \
",
outs = [
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux",
"qemu_deployment.log",
],
visibility = [
"//visibility:public",
],
)
63 changes: 63 additions & 0 deletions images/ebclfsa_aarch64/build/etc/mw_com_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"serviceTypes": [
{
"serviceTypeName": "/score/MapApiLanesStamped",
"version": {
"major": 1,
"minor": 0
},
"bindings": [
{
"binding": "SHM",
"serviceId": 6432,
"events": [
{
"eventName": "map_api_lanes_stamped",
"eventId": 1
},
{
"eventName": "dummy_data_stamped",
"eventId": 2
}
]
}
]
}
],
"serviceInstances": [
{
"instanceSpecifier": "score/MapApiLanesStamped",
"serviceTypeName": "/score/MapApiLanesStamped",
"version": {
"major": 1,
"minor": 0
},
"instances": [
{
"instanceId": 1,
"allowedConsumer": {
"QM": [
4002,
0
]
},
"allowedProvider": {
"QM": [
4001,
0
]
},
"asil-level": "QM",
"binding": "SHM",
"events": [
{
"eventName": "map_api_lanes_stamped",
"numberOfSampleSlots": 10,
"maxSubscribers": 3
}
]
}
]
}
]
}
Loading
Loading