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
+ # In west_lite.yml, the Zephyr version is set to v3.7.0
12
+ # ARG ZEPHYR_VERSION=3.7.0
7
13
8
14
# Install dependencies for Zephyr
9
15
# hadolint ignore=DL3008
@@ -16,28 +22,34 @@ RUN apt-get update && apt-get install -y --no-install-recommends git cmake ninja
16
22
# Install the Zephyr Software Development Kit (SDK)
17
23
WORKDIR /opt
18
24
# 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
25
+ 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 \
26
+ && wget --progress=dot:giga -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION} /sha256.sum | shasum --check --ignore-missing \
27
+ && tar xf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux -x86_64.tar.xz && rm zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux -x86_64.tar.xz
22
28
23
- WORKDIR /opt/zephyr-sdk-0.16.3
29
+ WORKDIR /opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
24
30
# hadolint ignore=DL4006
25
- RUN yes | ./setup.sh
31
+ # Install host tools and Register Zephyr SDK CMake package
32
+ RUN ./setup.sh -h -c
26
33
27
34
# Get Zephyr
35
+ WORKDIR /root/zephyrproject/smoke-test
36
+
28
37
# 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
38
+ RUN pip3 install --no-cache-dir west
39
+ COPY ./west_lite.yml ./west.yml
30
40
31
- WORKDIR /root/zephyrproject
32
- RUN west update
41
+ # init the west workspace with a minimal manifest
42
+ RUN west init -l
33
43
34
- WORKDIR /root/zephyrproject/zephyr
35
- RUN west zephyr-export && pip install --no-cache-dir -r ~/zephyrproject/zephyr/scripts/requirements.txt
44
+ WORKDIR /root/zephyrproject
45
+ RUN west update --stats
36
46
37
- # Git clone wamr
38
- WORKDIR /root
39
- RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git
47
+ WORKDIR /root/zephyrproject/modules/zephyr
48
+ RUN west zephyr-export && pip install --no-cache-dir -r ./scripts/requirements.txt
40
49
41
- WORKDIR /root/wasm-micro-runtime/product-mini/platforms/ zephyr/simple
50
+ ENV ZEPHYR_BASE= " /root/zephyrproject/modules/ zephyr"
42
51
43
- ENV ZEPHYR_BASE="/root/zephyrproject/zephyr"
52
+ # Git clone wamr
53
+ WORKDIR /root/zephyrproject/modules/
54
+ RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git wasm-micro-runtime
55
+ WORKDIR /root/zephyrproject/modules/wasm-micro-runtime/product-mini/platforms/zephyr
0 commit comments