1
1
# Copyright (C) 2019 Intel Corporation. All rights reserved.
2
2
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3
+
4
+ # Refer to https://docs.zephyrproject.org/3.7.0/develop/getting_started/index.html
5
+ # for more information on how to set up the Zephyr development environment.
3
6
FROM ubuntu:22.04
4
7
5
8
ARG DEBIAN_FRONTEND=noninteractive
6
9
ENV TZ=Asian/Shanghai
10
+ ARG ZEPHYR_SDK_VERSION=0.16.9
11
+ ARG ZEPHYR_VERSION=3.7.0
7
12
8
13
# Install dependencies for Zephyr
9
14
# hadolint ignore=DL3008
@@ -16,28 +21,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends git cmake ninja
16
21
# Install the Zephyr Software Development Kit (SDK)
17
22
WORKDIR /opt
18
23
# 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
24
+ 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 \
25
+ && wget --progress=dot:giga -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION} /sha256.sum | shasum --check --ignore-missing \
26
+ && tar xf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux -x86_64.tar.xz && rm zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux -x86_64.tar.xz
22
27
23
- WORKDIR /opt/zephyr-sdk-0.16.3
28
+ WORKDIR /opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
24
29
# hadolint ignore=DL4006
25
- RUN yes | ./setup.sh
30
+ # Install host tools and Register Zephyr SDK CMake package
31
+ RUN ./setup.sh -h -c
26
32
27
33
# Get Zephyr
28
34
# 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
35
+ RUN pip3 install --no-cache-dir west
36
+
37
+ WORKDIR /root/zephyrproject/smoke-test
38
+ COPY ./west_lite.yml ./west.yml
39
+ # init the west workspace with a minimal manifest
40
+ RUN west init -l
30
41
31
42
WORKDIR /root/zephyrproject
32
- RUN west update
43
+ RUN west update --stats
33
44
34
- WORKDIR /root/zephyrproject/zephyr
35
- RUN west zephyr-export && pip install --no-cache-dir -r ~/zephyrproject/zephyr /scripts/requirements.txt
45
+ WORKDIR /root/zephyrproject/modules/ zephyr
46
+ RUN west zephyr-export && pip install --no-cache-dir -r . /scripts/requirements.txt
36
47
37
- # Git clone wamr
38
- WORKDIR /root
39
- RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git
48
+ ENV ZEPHYR_BASE="/root/zephyrproject/modules/zephyr"
40
49
41
- WORKDIR /root/wasm-micro-runtime/product-mini/platforms/zephyr/simple
42
-
43
- ENV ZEPHYR_BASE="/root/zephyrproject/zephyr"
50
+ # Git clone wamr
51
+ WORKDIR /root/zephyrproject/modules/
52
+ RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git wasm-micro-runtime
53
+ WORKDIR /root/zephyrproject/modules/wasm-micro-runtime/product-mini/platforms/zephyr
0 commit comments