Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0899f3f
added minimalistic setup for aarch64 toolchain
matthiasb85 Jul 21, 2025
1c52551
added missing include
matthiasb85 Jul 21, 2025
7ea59f0
Add devcontainer
lurtz Jun 13, 2025
08fd102
ipc_bridge_hi_wrapper: Hi wrapper work for ipc_bridge started
Jul 24, 2025
06f91c6
make ipc example public
matthiasb85 Jul 25, 2025
02c0827
added hi_app folder with build file to generate marked elf binaries
matthiasb85 Jul 25, 2025
d6f6e2c
merged folders
matthiasb85 Jul 25, 2025
6896019
fixed dependencies
matthiasb85 Jul 25, 2025
d83da2b
hi_wrapper: Start ipc_bridge
Jul 25, 2025
1b8c8f0
hi_app: Start ipc_bridge from wraper app
Jul 28, 2025
5141d05
hi_app: Renamed hi_main, as trampolin app expects this name
Jul 28, 2025
39e6fcd
hi_app: add missing file. Add a crinti service for lowside
Jul 28, 2025
bfc16ca
added qemu run script and image fetch target
matthiasb85 Jul 28, 2025
18b5f71
added upload rule
matthiasb85 Jul 28, 2025
a7d24b7
added symlink for easier access
matthiasb85 Jul 28, 2025
9cd40a4
run_qemu.sh usage message, scp no strict hose check
Jul 28, 2025
0eb3636
added run example target and increased cycle time
matthiasb85 Jul 28, 2025
9115423
Example: add logging configuration and update startup message in ipc_…
Jul 29, 2025
5442ba8
remove ipc_bridge crinit configuration file
Jul 29, 2025
974d5f5
added some vscode tasks
matthiasb85 Jul 29, 2025
4b4d07a
reduced log level to keep ipc_bridge_sil from spamming the serial con…
matthiasb85 Jul 29, 2025
d9e72a7
refactor and remove unused includes
Jul 30, 2025
ffa4494
Merge remote-tracking branch 'origin/main' into ebclfsa_integration_demo
opajonk Aug 12, 2025
4b0c056
re-create the overrides
opajonk Aug 12, 2025
3c5fafb
add CI example
opajonk Aug 12, 2025
c78768e
fix merge error
opajonk Aug 13, 2025
7299706
remove unnecessary diff
opajonk Aug 13, 2025
440ab90
remove CI integration since it does not run anyway on a branch
opajonk Aug 13, 2025
28e146e
sleep longer after starting qemh
Aug 20, 2025
351a5d1
clean a potentially existing ssh host key
opajonk Sep 1, 2025
10271a3
Merge branch 'main' into ebclfsa_integration_demo
opajonk Sep 1, 2025
6e9e571
fix: do not fail this command
opajonk Sep 1, 2025
0c6c62b
fix: no need to run this here
opajonk Sep 1, 2025
b286a7d
Merge branch 'main' into ebclfsa_integration_demo
opajonk Sep 8, 2025
ebda738
Merge branch 'main' into ebclfsa_integration_demo
opajonk Nov 11, 2025
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
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ common --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Onl
common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
common --@score_baselibs//score/json:base_library=nlohmann
common --//score/mw/com/flags:tracing_library=stub
common --extra_toolchains=@gcc_toolchain//:host_gcc_12
common --extra_toolchains=@gcc_toolchain//:aarch64_gcc_13
build --incompatible_strict_action_env
test --test_output=errors
build --experimental_retain_test_configuration_across_testonly #https://github.com/bazelbuild/bazel/issues/6842
Expand All @@ -28,6 +28,8 @@ test --sandbox_tmpfs_path=/tmp
# Tests require to be run in a sandbox. Otherwise some will be flaky.
test --nosandbox_default_allow_network

build:aarch64 --platforms=@score_toolchains_gcc//platforms:aarch64-linux

common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/refs/heads/main/
common --registry=https://bcr.bazel.build

