Skip to content

Commit d624777

Browse files
authored
Merge branch 'master' into Add_TC_CNET_4_23
2 parents 23bb996 + 794cc19 commit d624777

File tree

5,982 files changed

+740778
-481965
lines changed

Some content is hidden

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

5,982 files changed

+740778
-481965
lines changed

.clang-tidy

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Checks: >
2424
-bugprone-multi-level-implicit-pointer-conversion,
2525
-bugprone-narrowing-conversions,
2626
-bugprone-not-null-terminated-result,
27+
-bugprone-pointer-arithmetic-on-polymorphic-object,
2728
-bugprone-reserved-identifier,
2829
-bugprone-signed-char-misuse,
2930
-bugprone-suspicious-include,
@@ -45,6 +46,7 @@ Checks: >
4546
-clang-analyzer-security.insecureAPI.rand,
4647
-clang-analyzer-security.insecureAPI.strcpy,
4748
-clang-analyzer-unix.Malloc,
48-
-clang-diagnostic-implicit-int-conversion
49+
-clang-diagnostic-implicit-int-conversion,
50+
-clang-diagnostic-missing-template-arg-list-after-template-kw
4951
WarningsAsErrors: '*'
5052
HeaderFilterRegex: '(src|examples|zzz_generated|credentials).*(?<!third_party.*repo)'

.devcontainer/Dockerfile

+28-18
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ LABEL org.opencontainers.image.source https://github.com/project-chip/connectedh
2222
ARG USERNAME=vscode
2323
ARG USER_UID=1000
2424
ARG USER_GID=$USER_UID
25-
ENV LANG en_US.utf8
25+
ENV LANG=en_US.utf8
2626

2727

2828
# These are installed for terminal/dev convenience. If more tooling for build is required, please
@@ -37,9 +37,14 @@ RUN apt-get update \
3737
valgrind \
3838
docker.io \
3939
iputils-ping \
40+
icecc \
4041
&& :
4142

42-
RUN groupadd -g $USER_GID $USERNAME \
43+
RUN (getent passwd $USER_UID && userdel -f $(getent passwd $USER_UID | cut -d: -f1) || true) \
44+
&& (getent group $USER_GID && groupdel -f $(getent group $USER_GID | cut -d: -f1) || true) \
45+
&& (getent passwd $USERNAME && userdel -f $USERNAME || true) \
46+
&& (getent group $USERNAME && groupdel -f $USERNAME || true) \
47+
&& groupadd -g $USER_GID $USERNAME \
4348
&& useradd --no-log-init -s /bin/bash -u $USER_UID -g $USER_GID -G docker,sudo -m $USERNAME \
4449
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
4550
&& chmod 0440 /etc/sudoers.d/$USERNAME \
@@ -49,25 +54,20 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
4954
&& chmod +x /usr/local/bin/restyle-path \
5055
&& :
5156

52-
RUN mkdir -p /opt/sdk/sdks/ \
57+
RUN mkdir -p /opt/android/sdk \
5358
&& chown -R $USERNAME:$USERNAME \
54-
/opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \
5559
$ANDROID_HOME \
5660
$IDF_TOOLS_PATH \
57-
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
58-
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
59-
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
60-
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
61-
&& chmod -R +x \
62-
$ANDROID_HOME/tools/bin `# sdkmanager for accepting licenses`\
61+
&& find $AMEBA_PATH \
62+
-name "inc_lp" -print0 -or \
63+
-name "inc_hp" -print0 -or \
64+
-name "project_lp" -print0 -or \
65+
-name "project_hp" -print0 \
66+
| xargs -0 -I {} sh -c 'chown -R $USERNAME:$USERNAME {}; chmod -R +w {}' \
67+
&& find $ANDROID_HOME/cmdline-tools/ -type d -name bin | xargs chmod -R +x `# sdkmanager for accepting licenses` \
6368
&& chmod -R +w \
6469
$IDF_TOOLS_PATH \
65-
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chmod -R +w \
66-
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chmod -R +w \
67-
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chmod -R +w \
68-
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chmod -R +w \
69-
# Safe directory is preffered over chown.
70-
&& git config --global --add safe.directory "*" \
70+
&& git config --global --add safe.directory "*" `# Safe directory is preferred over chown.` \
7171
&& :
7272

