11# Copyright (C) 2019 Intel Corporation. All rights reserved.
22# 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.
36FROM ubuntu:22.04
47
58ARG DEBIAN_FRONTEND=noninteractive
69ENV 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
713
814# Install dependencies for Zephyr
915# hadolint ignore=DL3008
@@ -16,28 +22,34 @@ RUN apt-get update && apt-get install -y --no-install-recommends git cmake ninja
1622# Install the Zephyr Software Development Kit (SDK)
1723WORKDIR /opt
1824# 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
2228
23- WORKDIR /opt/zephyr-sdk-0.16.3
29+ WORKDIR /opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
2430# hadolint ignore=DL4006
25- RUN yes | ./setup.sh
31+ # Install host tools and Register Zephyr SDK CMake package
32+ RUN ./setup.sh -h -c
2633
2734# Get Zephyr
35+ WORKDIR /root/zephyrproject/smoke-test
36+
2837# 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
3040
31- WORKDIR /root/zephyrproject
32- RUN west update
41+ # init the west workspace with a minimal manifest
42+ RUN west init -l
3343
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
3646
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
4049
41- WORKDIR /root/wasm-micro-runtime/product-mini/platforms/ zephyr/simple
50+ ENV ZEPHYR_BASE= " /root/zephyrproject/modules/ zephyr"
4251
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