Skip to content

Commit

Permalink
[Telink]: BLE commissioning (docker part) (project-chip#15722)
Browse files Browse the repository at this point in the history
* [Telink]: Update docker image

* [Telink]: Add Telink tools required for 'west flash' command to docker image

* [Telink]: Update to Zephyr v3.0.0

* [Telink]: Change bash=5.1.8-r0 to 5.1.16-r0 in doxygen Dockerfile

* [Telink]: Update docker version
  • Loading branch information
rikorsev authored and andrei-menzopol committed Apr 14, 2022
1 parent 48775f4 commit f0167f9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build-doxygen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ FROM alpine:3.15
RUN apk --no-cache add \
doxygen=1.9.2-r1 \
graphviz=2.49.3-r0 \
bash=5.1.8-r0 \
bash=5.1.16-r0 \
git=2.34.1-r0
35 changes: 27 additions & 8 deletions integrations/docker/images/chip-build-telink/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,37 @@ RUN set -x \

# Setup toolchain
RUN set -x \
&& wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.13.0/zephyr-toolchain-riscv64-0.13.0-linux-x86_64-setup.run -O /tmp/zephyr-toolchain-riscv64-setup.run \
&& wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.13.2/zephyr-toolchain-riscv64-0.13.2-linux-x86_64-setup.run -O /tmp/zephyr-toolchain-riscv64-setup.run \
&& chmod +x /tmp/zephyr-toolchain-riscv64-setup.run \
&& /tmp/zephyr-toolchain-riscv64-setup.run -- -d /opt/telink/zephyr-sdk-0.13.0 \
&& /tmp/zephyr-toolchain-riscv64-setup.run -- -d /opt/telink/zephyr-sdk-0.13.2 \
&& : # last line

# Setup Zephyr
ARG ZEPHYR_REVISION=19c519eb05d6d24a23fd084a3ab6c1a78edf5536
ARG ZEPHYR_REVISION=148e7967fb6062555f69de8cbcdc997f826b241c
WORKDIR /opt/telink/zephyrproject
RUN set -x \
&& python3 -m pip install -U --no-cache-dir \
west==0.11.1 \
&& git clone https://github.com/zephyrproject-rtos/zephyr \
west==0.12.0 \
&& git clone https://github.com/rikorsev/zephyr \
&& cd zephyr \
&& git reset ${ZEPHYR_REVISION} --hard \
&& west init -l \
&& cd .. \
&& west update \
&& west update -o=--depth=1 -n -f smart \
&& cd modules/hal/telink \
&& git remote add telink https://github.com/rikorsev/hal_telink \
&& git fetch telink telink_crypto \
&& git checkout telink_crypto \
&& west zephyr-export \
&& : # last line

FROM connectedhomeip/chip-build:${VERSION}

COPY --from=build /opt/telink/zephyr-sdk-0.13.0/ /opt/telink/zephyr-sdk-0.13.0/
COPY --from=build /opt/telink/zephyr-sdk-0.13.2/ /opt/telink/zephyr-sdk-0.13.2/
COPY --from=build /opt/telink/zephyrproject/ /opt/telink/zephyrproject/

ENV ZEPHYR_TOOLCHAIN_VARIANT=zephyr
ENV ZEPHYR_SDK_INSTALL_DIR=/opt/telink/zephyr-sdk-0.13.0
ENV ZEPHYR_SDK_INSTALL_DIR=/opt/telink/zephyr-sdk-0.13.2

RUN set -x \
&& apt-get update \
Expand All @@ -55,6 +59,21 @@ RUN set -x \
&& pip3 install --no-cache-dir --user -r /opt/telink/zephyrproject/zephyr/scripts/requirements.txt \
&& : # last line

# Setup Telink tools required for "west flash"
ARG TELINK_TOOLS_BASE=/opt/telink/tools
RUN wget http://wiki.telink-semi.cn/tools_and_sdk/Tools/IDE/telink_riscv_ice_flash_tool.zip -O /opt/telink/tools.zip \
&& unzip /opt/telink/tools.zip -d ${TELINK_TOOLS_BASE} \
&& rm /opt/telink/tools.zip \
&& mv ${TELINK_TOOLS_BASE}/telink_riscv_linux_toolchain/* ${TELINK_TOOLS_BASE} \
&& rm -rf ${TELINK_TOOLS_BASE}/telink_riscv_linux_toolchain \
&& chmod +x ${TELINK_TOOLS_BASE}/flash/bin/SPI_burn \
&& chmod +x ${TELINK_TOOLS_BASE}/ice/ICEman \
&& : # last line

# Add path to Telink tools
ENV PATH="${TELINK_TOOLS_BASE}/flash/bin:${PATH}"
ENV PATH="${TELINK_TOOLS_BASE}/ice:${PATH}"

ARG ZEPHYR_PROJECT_DIR=/opt/telink/zephyrproject
ENV TELINK_ZEPHYR_BASE=${ZEPHYR_PROJECT_DIR}/zephyr
ENV ZEPHYR_BASE=${ZEPHYR_PROJECT_DIR}/zephyr
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.58 Version bump reason: Update nRF Connect SDK
0.5.59 Version bump reason: Update Telink Docker

0 comments on commit f0167f9

Please sign in to comment.