Skip to content

Commit 690a8b6

Browse files
committed
Update Dockerfile for Zephyr SDK and Zephyr-project versioning
1 parent 602e86a commit 690a8b6

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

product-mini/platforms/zephyr/simple/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ FROM ubuntu:22.04
44

55
ARG DEBIAN_FRONTEND=noninteractive
66
ENV TZ=Asian/Shanghai
7+
ARG ZEPHYR_SDK_VERSION=0.16.9
8+
ARG ZEPHYR_VERSION=3.7.0
79

810
# Install dependencies for Zephyr
911
# hadolint ignore=DL3008
@@ -16,17 +18,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends git cmake ninja
1618
# Install the Zephyr Software Development Kit (SDK)
1719
WORKDIR /opt
1820
# hadolint ignore=DL4006
19-
RUN wget --progress=dot:giga https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/zephyr-sdk-0.16.3_linux-x86_64.tar.xz \
20-
&& wget --progress=dot:giga -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/sha256.sum | shasum --check --ignore-missing \
21-
&& tar xvf zephyr-sdk-0.16.3_linux-x86_64.tar.xz && rm zephyr-sdk-0.16.3_linux-x86_64.tar.xz
21+
RUN wget --progress=dot:giga https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64.tar.xz \
22+
&& wget --progress=dot:giga -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/sha256.sum | shasum --check --ignore-missing \
23+
&& tar xvf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64.tar.xz && rm zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64.tar.xz
2224

23-
WORKDIR /opt/zephyr-sdk-0.16.3
25+
WORKDIR /opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
2426
# hadolint ignore=DL4006
2527
RUN yes | ./setup.sh
2628

2729
# Get Zephyr
2830
# hadolint ignore=DL3013
29-
RUN pip3 install --no-cache-dir west && west init -m https://github.com/zephyrproject-rtos/zephyr --mr v3.5.0 /root/zephyrproject
31+
RUN pip3 install --no-cache-dir west && west init -m https://github.com/zephyrproject-rtos/zephyr --mr v${ZEPHYR_VERSION} /root/zephyrproject
3032

3133
WORKDIR /root/zephyrproject
3234
RUN west update
@@ -38,6 +40,6 @@ RUN west zephyr-export && pip install --no-cache-dir -r ~/zephyrproject/zephyr/s
3840
WORKDIR /root
3941
RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git
4042

41-
WORKDIR /root/wasm-micro-runtime/product-mini/platforms/zephyr/simple
43+
WORKDIR /root/wasm-micro-runtime/
4244

4345
ENV ZEPHYR_BASE="/root/zephyrproject/zephyr"

product-mini/platforms/zephyr/simple/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ is a 64-bit ARM target for emulating the Cortex-A53 platform.
8787
west build . -b qemu_cortex_a53 -p always -- -DWAMR_BUILD_TARGET=AARCH64
8888
```
8989

90+
[ARC QEMU](https://docs.zephyrproject.org/latest/boards/qemu/arc/doc/index.html)
91+
is a 32-bit ARC target for emulating the ARC platform.
92+
93+
```shell
94+
west build . -b qemu_arc/qemu_arc_em -p always -- -DWAMR_BUILD_TARGET=ARC
95+
```
9096

9197
## Flashing or Running Image
9298

0 commit comments

Comments
 (0)