Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile for NuttX platform compile #31341

Merged
merged 2 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
39 : [Python] Add ruff Python linter to chip-build
40 : [NuttX] Add support for NuttX SDK
41 changes: 41 additions & 0 deletions integrations/docker/images/stage-2/chip-build-nuttx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ARG VERSION=1
FROM ghcr.io/project-chip/chip-build:${VERSION}
LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip

# ------------------------------------------------------------------------------
# Install prerequisites
zhhyu7 marked this conversation as resolved.
Show resolved Hide resolved
RUN set -x \
&& dpkg --add-architecture i386 \
&& apt update -y \
&& apt install -y genromfs xxd libgmp-dev libmpfr-dev libmpc-dev \
&& : # last line

# ------------------------------------------------------------------------------
# Download and build g++-13
RUN set -x \
&& ! test -d /opt/nuttx/gcc-13 \
&& wget -P gcc_build https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-13.1.0/gcc-13.1.0.tar.gz \
&& cd gcc_build \
&& tar xzf gcc-13.1.0.tar.gz \
&& cd gcc-13.1.0 \
&& ./configure --prefix=/opt/nuttx/gcc-13 --disable-multilib \
&& make -j8 \
&& make install-strip \
&& rm -rf ../../gcc_build \
&& : # last line

# ------------------------------------------------------------------------------
# Download NuttX SDK
RUN set -x \
&& cd /opt/nuttx \
&& wget -q -O nuttx.zip https://codeload.github.com/apache/nuttx/zip/b8e0423 \
&& unzip -q nuttx.zip \
&& mv nuttx-b8e0423 nuttx \
&& rm nuttx.zip

RUN set -x \
&& cd /opt/nuttx \
&& wget -q -O nuttx_app.zip https://codeload.github.com/apache/nuttx-apps/zip/9c48a8d \
&& unzip -q nuttx_app.zip \
&& mv nuttx-apps-9c48a8d apps \
&& rm nuttx_app.zip
1 change: 1 addition & 0 deletions integrations/docker/images/stage-2/chip-build-nuttx/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ FROM ghcr.io/project-chip/chip-build-ti:${VERSION} AS ti
FROM ghcr.io/project-chip/chip-build-openiotsdk:${VERSION} AS openiotsdk
FROM ghcr.io/project-chip/chip-build-bouffalolab:${VERSION} AS bouffalolab
FROM ghcr.io/project-chip/chip-build-asr:${VERSION} AS asr
FROM ghcr.io/project-chip/chip-build-nuttx:${VERSION} AS nuttx
zhhyu7 marked this conversation as resolved.
Show resolved Hide resolved
FROM ghcr.io/project-chip/chip-build:${VERSION}

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

COPY --from=nuttx /opt/nuttx /opt/nuttx

# Android license file "acceping" is done by writing license hashes
# into the 'licenses' subfolder. This allows any user (in particular
# 'vscode' to accept licenses)
Expand Down
Loading