Expand Down
25 changes: 25 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run fastdev image",
"type": "shell",
"command": "${workspaceFolder}/run_qemu.sh bazel-bin/score/mw/com/example/ipc_bridge_hi_wrapper/deb-qemuarm64-modified/",
"problemMatcher": []
},
{
"label": "Upload application binaries to fastedev image",
"type": "shell",
"command": "cd ${workspaceFolder} && bazel build --config=aarch64 --spawn_strategy=local //score/mw/com/example/ipc_bridge_hi_wrapper:upload",
"problemMatcher": []
},
{
"label": "Run example application in fastedev image",
"type": "shell",
"command": "cd ${workspaceFolder} && bazel build --config=aarch64 --spawn_strategy=local //score/mw/com/example/ipc_bridge_hi_wrapper:run_example && code ./bazel-bin/score/mw/com/example/ipc_bridge_hi_wrapper/qemu_run.log && code ./bazel-bin/score/mw/com/example/ipc_bridge_hi_wrapper/ssh_run.log",
"problemMatcher": []
}
]
}
18 changes: 11 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@
module(name = "communication")

bazel_dep(name = "platforms", version = "0.0.11")

bazel_dep(name = "score_toolchains_gcc", version = "0.4", dev_dependency = True)
bazel_dep(name = "score_toolchains_gcc", version = "0.4", dev_dependency=True)
git_override(
module_name = "score_toolchains_gcc",
remote = "https://github.com/Elektrobit/eclipse-score_toolchains_gcc.git",
commit = "fb009e490b9b8f28805d587f50d0bf6d885f3414",
)

gcc = use_extension(
"@score_toolchains_gcc//extentions:gcc.bzl",
"gcc",
dev_dependency = True,
)
gcc.toolchain(
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
strip_prefix = "x86_64-unknown-linux-gnu",
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
url = "https://linux.elektrobit.com/tmp/score/fastdev-sdk-ubuntu-ebcl-deb-qemu-arm64.tar.xz",
sha256 = "cf8d277a2b95bbdad3e177c488fa77d01723510690a911218ef33747574d78fe",
strip_prefix = "fastdev-sdk-ubuntu-ebcl-deb-qemuarm64",
)

# TODO to be moved to toolchain. https://github.com/eclipse-score/toolchains_gcc/issues/11
Expand Down Expand Up @@ -119,12 +123,12 @@ bazel_dep(name = "rules_doxygen", version = "2.5.0")
bazel_dep(name = "score_baselibs", version = "0.2.0")
git_override(
module_name = "score_baselibs",
commit = "de5bb275ee9957433b3587582ac07d3eeb98dd6a",
commit = "e9dc2036cbdee3dce0ce51543eb34ea405326f7c",
patch_strip = 1,
patches = [
"//:wait_free_stack_fix.patch",
],
remote = "https://github.com/eclipse-score/baselibs.git",
remote = "https://github.com/Elektrobit/eclipse-score_baselibs.git",
)

# Doxygen extension for documentation generation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for deta

---

**Note**: This is an open-source project under the Eclipse Foundation. It implements automotive-grade communication middleware suitable for safety-critical applications.
**Note**: This is an open-source project under the Eclipse Foundation. It implements automotive-grade communication middleware suitable for safety-critical applications.
33 changes: 33 additions & 0 deletions run_qemu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

set -xu

if [ -z "$1" ]; then
echo "Usage: $0 <basefolder>"
exit 1
fi
BASEFOLDER=$1
IMAGE="${BASEFOLDER}/fastdev-ubuntu-ebcl-deb-qemuarm64.wic"
KERNEL="${BASEFOLDER}/fastdev-ubuntu-ebcl-deb-qemuarm64-vmlinux"
if [ ! -d "${BASEFOLDER}" ] || [ ! -f "${IMAGE}" ] || [ ! -f "${KERNEL}" ] ; then
echo "Run \"bazel build --config=aarch64 --spawn_strategy=local //score/mw/com/example/ipc_bridge_hi_wrapper:fastdev-image\" first to fetch the image"
fi