7373
# Fix Tizen SDK paths for new user
@@ -76,7 +76,17 @@ RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
7676
&& ln -sf /home/$USERNAME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
7777
&& : # last line
7878

79-
ENV TIZEN_ROOTFS /tizen_rootfs
79+
ENV TIZEN_ROOTFS=/tizen_rootfs
8080

8181
# Fast Model GDB plugins path for debugging support
82-
ENV FAST_MODEL_PLUGINS_PATH /opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3
82+
ENV FAST_MODEL_PLUGINS_PATH=/opt/FastModelsPortfolio_11.16/plugins/Linux64_GCC-9.3
83+
84+
# Set up ccache as a pigweed command launcher when using the scripts/build/build_examples.py
85+
# script. Also, set up icecc as the command prefix for ccache. Such setup allows to benefit
86+
# from compilation caching and distributed compilation at the same time.
87+
#
88+
# NOTE: In order to use distributed compilation with icecc, one should run
89+
# "scripts/icecc.sh start" before starting the build.
90+
ENV CHIP_PW_COMMAND_LAUNCHER=ccache
91+
ENV CCACHE_PREFIX=icecc
92+
ENV PATH=/usr/lib/ccache:$PATH

.devcontainer/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
HERE="$(dirname "$0")"
2020
CHIP_ROOT="$(realpath "$HERE"/..)"
21-
BUILD_VERSION="latest"
21+
BUILD_VERSION=$(sed 's/ .*//' "$CHIP_ROOT/integrations/docker/images/base/chip-build/version")
2222
IMAGE_TAG="matter-dev-environment:local"
2323
USER_UID=$UID
2424

@@ -32,7 +32,7 @@ Options:
3232
-h,--help Show this help
3333
-t,--tag Image tag - default is matter-dev-environment:local
3434
-u,--uid User UIDa - default is the current user ID
35-
-v,--version Build version - default is the latest
35+
-v,--version Build version - default is the version of the base chip-build docker image
3636
EOF
3737
}
3838

.devcontainer/devcontainer.json

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
{
22
"name": "CHIP Ubuntu Development Environment",
33
"runArgs": [
4-
"--cap-add=SYS_PTRACE",
5-
"--security-opt",
6-
"seccomp=unconfined",
74
"--network=host",
8-
"--privileged",
9-
"-v",
10-
"/dev/bus/usb:/dev/bus/usb:ro",
115
"--device-cgroup-rule=a 189:* rmw",
126
"--add-host=host.docker.internal:host-gateway"
137
],
8+
"privileged": true,
9+
"capAdd": ["SYS_PTRACE"],
10+
"securityOpt": ["seccomp=unconfined"],
1411
"mounts": [
15-
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
12+
{
13+
"source": "/var/run/docker.sock",
14+
"target": "/var/run/docker.sock",
15+
"type": "bind"
16+
},
17+
{
18+
"source": "/dev/bus/usb",
19+
"target": "/dev/bus/usb",
20+
"type": "bind"
21+
}
1622
],
17-
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 74",
23+
"initializeCommand": "bash .devcontainer/build.sh",
1824
"image": "matter-dev-environment:local",
1925
"remoteUser": "vscode",
2026
"containerEnv": {

.gemini/config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
have_fun: false
2+
code_review:
3+
# Disabled until we have clarity/guidance at a CSA level
4+
disable: true
5+
comment_severity_threshold: MEDIUM
6+
max_review_comments: -1
7+
pull_request_opened:
8+
help: false
9+
summary: false
10+
code_review: true

0 commit comments

Comments
 (0)