Skip to content

Commit e6c0db8

Browse files
committed
Edge Virtualization Platform v1.42.0
0 parents  commit e6c0db8

File tree

704 files changed

+120300
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

704 files changed

+120300
-0
lines changed

.clang-format

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
Language: Cpp
6+
BasedOnStyle: LLVM
7+
IndentWidth: 8
8+
ConstructorInitializerIndentWidth: 8
9+
ContinuationIndentWidth: 8
10+
PointerAlignment: Right
11+
ColumnLimit: 79
12+
TabWidth: 8
13+
UseTab: ForContinuationAndIndentation
14+
AlignConsecutiveMacros: true
15+
AlwaysBreakAfterReturnType: TopLevelDefinitions
16+
ForEachMacros: ["TAILQ_FOREACH", "TAILQ_FOREACH_SAFE"]
17+
BreakBeforeBraces: Custom
18+
BraceWrapping:
19+
AfterControlStatement: Never
20+
AfterCaseLabel: false
21+
AfterEnum: false
22+
AfterFunction: true
23+
AfterStruct: false
24+
AfterUnion: false
25+
AfterExternBlock: false
26+
BeforeElse: false
27+
BeforeWhile: false
28+
SplitEmptyFunction: true
29+
AllowShortIfStatementsOnASingleLine: Never
30+
AllowShortLoopsOnASingleLine: false
31+
SpaceAfterCStyleCast: false
32+
SpaceAfterLogicalNot: false
33+
SortIncludes: true
34+
IndentCaseBlocks: true
35+
IndentCaseLabels: false
36+
IncludeBlocks: Regroup
37+
# Disable file-to-main-include by specifying a regex which never match
38+
IncludeIsMainRegex: '/INEXISTENT$'
39+
IncludeCategories:
40+
- Regex: '<config.h>'
41+
Priority: 0
42+
- Regex: '<nuttx/.*'
43+
Priority: 1
44+
- Regex: '<sys/.*'
45+
Priority: 2
46+
# 3rd party libraries
47+
- Regex: '<cmocka\.h>'
48+
Priority: 4
49+
- Regex: '<mbedtls/.*'
50+
Priority: 4
51+
- Regex: '<mqtt\.h>'
52+
Priority: 4
53+
- Regex: '<wasm_export\.h>'
54+
Priority: 4
55+
- Regex: '<evp/.*'
56+
Priority: 4
57+
- Regex: '<parson\.h>'
58+
Priority: 4
59+
# internal headers shared between sdk and agent
60+
- Regex: '<internal/.*>'
61+
Priority: 5
62+
# private fork of 3rd party libraries
63+
- Regex: '"webclient/.*'
64+
Priority: 6
65+
- Regex: '"netlib/.*'
66+
Priority: 6
67+
- Regex: '"azure/.*'
68+
Priority: 6
69+
- Regex: '"hash\.h"'
70+
Priority: 9
71+
- Regex: '<.*'
72+
Priority: 3
73+
- Regex: '".*'
74+
Priority: 7
75+
- Regex: '.*'
76+
Priority: 8

.devcontainer/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
## Devcontainer
8+
9+
Devcontainers are the easiest way to replicate the environment we usually
10+
use for development and in the CI.
11+
12+
More information available on https://containers.dev/supporting
13+
14+
## How to start using VS Code
15+
16+
Install the devcontainers extension, open the repository root as the workspace
17+
root, and select option "Reopen in Container"
18+
19+
## How to start using OSS tools
20+
21+
Install devcontainer-cli:
22+
23+
We know you have `npm` already installed.
24+
25+
```bash
26+
npm install -g @devcontainers/cli
27+
```
28+
29+
Build and start the devcontainer. Run from root repo dir:
30+
31+
```bash
32+
devcontainer up --config .devcontainer/ubuntu/devcontainer.json --workspace-folder .
33+
```
34+
35+
Run bash in the devcontainer you just created
36+
37+
```bash
38+
devcontainer exec --workspace-folder . bash
39+
```

