Skip to content

Commit c53f44e

Browse files
committed
Replace ipc_bridge with scrample code
This way, EBcLfSA and QNX use the same test code repository for communication.
1 parent 01bc5de commit c53f44e

File tree

18 files changed

+46
-1237
lines changed

18 files changed

+46
-1237
lines changed

.github/workflows/build_and_test_ebclfsa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
uses: actions/checkout@v4
3232

3333
- name: Build for EB corbos Linux for Safety Applications and run tests
34-
run: bazel build --config=aarch64 --spawn_strategy=local //example/ipc_bridge_hi_wrapper:run_example
34+
run: bazel build --config=aarch64 --spawn_strategy=local //scrample_sil:run_example
3535
working-directory: ./ebclfsa
3636

3737
- name: Upload test logs
3838
uses: actions/upload-artifact@v5
3939
with:
4040
name: test-logs
41-
path: ebclfsa/bazel-bin/example/ipc_bridge_hi_wrapper/*.log
41+
path: ebclfsa/bazel-bin/scrample_sil/*.log

ebclfsa/MODULE.bazel

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module(
1919
compatibility_level = 0,
2020
)
2121

22-
bazel_dep(name = "rules_cc", version = "0.2.0")
22+
bazel_dep(name = "rules_cc", version = "0.2.1")
2323

2424
bazel_dep(name = "score_toolchains_gcc", version = "0.0.0", dev_dependency=True)
2525
git_override(
@@ -49,7 +49,6 @@ gcc.warning_flags(
4949

5050
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
5151

52-
5352
bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost")
5453
archive_override(
5554
module_name = "rules_boost",
@@ -74,6 +73,10 @@ single_version_override(
7473
version = "0.1.1",
7574
)
7675

76+
bazel_dep(name = "score_scrample", version = "0.1.0")
77+
78+
#bazel_dep(name = "score_persistency", version = "0.2.1")
79+
7780
# git_override are not forwarded by bazel_dep, so we need to redefine it here
7881
git_override(
7982
module_name = "trlc",

ebclfsa/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ However, please understand that we cannot advise you about possible costs in you
2424
> - Copy and paste the following command into the terminal and hit "Enter":
2525
>
2626
> ```bash
27-
> cd ./ebclfsa && bazel build --config=aarch64 --spawn_strategy=local //example/ipc_bridge_hi_wrapper:run_example
27+
> cd ./ebclfsa && bazel build --config=aarch64 --spawn_strategy=local //scrample_sil:run_example
2828
> ```
2929
>
3030
> This will build and run the example.
@@ -35,9 +35,9 @@ However, please understand that we cannot advise you about possible costs in you
3535
>
3636
> ```console
3737
> [...]
38-
> Target //example/ipc_bridge_hi_wrapper:run_example up-to-date:
39-
> bazel-bin/example/ipc_bridge_hi_wrapper/qemu_run.log
40-
> bazel-bin/example/ipc_bridge_hi_wrapper/ssh_run.log
38+
> Target //scrample_sil:run_example up-to-date:
39+
> bazel-bin/scrample_sil/qemu_run.log
40+
> bazel-bin/scrample_sil/ssh_run.log
4141
>INFO: Elapsed time: 361.273s, Critical Path: 91.92s
4242
>INFO: 836 processes: 10 internal, 826 local.
4343
>INFO: Build completed successfully, 836 total actions
@@ -214,7 +214,7 @@ The application instances are called with the following arguments:
214214
Feel free to adjust them as needed.
215215
216216
In order to have those arguments changeable, the HI arguments are not hardcoded into `cflinit`.
217-
Instead, `cflinit` calls a small wrapper binary `/usr/bin/hi_app` which is based on the implementation in `example/ipc_bridge_hi_wrapper/main.cc`.
217+
Instead, `cflinit` calls a small wrapper binary `/usr/bin/hi_app` which is based on the implementation in `scrample_sil/main.cc`.
218218
When `hi_app` is executed by `cflinit`, it simply calls `execve` on `/usr/bin/ipc_bridge_cpp_sil` with the correct set of arguments.
219219
This way `cflinit` keeps its static entrypoint for the Eclipse S-CORE example app, while the user is still able to specify the used arguments for the HI `ipc_bridge` instance.
220220
@@ -234,7 +234,7 @@ With those changes, the toolchain can be used via `bazel build --config=aarch64
234234
> [!IMPORTANT]
235235
> Building inside a sandbox is currently not possible.
236236
237-
For building and running the example setup, the following Bazel rules have been created in `example/ipc_bridge_hi_wrapper/BUILD`:
237+
For building and running the example setup, the following Bazel rules have been created in `scrample_sil/BUILD`:
238238
239239
| Target | Dependencies | Description |
240240
| ------ | ------------ | ----------- |
@@ -253,7 +253,7 @@ The following sections introduce some of the rules mentioned above.
253253
The `run_example` target provides an easy entry point, to build, post-process, deploy, run and stop the example:
254254
255255
```bash
256-
bazel build --config=aarch64 --spawn_strategy=local //example/ipc_bridge_hi_wrapper:run_example
256+
bazel build --config=aarch64 --spawn_strategy=local //scrample_sil:run_example
257257
```
258258
259259
This command will take a while to finish, since it performs some downloads and starts the fast-dev image.
@@ -315,7 +315,7 @@ SDK:handler_do_el0_svc_pre: syscall __NR_clone3 (435) is not allowed
315315
Building all components of the example application can be performed with the `hi_app` rule.
316316
317317
```bash
318-
bazel build --config=aarch64 --spawn_strategy=local //example/ipc_bridge_hi_wrapper:hi_app
318+
bazel build --config=aarch64 --spawn_strategy=local //scrample_sil:hi_app
319319
```
320320
321321
Due the dependencies towards `:ipc_bridge_cpp_sil` and `:ipc_bridge_hi_wrapper` this will build all required binaries.
@@ -326,16 +326,16 @@ Including the LI `ipc_bridge_cpp` binary, a temporary `ipc_bridge_hi_wrapper` bi
326326
The easiest way to setup the fast-dev image, is to use the `fastdev-image` rule.
327327
328328
```bash
329-
bazel build --config=aarch64 --spawn_strategy=local //example/ipc_bridge_hi_wrapper:fastdev-image
329+
bazel build --config=aarch64 --spawn_strategy=local //scrample_sil:fastdev-image
330330
```
331331
332332
This will first download the image via the `fetch-fastdev-archive` rule and cache the archive.
333-
Afterwards, the `fastdev-image` rule extracts the archive (containing a disk image and a kernel) to `bazel-bin/example/ipc_bridge_hi_wrapper/deb-qemuarm64/`.
333+
Afterwards, the `fastdev-image` rule extracts the archive (containing a disk image and a kernel) to `bazel-bin/scrample_sil/deb-qemuarm64/`.
334334
335335
To start the unmodified base image (without the Eclipse S-CORE example application) manually, the included `run_qemu.sh` script can be used.
336336
337337
```bash
338-
./run_qemu.sh bazel-bin/example/ipc_bridge_hi_wrapper/deb-qemuarm64/
338+
./run_qemu.sh bazel-bin/scrample_sil/deb-qemuarm64/
339339
```
340340
341341
This is of course optional, and only needed if a deeper manual look into the image is wished.
@@ -350,19 +350,19 @@ ssh -p 2222 root@localhost
350350
> [!NOTE]
351351
> Be aware, that running the image via qemu, will change the stored disk image.
352352
> Bazel will detect this change and overwrite the disk image with the original one from the downloaded archive.
353-
> If it is planned to have persistent changes on the image, copy the content of `bazel-bin/example/ipc_bridge_hi_wrapper/deb-qemuarm64/` to a location outside of `bazel-bin` and adapt the command line argument in the above `./run_qemu.sh` call accordingly.
353+
> If it is planned to have persistent changes on the image, copy the content of `bazel-bin/scrample_sil/deb-qemuarm64/` to a location outside of `bazel-bin` and adapt the command line argument in the above `./run_qemu.sh` call accordingly.
354354
355-
For deploying the example application to the image, the `upload` rule is available, which will start the image based on the content of `bazel-bin/example/ipc_bridge_hi_wrapper/deb-qemuarm64/` and deploy all needed files via `scp`.
355+
For deploying the example application to the image, the `upload` rule is available, which will start the image based on the content of `bazel-bin/scrample_sil/deb-qemuarm64/` and deploy all needed files via `scp`.
356356
357357
```bash
358-
bazel build --config=aarch64 --spawn_strategy=local //example/ipc_bridge_hi_wrapper:upload
358+
bazel build --config=aarch64 --spawn_strategy=local //scrample_sil:upload
359359
```
360360
361-
Since the deployment step will change the stored disk image, the `upload` rule stores its output in `bazel-bin/example/ipc_bridge_hi_wrapper/deb-qemuarm64-modified/`.
361+
Since the deployment step will change the stored disk image, the `upload` rule stores its output in `bazel-bin/scrample_sil/deb-qemuarm64-modified/`.
362362
Running the image with the deployed example applications works the same way as before, just with a different folder for the used image and kernel:
363363
364364
```bash
365-
./run_qemu.sh bazel-bin/example/ipc_bridge_hi_wrapper/deb-qemuarm64-modified/
365+
./run_qemu.sh bazel-bin/scrample_sil/deb-qemuarm64-modified/
366366
```
367367
368368
Like before you can interact with the image via the serial console or ssh.

ebclfsa/example/ipc_bridge/BUILD

Lines changed: 0 additions & 65 deletions
This file was deleted.

ebclfsa/example/ipc_bridge/assert_handler.cpp

Lines changed: 0 additions & 69 deletions
This file was deleted.

ebclfsa/example/ipc_bridge/assert_handler.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

ebclfsa/example/ipc_bridge/datatype.cpp

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)