mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Update Dockerfile working on both x64 / ARM
Closes https://github.com/espressif/esp-idf/issues/6730
This commit is contained in:
parent
76a44106aa
commit
d22795ea56
@ -8,7 +8,13 @@ setuptools>=21
|
|||||||
click>=7.0
|
click>=7.0
|
||||||
pyserial>=3.3
|
pyserial>=3.3
|
||||||
future>=0.15.2
|
future>=0.15.2
|
||||||
|
|
||||||
cryptography>=2.1.4
|
cryptography>=2.1.4
|
||||||
|
--only-binary cryptography
|
||||||
|
# Only binary for cryptography is here to make it work on ARMv7 architecture
|
||||||
|
# We do have cryptography binary on https://dl.espressif.com/pypi for ARM
|
||||||
|
# On https://pypi.org/ are no ARM binaries as standard now
|
||||||
|
|
||||||
pyparsing>=2.0.3,<2.4.0
|
pyparsing>=2.0.3,<2.4.0
|
||||||
pyelftools>=0.22
|
pyelftools>=0.22
|
||||||
idf-component-manager>=0.2.99-beta
|
idf-component-manager>=0.2.99-beta
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
# Copyright 2018 Espressif Systems (Shanghai) PTE LTD
|
# SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
||||||
#
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
@ -39,7 +28,7 @@ def escape_backslash(path):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
idf_path = os.getenv('IDF_PATH')
|
idf_path = os.getenv('IDF_PATH')
|
||||||
|
|
||||||
default_requirements_path = os.path.join(idf_path, 'requirements.txt')
|
default_requirements_path = os.path.join(idf_path, 'requirements.txt') # type: ignore
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='ESP-IDF Python package dependency checker')
|
parser = argparse.ArgumentParser(description='ESP-IDF Python package dependency checker')
|
||||||
parser.add_argument('--requirements', '-r',
|
parser.add_argument('--requirements', '-r',
|
||||||
@ -55,8 +44,10 @@ if __name__ == '__main__':
|
|||||||
# adjustments for options which we use.
|
# adjustments for options which we use.
|
||||||
if line.startswith('file://'):
|
if line.startswith('file://'):
|
||||||
line = os.path.basename(line)
|
line = os.path.basename(line)
|
||||||
|
if line.startswith('--only-binary'):
|
||||||
|
continue
|
||||||
if line.startswith('-e') and '#egg=' in line: # version control URLs, take the egg= part at the end only
|
if line.startswith('-e') and '#egg=' in line: # version control URLs, take the egg= part at the end only
|
||||||
line = re.search(r'#egg=([^\s]+)', line).group(1)
|
line = re.search(r'#egg=([^\s]+)', line).group(1) # type: ignore
|
||||||
try:
|
try:
|
||||||
pkg_resources.require(line)
|
pkg_resources.require(line)
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -76,7 +67,7 @@ if __name__ == '__main__':
|
|||||||
install_script = 'install.bat'
|
install_script = 'install.bat'
|
||||||
else:
|
else:
|
||||||
install_script = 'install.sh'
|
install_script = 'install.sh'
|
||||||
print('To install the missing packages, please run "%s"' % os.path.join(idf_path, install_script))
|
print('To install the missing packages, please run "%s"' % os.path.join(idf_path, install_script)) # type: ignore
|
||||||
elif sys.platform == 'win32' and os.environ.get('MSYSTEM', None) == 'MINGW32' and '/mingw32/bin/python' in sys.executable:
|
elif sys.platform == 'win32' and os.environ.get('MSYSTEM', None) == 'MINGW32' and '/mingw32/bin/python' in sys.executable:
|
||||||
print("The recommended way to install a packages is via \"pacman\". Please run \"pacman -Ss <package_name>\" for"
|
print("The recommended way to install a packages is via \"pacman\". Please run \"pacman -Ss <package_name>\" for"
|
||||||
' searching the package database and if found then '
|
' searching the package database and if found then '
|
||||||
|
@ -4017,7 +4017,6 @@ tools/ble/lib_gap.py
|
|||||||
tools/ble/lib_gatt.py
|
tools/ble/lib_gatt.py
|
||||||
tools/build_apps.py
|
tools/build_apps.py
|
||||||
tools/catch/catch.hpp
|
tools/catch/catch.hpp
|
||||||
tools/check_python_dependencies.py
|
|
||||||
tools/check_term.py
|
tools/check_term.py
|
||||||
tools/ci/check_artifacts_expire_time.py
|
tools/ci/check_artifacts_expire_time.py
|
||||||
tools/ci/check_build_warnings.py
|
tools/ci/check_build_warnings.py
|
||||||
|
@ -3,7 +3,9 @@ FROM ubuntu:20.04
|
|||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# We need libpython2.7 due to GDB tools
|
# We need libpython2.7 due to GDB tools
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN : \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
bison \
|
bison \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
@ -14,11 +16,12 @@ RUN apt-get update && apt-get install -y \
|
|||||||
git \
|
git \
|
||||||
gperf \
|
gperf \
|
||||||
lcov \
|
lcov \
|
||||||
|
libffi-dev \
|
||||||
libncurses-dev \
|
libncurses-dev \
|
||||||
|
libpython2.7 \
|
||||||
libusb-1.0-0-dev \
|
libusb-1.0-0-dev \
|
||||||
make \
|
make \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
libpython2.7 \
|
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
unzip \
|
unzip \
|
||||||
@ -27,9 +30,11 @@ RUN apt-get update && apt-get install -y \
|
|||||||
zip \
|
zip \
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10
|
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
|
||||||
|
&& python -m pip install --upgrade \
|
||||||
RUN python -m pip install --upgrade pip virtualenv
|
pip \
|
||||||
|
virtualenv \
|
||||||
|
&& :
|
||||||
|
|
||||||
# To build the image for a branch or a tag of IDF, pass --build-arg IDF_CLONE_BRANCH_OR_TAG=name.
|
# To build the image for a branch or a tag of IDF, pass --build-arg IDF_CLONE_BRANCH_OR_TAG=name.
|
||||||
# To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
|
# To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
|
||||||
@ -54,15 +59,17 @@ RUN echo IDF_CHECKOUT_REF=$IDF_CHECKOUT_REF IDF_CLONE_BRANCH_OR_TAG=$IDF_CLONE_B
|
|||||||
git submodule update --init --recursive; \
|
git submodule update --init --recursive; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install all the required tools, plus CMake
|
# Install all the required tools
|
||||||
RUN $IDF_PATH/tools/idf_tools.py --non-interactive install required \
|
RUN : \
|
||||||
|
&& update-ca-certificates --fresh \
|
||||||
|
&& $IDF_PATH/tools/idf_tools.py --non-interactive install required \
|
||||||
&& $IDF_PATH/tools/idf_tools.py --non-interactive install cmake \
|
&& $IDF_PATH/tools/idf_tools.py --non-interactive install cmake \
|
||||||
&& $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env \
|
&& $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env \
|
||||||
&& rm -rf $IDF_TOOLS_PATH/dist
|
&& rm -rf $IDF_TOOLS_PATH/dist \
|
||||||
|
&& :
|
||||||
|
|
||||||
# Ccache is installed, enable it by default
|
# Ccache is installed, enable it by default
|
||||||
ENV IDF_CCACHE_ENABLE=1
|
ENV IDF_CCACHE_ENABLE=1
|
||||||
|
|
||||||
COPY entrypoint.sh /opt/esp/entrypoint.sh
|
COPY entrypoint.sh /opt/esp/entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
|
ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
|
||||||
|
@ -410,6 +410,11 @@
|
|||||||
"size": 43877847,
|
"size": 43877847,
|
||||||
"url": "https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-3.20.3-linux-x86_64.tar.gz"
|
"url": "https://github.com/Kitware/CMake/releases/download/v3.20.3/cmake-3.20.3-linux-x86_64.tar.gz"
|
||||||
},
|
},
|
||||||
|
"linux-armel": {
|
||||||
|
"sha256": "f8bd050c2745f0dcc4b7cef9738bbfef775950a10f5bd377abb0062835e669dc",
|
||||||
|
"size": 13759084,
|
||||||
|
"url": "https://dl.espressif.com/dl/cmake/cmake-3.20.3-Linux-armv7l.tar.gz"
|
||||||
|
},
|
||||||
"macos": {
|
"macos": {
|
||||||
"sha256": "5f72dba3aa5f3800fb29ab6115ae0b31f10bdb2aad66204e14c98f6ac7e6b6ed",
|
"sha256": "5f72dba3aa5f3800fb29ab6115ae0b31f10bdb2aad66204e14c98f6ac7e6b6ed",
|
||||||
"size": 66311879,
|
"size": 66311879,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user