MACHINE="virt,virtualization=true,gic-version=3"
CPU="cortex-a53"
SMP="8"
MEM="4G"
KERNEL_ARGS=("-append" "root=/dev/vda1 sdk_enable lisa_syscall_whitelist=2026 rw sharedmem.enable_sharedmem=0 init=/usr/bin/ebclfsa-cflinit")
DISK_ARGS="-device virtio-blk-device,drive=vd0 -drive if=none,format=raw,file=${IMAGE},id=vd0"
NETWORK_ARGS="-netdev user,id=net0,net=192.168.7.0/24,dhcpstart=192.168.7.2,dns=192.168.7.3,host=192.168.7.5,hostfwd=tcp::2222-:22,hostfwd=tcp::3333-:3333 -device virtio-net-device,netdev=net0 "

if ! command -v qemu-system-aarch64 > /dev/null; then
echo "Please install qemu-system-aarch64"
exit 1
fi

chmod +w ${IMAGE}

exec qemu-system-aarch64 -m "${MEM}" -machine "${MACHINE}" -cpu "${CPU}" \
-smp "${SMP}" -kernel "${KERNEL}" "${KERNEL_ARGS[@]}" ${DISK_ARGS} \
${NETWORK_ARGS} -nographic ${@:2}
3 changes: 3 additions & 0 deletions score/mw/com/example/ipc_bridge/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ cc_binary(
"@score_baselibs//score/language/futurecpp",
"@score_baselibs//score/mw/log",
],
visibility = [
"//visibility:public", # platform_only
],
)

cc_library(
Expand Down
118 changes: 118 additions & 0 deletions score/mw/com/example/ipc_bridge_hi_wrapper/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# *******************************************************************************
# 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("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES")

genrule(
name = "ipc_bridge_cpp_sil",
srcs = ["//score/mw/com/example/ipc_bridge:ipc_bridge_cpp"],
outs = ["ipc_bridge_cpp_sil"],
cmd = "cp $(SRCS) $@ && \
chmod ugo+w $@ && \
$(execpath @gcc_toolchain_gcc//:elf-enabler) $@ && \
chmod ugo-w $@",
tools = ["@gcc_toolchain_gcc//:elf-enabler"],
)

genrule(
name = "hi_app",
srcs = [
":ipc_bridge_hi_wrapper",
":ipc_bridge_cpp_sil"
],
outs = ["hi_app"],
cmd = "cp $(location :ipc_bridge_hi_wrapper) $@ && \
chmod ugo+w $@ && \
$(execpath @gcc_toolchain_gcc//:elf-enabler) $@ && \
chmod ugo-w $@",
tools = ["@gcc_toolchain_gcc//:elf-enabler"],
)

cc_binary(
name = "ipc_bridge_hi_wrapper",
srcs = [
"main.cc",
],
features = COMPILER_WARNING_FEATURES,
deps = [
"//score/mw/com/example/ipc_bridge:ipc_bridge_cpp",
],
)

genrule(
name = "fetch-fastdev-archive",
srcs = [],
outs = ["fastdev-archive.tgz"],
cmd = "wget -O $@ https://linux.elektrobit.com/tmp/score/fastdev-ubuntu-ebcl-deb-qemu-arm64.tgz"
)

genrule(
name = "fastdev-image",
srcs = [":fetch-fastdev-archive"],
outs = [
"deb-qemuarm64/fastdev-ubuntu-ebcl-deb-qemuarm64.wic",
"deb-qemuarm64/fastdev-ubuntu-ebcl-deb-qemuarm64-vmlinux"
],
cmd = "tar xzf $(location :fetch-fastdev-archive) -C $(RULEDIR)",
)

genrule(
name = "upload",
srcs = [
":ipc_bridge_cpp_sil",
"//score/mw/com/example/ipc_bridge:ipc_bridge_cpp",
":hi_app",
":fastdev-image",
"mw_com_config.json",
"run_qemu.sh",
"logging.json"
],
cmd = " \
mkdir -p $(RULEDIR)/deb-qemuarm64-modified &&\
cp $(RULEDIR)/deb-qemuarm64/* $(RULEDIR)/deb-qemuarm64-modified/ &&\
$(location run_qemu.sh) $(RULEDIR)/deb-qemuarm64-modified -pidfile $(RULEDIR)/qemu.pid > $(RULEDIR)/qemu_upload.log &\
sleep 30 ; \
sshpass -p linux scp -o StrictHostKeyChecking=no -P 2222 $(location :ipc_bridge_cpp_sil) root@localhost:/usr/bin &&\
sshpass -p linux scp -o StrictHostKeyChecking=no -P 2222 $(location //score/mw/com/example/ipc_bridge:ipc_bridge_cpp) root@localhost:/usr/bin &&\
sshpass -p linux scp -o StrictHostKeyChecking=no -P 2222 $(location :hi_app) root@localhost:/usr/bin &&\
sshpass -p linux scp -o StrictHostKeyChecking=no -P 2222 $(location mw_com_config.json) root@localhost:/etc/ &&\
sshpass -p linux scp -o StrictHostKeyChecking=no -P 2222 $(location logging.json) root@localhost:/etc/ &&\
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 = [
"qemu_upload.log",
"deb-qemuarm64-modified/fastdev-ubuntu-ebcl-deb-qemuarm64.wic",
"deb-qemuarm64-modified/fastdev-ubuntu-ebcl-deb-qemuarm64-vmlinux"
],
)

