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
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.2.0",
"postCreateCommand": "bash .devcontainer/prepare_workspace.sh",
"postStartCommand": "ssh-keygen -f '/home/vscode/.ssh/known_hosts' -R '[localhost]:2222' || true"
}
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ __pycache__/
/.gita/
/.gita-workspace.csv
/build
!images/ebclfsa_aarch64/build/
!images/autosd_x86_64/build/
artifacts
2,350 changes: 1,806 additions & 544 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

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 = "179d390be95dabb469d03cd0956b0ea235fabe4c", # EBcLfSA toolchain update + LD_LIBRARY_PATH fix
remote = "https://github.com/elektrobit-contrib/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",
)
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 @@ -68,6 +68,10 @@ bazel_dep(name = "score_lifecycle_health")
git_override(
module_name = "score_lifecycle_health",
commit = "14ee704eeac03e03ca10bece5de8b694d3c5e2dd",
patch_strip = 1,
patches = [
"//patches/lifecycle_health:0001-fix-acl-for-arm64.patch",
],
remote = "https://github.com/eclipse-score/lifecycle.git",
)

Expand Down
4 changes: 2 additions & 2 deletions bazel_common/score_modules_tooling.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
bazel_dep(name = "score_crates")
git_override(
module_name = "score_crates",
commit = "372438042bafe21146899dc1f89771a031d12ed0",
remote = "https://github.com/eclipse-score/score-crates.git",
commit = "492e701cb6414d8ac318c32884addd761bb6dbd4", # https://github.com/eclipse-score/score-crates/pull/25
remote = "https://github.com/qorix-group/score-crates.git",
)

bazel_dep(name = "score_itf")
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",
)
23 changes: 22 additions & 1 deletion images/ebclfsa_aarch64/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,26 @@
# 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",
],
args = [
"$(locations :image)",
],
data = [
":image",
],
env = {"RUNFILES_LIB_DEBUG": "1"},
use_bash_launcher = True,
)
62 changes: 62 additions & 0 deletions images/ebclfsa_aarch64/build/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# *******************************************************************************
# 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
# *******************************************************************************

genrule(
name = "fetch-fastdev-archive",
srcs = [],
outs = ["fastdev-archive.tgz"],
cmd = "wget -O $@ https://github.com/Elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
)

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)/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",
],
)

genrule(
name = "fastdev-image",
srcs = [
"//showcases",
"//feature_integration_tests/configs:etc_configs",
":extract-fastdev-image",
":config-overlay",
"run_qemu.sh",
],
outs = [
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.wic",
"ebcl-qemuarm64-deployed/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64-vmlinux",
"qemu_deployment.log",
],
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)/* root@localhost:/ &&\
sshpass -p linux scp -rp -o StrictHostKeyChecking=no -P 2222 $(location :config-overlay)/* root@localhost:/ &&\
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 \
",
visibility = [
"//visibility:public",
],
)
6 changes: 6 additions & 0 deletions images/ebclfsa_aarch64/build/config-overlay/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
exports_files(
[
"usr/bin/delayed-start.sh",
"etc/crinit/crinit.d/getty-console.crinit",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NAME = getty-console

COMMAND = /usr/bin/setsid /sbin/getty --login-program /usr/bin/delayed-start.sh --autologin root 115200 console

RESPAWN = YES
DEPENDS = ""
RESPAWN_RETRIES = 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
sleep 2
/showcases/bin/cli
76 changes: 0 additions & 76 deletions images/ebclfsa_aarch64/persistency_integration/BUILD

This file was deleted.

Loading
Loading