.devcontainer/raspi/Dockerfile

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
FROM ghcr.io/casaroli/raspios-lite-bookworm:latest
6+
7+
ARG USERNAME=mido
8+
ARG USER_UID=1000
9+
ARG USER_GID=$USER_UID
10+
11+
ARG NODE_MAJOR=20
12+
ARG LLVM_VERSION=18
13+
14+
ENV DEBIAN_FRONTEND=noninteractive
15+
16+
17+
RUN apt-get update && apt-get install -y --no-install-recommends \
18+
black \
19+
ca-certificates \
20+
curl \
21+
flake8 \
22+
gcc \
23+
git \
24+
gpg \
25+
make \
26+
pycodestyle \
27+
python3-pip \
28+
python3-bashate \
29+
python3-dev \
30+
python3-build \
31+
python3-all-dev \
32+
python3-stdeb \
33+
python3-venv \
34+
ssh \
35+
bear \
36+
build-essential \
37+
cmake \
38+
cppcheck \
39+
python3-kconfiglib \
40+
kconfig-frontends-nox \
41+
unzip \
42+
xxd \
43+
doxygen \
44+
sphinx \
45+
hitch \
46+
lcov \
47+
libcmocka-dev \
48+
net-tools \
49+
jq \
50+
valgrind \
51+
debhelper \
52+
swig \
53+
dh-python \
54+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
55+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
56+
apt-get update && apt-get install -y --no-install-recommends \
57+
nodejs \
58+
&& apt-get clean -y\
59+
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 50
60+
61+
RUN echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list && \
62+
curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
63+
apt-get update && apt-get install -y --no-install-recommends \
64+
clang-format-${LLVM_VERSION} \
65+
clang-${LLVM_VERSION} \
66+
lld-${LLVM_VERSION} \
67+
clang-tidy-${LLVM_VERSION} \
68+
clang-tools-${LLVM_VERSION} \
69+
llvm-${LLVM_VERSION}-dev \
70+
lld-${LLVM_VERSION} \
71+
llvm-${LLVM_VERSION}-tools \
72+
libc++-${LLVM_VERSION}-dev \
73+
libc++abi-${LLVM_VERSION}-dev \
74+
libclang-common-${LLVM_VERSION}-dev \
75+
libclang-${LLVM_VERSION}-dev \
76+
libclang-cpp${LLVM_VERSION}-dev \
77+
libunwind-${LLVM_VERSION}-dev \
78+
libclang-rt-${LLVM_VERSION}-dev \
79+
libpolly-${LLVM_VERSION}-dev \
80+
&& apt-get clean -y \
81+
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${LLVM_VERSION} 50 \
82+
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 50 \
83+
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 50 \
84+
&& update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${LLVM_VERSION} 50 \
85+
&& update-alternatives --install /usr/bin/clang-cl clang-cl /usr/bin/clang-cl-${LLVM_VERSION} 50 \
86+
&& update-alternatives --install /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-${LLVM_VERSION} 50 \
87+
&& update-alternatives --install /usr/bin/clang-check clang-check /usr/bin/clang-check-${LLVM_VERSION} 50 \
88+
&& update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-${LLVM_VERSION} 50 \
89+
&& update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${LLVM_VERSION} 50 \
90+
&& update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${LLVM_VERSION} 50 \
91+
&& update-alternatives --install /usr/bin/wasm-ld wasm-ld /usr/bin/wasm-ld-${LLVM_VERSION} 50
92+
93+
ENV WASI_PREFIX=/usr/bin/
94+
ARG WASI_SDK_VERSION=24
95+
ENV WASI_SYSROOT=/opt/wasi-sysroot-${WASI_SDK_VERSION}.0
96+
97+
# The builtins file has to be in a specific directory /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/
98+
# Please check https://github.com/WebAssembly/wasi-sdk/releases
99+
RUN curl -fsSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sysroot-${WASI_SDK_VERSION}.0.tar.gz | \
100+
tar xzC /opt \
101+
&& mkdir /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/ \
102+
&& curl -fsSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/libclang_rt.builtins-wasm32-wasi-${WASI_SDK_VERSION}.0.tar.gz | \
103+
tar xzC /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/ --strip-components=1
104+
105+
# Accomodate the user for devcontainer
106+
RUN (userdel -r $USERNAME ; userdel -r `id -nu $USER_UID` ; groupdel `id -gu $USER_GID`) || true \
107+
&& groupadd --gid $USER_GID $USERNAME \
108+
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
109+
&& apt-get update \
110+
&& apt-get install -y sudo \
111+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
112+
&& chmod 0440 /etc/sudoers.d/$USERNAME
113+
114+
USER $USERNAME
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"build": {
3+
// Path is relative to the devcontainer.json file.
4+
"dockerfile": "Dockerfile",
5+
"options": [
6+
"--platform=linux/amd64"
7+
]
8+
},
9+
"remoteUser": "mido",
10+
"features": {
11+
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
12+
"packages": "bash-completion, iputils-ping"
13+
},
14+
"ghcr.io/devcontainers/features/github-cli:1": {}
15+
}
16+
}

