Skip to content

Commit d8f5bf1

Browse files
zhhyu7andy31415
andauthored
Add dockerfile for NuttX platform compile (#31341)
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com> Co-authored-by: Andrei Litvin <andy314@gmail.com>
1 parent 9e8a77f commit d8f5bf1

File tree

6 files changed

+48
-1
lines changed

6 files changed

+48
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
39 : [Python] Add ruff Python linter to chip-build
1+
40 : [NuttX] Add support for NuttX SDK
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
ARG VERSION=1
2+
FROM ghcr.io/project-chip/chip-build:${VERSION}
3+
LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip
4+
5+
# ------------------------------------------------------------------------------
6+
# Install prerequisites
7+
RUN set -x \
8+
&& dpkg --add-architecture i386 \
9+
&& apt update -y \
10+
&& apt install -y genromfs xxd libgmp-dev libmpfr-dev libmpc-dev \
11+
&& : # last line
12+
13+
# ------------------------------------------------------------------------------
14+
# Download and build g++-13
15+
RUN set -x \
16+
&& ! test -d /opt/nuttx/gcc-13 \
17+
&& wget -P gcc_build https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-13.1.0/gcc-13.1.0.tar.gz \
18+
&& cd gcc_build \
19+
&& tar xzf gcc-13.1.0.tar.gz \
20+
&& cd gcc-13.1.0 \
21+
&& ./configure --prefix=/opt/nuttx/gcc-13 --disable-multilib \
22+
&& make -j8 \
23+
&& make install-strip \
24+
&& rm -rf ../../gcc_build \
25+
&& : # last line
26+
27+
# ------------------------------------------------------------------------------
28+
# Download NuttX SDK
29+
RUN set -x \
30+
&& cd /opt/nuttx \
31+
&& wget -q -O nuttx.zip https://codeload.github.com/apache/nuttx/zip/b8e0423 \
32+
&& unzip -q nuttx.zip \
33+
&& mv nuttx-b8e0423 nuttx \
34+
&& rm nuttx.zip
35+
36+
RUN set -x \
37+
&& cd /opt/nuttx \
38+
&& wget -q -O nuttx_app.zip https://codeload.github.com/apache/nuttx-apps/zip/9c48a8d \
39+
&& unzip -q nuttx_app.zip \
40+
&& mv nuttx-apps-9c48a8d apps \
41+
&& rm nuttx_app.zip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../build.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../run.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../base/chip-build/version

integrations/docker/images/vscode/chip-build-vscode/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ FROM ghcr.io/project-chip/chip-build-ti:${VERSION} AS ti
1717
FROM ghcr.io/project-chip/chip-build-openiotsdk:${VERSION} AS openiotsdk
1818
FROM ghcr.io/project-chip/chip-build-bouffalolab:${VERSION} AS bouffalolab
1919
FROM ghcr.io/project-chip/chip-build-asr:${VERSION} AS asr
20+
FROM ghcr.io/project-chip/chip-build-nuttx:${VERSION} AS nuttx
2021
FROM ghcr.io/project-chip/chip-build:${VERSION}
2122

2223
LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip
@@ -67,6 +68,8 @@ COPY --from=efr32 /opt/silabs/gecko_sdk /opt/silabs/gecko_sdk
6768
COPY --from=efr32 /opt/silabs/wiseconnect-wifi-bt-sdk /opt/silabs/wiseconnect-wifi-bt-sdk
6869
COPY --from=efr32 /opt/silabs/wifi_sdk /opt/silabs/wifi_sdk
6970

71+
COPY --from=nuttx /opt/nuttx /opt/nuttx
72+
7073
# Android license file "acceping" is done by writing license hashes
7174
# into the 'licenses' subfolder. This allows any user (in particular
7275
# 'vscode' to accept licenses)

0 commit comments

Comments
 (0)