-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add docker image files for Telink platform * [Telink] rework Dockerfile with chain commands * Restyled by whitespaces * [Telink] add TELINK_TOOLCHAIN_BASE required for west flash command
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
ARG VERSION=latest | ||
FROM connectedhomeip/chip-build:${VERSION} | ||
|
||
# Telink Toolchain | ||
ARG TELINK_DIR=/opt/telink | ||
RUN dpkg --add-architecture i386 \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
libc6:i386 \ | ||
libncurses5:i386 \ | ||
libstdc++6:i386 \ | ||
&& mkdir ${TELINK_DIR} \ | ||
&& cd ${TELINK_DIR} \ | ||
&& wget http://wiki.telink-semi.cn/tools_and_sdk/Tools/IDE/telink_riscv_linux_toolchain.zip \ | ||
&& unzip ${TELINK_DIR}/telink_riscv_linux_toolchain.zip -d ${TELINK_DIR} \ | ||
&& rm ${TELINK_DIR}/telink_riscv_linux_toolchain.zip | ||
|
||
# Setup Zephyr | ||
ARG ZEPHYR_PROJECT_DIR=/opt/zephyrproject | ||
ENV PATH="/root/.local/bin:${PATH}" | ||
RUN DEBIAN_FRONTEND=noninteractive apt install -y \ | ||
git \ | ||
gperf \ | ||
ccache \ | ||
dfu-util \ | ||
device-tree-compiler \ | ||
wget \ | ||
xz-utils \ | ||
gcc-multilib \ | ||
g++-multilib \ | ||
libsdl2-dev \ | ||
&& pip3 install --user -U west \ | ||
&& pip3 install pyelftools \ | ||
&& west init ${ZEPHYR_PROJECT_DIR} \ | ||
&& cd ${ZEPHYR_PROJECT_DIR} && west update && west zephyr-export \ | ||
&& python3 -m pip install -U pip \ | ||
&& pip3 install --user -r ${ZEPHYR_PROJECT_DIR}/zephyr/scripts/requirements.txt | ||
|
||
# Workaround below is require due to Telink platform | ||
# is not included into official Zephyr repo yet. | ||
# Below step will be removed in future. | ||
RUN rm -rf ${ZEPHYR_PROJECT_DIR}/zephyr \ | ||
&& git clone --branch telink_b91_tlsr9518adk80d_internal https://github.com/rikorsev/zephyr ${ZEPHYR_PROJECT_DIR}/zephyr \ | ||
&& git clone https://github.com/rikorsev/telink_hal_zephyr ${ZEPHYR_PROJECT_DIR}/modules/hal/telink \ | ||
&& cd ${ZEPHYR_PROJECT_DIR} && west update || true | ||
|
||
ENV ZEPHYR_BASE=${ZEPHYR_PROJECT_DIR}/zephyr | ||
ENV TELINK_TOOLCHAIN_PATH=${TELINK_DIR}/telink_riscv_linux_toolchain/nds32le-elf-mculib-v5f/bin | ||
|
||
# Required for west flash command | ||
ENV TELINK_TOOLCHAIN_BASE=${TELINK_DIR}/telink_riscv_linux_toolchain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../chip-build/version |