genrule(
name = "run_example",
srcs = [
"deb-qemuarm64-modified/fastdev-ubuntu-ebcl-deb-qemuarm64.wic",
"deb-qemuarm64-modified/fastdev-ubuntu-ebcl-deb-qemuarm64-vmlinux",
"run_qemu.sh"
],
cmd = " \
$(location run_qemu.sh) $(RULEDIR)/deb-qemuarm64-modified -pidfile $(RULEDIR)/qemu.pid > $(RULEDIR)/qemu_run.log &\
sleep 10 ; \
sshpass -p linux ssh -o StrictHostKeyChecking=no -p 2222 root@localhost ipc_bridge_cpp -n 10 -m send -t 200 -s /etc/mw_com_config.json > $(RULEDIR)/ssh_run.log && \
sshpass -p linux ssh -o StrictHostKeyChecking=no -p 2222 root@localhost crinit-ctl poweroff || true \
sleep 5 \
",
outs = [
"qemu_run.log",
"ssh_run.log",
],
)
8 changes: 8 additions & 0 deletions score/mw/com/example/ipc_bridge_hi_wrapper/logging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"appId": "IPBR",
"appDesc": "ipc_bridge",
"logLevel": "kInfo",
"logLevelThresholdConsole": "kInfo",
"logMode": "kRemote|kConsole",
"dynamicDatarouterIdentifiers" : true
}
38 changes: 38 additions & 0 deletions score/mw/com/example/ipc_bridge_hi_wrapper/main.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/********************************************************************************
* 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
********************************************************************************/
#include <cstring>
#include <iostream>
#include <unistd.h>

int main() {
std::cout << "HI_App: Starting ipc_bridge_cpp_sil" << std::endl;

const char *c_args[] = {
"/usr/bin/ipc_bridge_cpp_sil",
"-n", "10",
"-m", "recv",
"-t", "200",
"-s", "/etc/mw_com_config.json",
nullptr
};

execve("/usr/bin/ipc_bridge_cpp_sil", const_cast<char* const*>(c_args), nullptr);

std::cerr << "execve failed, sleeping... Reason: " << strerror(errno)
<< std::endl;
while (true) {
sleep(10);
}
return 0;
}

1 change: 1 addition & 0 deletions score/mw/com/example/ipc_bridge_hi_wrapper/run_qemu.sh
Loading