.devcontainer/ubuntu/Dockerfile

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# SPDX-FileCopyrightText: 2023-2024 Sony Semiconductor Solutions Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
FROM ubuntu:24.04
6+
7+
ARG USERNAME=mido
8+
ARG USER_UID=1000
9+
ARG USER_GID=$USER_UID
10+
11+
ARG NODE_MAJOR=20
12+
ARG LLVM_VERSION=18
13+
14+
ENV DEBIAN_FRONTEND=noninteractive
15+
16+
17+
RUN apt-get update && apt-get install -y --no-install-recommends \
18+
black \
19+
ca-certificates \
20+
curl \
21+
fakeroot \
22+
flake8 \
23+
gcc \
24+
git \
25+
gpg \
26+
make \
27+
pycodestyle \
28+
python3-pip \
29+
python3-bashate \
30+
python3-dev \
31+
python3-build \
32+
python3-all-dev \
33+
# python3-stdeb \
34+
python3-venv \
35+
ssh \
36+
bear \
37+
build-essential \
38+
cmake \
39+
cppcheck \
40+
python3-kconfiglib \
41+
kconfig-frontends-nox \
42+
unzip \
43+
xxd \
44+
doxygen \
45+
sphinx \
46+
hitch \
47+
lcov \
48+
libcmocka-dev \
49+
net-tools \
50+
jq \
51+
valgrind \
52+
debhelper \
53+
swig \
54+
dh-python \
55+
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
56+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
57+
apt-get update && apt-get install -y --no-install-recommends \
58+
nodejs \
59+
&& apt-get clean -y\
60+
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 50
61+
62+
# Remove this once stdeb is fully released for ubuntu:24.04 (python3.12)
63+
RUN pip3 install git+https://github.com/astraw/stdeb.git --break-system-packages
64+
65+
RUN echo "deb https://apt.llvm.org/jammy/ llvm-toolchain-jammy-${LLVM_VERSION} main" > /etc/apt/sources.list.d/apt.llvm.org.list && \
66+
curl -sL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
67+
apt-get update && apt-get install -y --no-install-recommends \
68+
clang-format-${LLVM_VERSION} \
69+
clang-${LLVM_VERSION} \
70+
lld-${LLVM_VERSION} \
71+
clang-tidy-${LLVM_VERSION} \
72+
clang-tools-${LLVM_VERSION} \
73+
llvm-${LLVM_VERSION}-dev \
74+
lld-${LLVM_VERSION} \
75+
llvm-${LLVM_VERSION}-tools \
76+
libc++-${LLVM_VERSION}-dev \
77+
libc++abi-${LLVM_VERSION}-dev \
78+
libclang-common-${LLVM_VERSION}-dev \
79+
libclang-${LLVM_VERSION}-dev \
80+
libclang-cpp${LLVM_VERSION}-dev \
81+
libunwind-${LLVM_VERSION}-dev \
82+
libclang-rt-${LLVM_VERSION}-dev \
83+
libpolly-${LLVM_VERSION}-dev \
84+
&& apt-get clean -y \
85+
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${LLVM_VERSION} 50 \
86+
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 50 \
87+
&& update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 50 \
88+
&& update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${LLVM_VERSION} 50 \
89+
&& update-alternatives --install /usr/bin/clang-cl clang-cl /usr/bin/clang-cl-${LLVM_VERSION} 50 \
90+
&& update-alternatives --install /usr/bin/clang-cpp clang-cpp /usr/bin/clang-cpp-${LLVM_VERSION} 50 \
91+
&& update-alternatives --install /usr/bin/clang-check clang-check /usr/bin/clang-check-${LLVM_VERSION} 50 \
92+
&& update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-${LLVM_VERSION} 50 \
93+
&& update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${LLVM_VERSION} 50 \
94+
&& update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-${LLVM_VERSION} 50 \
95+
&& update-alternatives --install /usr/bin/wasm-ld wasm-ld /usr/bin/wasm-ld-${LLVM_VERSION} 50
96+
97+
ENV WASI_PREFIX=/usr/bin/
98+
ARG WASI_SDK_VERSION=24
99+
ENV WASI_SYSROOT=/opt/wasi-sysroot-${WASI_SDK_VERSION}.0
100+
101+
# The builtins file has to be in a specific directory /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/
102+
# Please check https://github.com/WebAssembly/wasi-sdk/releases
103+
RUN curl -fsSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sysroot-${WASI_SDK_VERSION}.0.tar.gz | \
104+
tar xzC /opt \
105+
&& mkdir /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/ \
106+
&& curl -fsSL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/libclang_rt.builtins-wasm32-wasi-${WASI_SDK_VERSION}.0.tar.gz | \
107+
tar xzC /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/wasi/ --strip-components=1
108+
109+
# Accomodate the user for devcontainer
110+
RUN (userdel -r $USERNAME ; userdel -r `id -nu $USER_UID` ; groupdel `id -gu $USER_GID`) || true \
111+
&& groupadd --gid $USER_GID $USERNAME \
112+
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
113+
&& apt-get update \
114+
&& apt-get install -y sudo \
115+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
116+
&& chmod 0440 /etc/sudoers.d/$USERNAME
117+
118+
USER $USERNAME
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"build": {
3+
// Path is relative to the devcontainer.json file.
4+
"dockerfile": "Dockerfile",
5+
},
6+
"remoteUser": "mido",
7+
"features": {
8+
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
9+
"packages": "bash-completion, iputils-ping"
10+
},
11+
"ghcr.io/devcontainers/features/github-cli:1": {}
12+
}
13+
}

0 commit comments

Comments
 (0)