mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-07 15:35:16 +00:00
![Stefan Wallentowitz](/assets/img/avatar_default.png)
Update the Zephyr document to provide more detailed instructions, and add info about espressif toolchain too. Add ESP32C3 (RISC-V) and Particle Argon boards support to the zephyr platform sample. More boards are possible, but the script doesn't scale well and is to be improved in future. Add Dockerfile to kickstart a Zephyr development environment as it can be rather confusing for new users.
35 lines
990 B
Docker
35 lines
990 B
Docker
FROM ubuntu:20.04
|
|
|
|
ARG DOCKER_UID=1000
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN apt-get -qq update && apt-get -qq dist-upgrade && apt install -qq -y python3-pip git wget ninja-build
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN mkdir /opt/cmake && wget -q https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.sh && sh cmake-3.22.1-linux-x86_64.sh --skip-license --prefix=/opt/cmake && rm cmake-3.22.1-linux-x86_64.sh
|
|
|
|
ENV PATH="/opt/cmake/bin:$PATH"
|
|
|
|
RUN useradd -m wamr -u ${DOCKER_UID} -G dialout
|
|
|
|
USER wamr
|
|
|
|
ENV PATH="/home/wamr/.local/bin:$PATH"
|
|
|
|
RUN pip3 install --user west
|
|
|
|
RUN west init ~/zephyrproject && cd ~/zephyrproject && west update && west zephyr-export
|
|
|
|
RUN pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt
|
|
|
|
WORKDIR /home/wamr/zephyrproject
|
|
|
|
RUN west espressif install
|
|
|
|
ENV ZEPHYR_BASE=/home/wamr/zephyrproject/zephyr
|
|
ENV ESPRESSIF_TOOLCHAIN_PATH=/home/wamr/.espressif/tools/zephyr
|
|
|
|
WORKDIR /home/wamr/source/product-mini/platforms/zephyr/simple
|