-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
136 lines (123 loc) · 4.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
USER root
RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y --no-install-recommends install \
build-essential \
clang-format \
valgrind \
gdb \
ruby \
git \
git-core \
git-lfs \
python3-dbg \
python3-dev \
python3-pip \
python3-pexpect \
python3-git \
python3-jinja2 \
python3-subunit \
vim \
language-pack-en-base \
tree \
can-utils \
socat \
cmake \
gcc-multilib \
g++-multilib \
software-properties-common \
wget \
openocd \
stlink-tools \
gdb-multiarch \
usbutils \
libusb-1.0-0-dev \
default-jdk \
gawk \
diffstat \
unzip \
texinfo \
chrpath \
cpio \
xz-utils \
debianutils \
iputils-ping \
libegl1-mesa \
libsdl1.2-dev \
xterm \
file \
mesa-common-dev \
zstd \
liblz4-tool \
bluetooth build-essential \
libglib2.0-dev \
libdbus-1-dev \
libncurses-dev \
flex \
bison \
gperf \
doxygen \
ninja-build \
ccache \
libffi-dev \
libssl-dev \
dfu-util \
splint && \
apt-get -y clean
RUN python3 -m pip install pyserial
RUN gem install ceedling
RUN pip install gcovr
RUN git config --global --add safe.directory /workspace
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip install matplotlib
RUN pip install pytest
RUN python3 -m pip install flake8
RUN cd / && \
git clone git://git.openembedded.org/bitbake
ENV PATH="${PATH}:/bitbake/bin"
ENV PYTHONPATH="${PYTHONPATH}:/bitbake/lib"
RUN pip install -r bitbake/toaster-requirements.txt
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 && \
tar -xf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
ENV PATH="/gcc-arm-none-eabi-10.3-2021.10/bin:${PATH}"
RUN pip install pyparsing==2.4.2
RUN cd / && \
mkdir esp && \
cd esp && \
wget https://dl.espressif.com/dl/xtensa-lx106-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz && \
tar -xzf xtensa-lx106-elf-gcc8_4_0-esp-2020r3-linux-amd64.tar.gz
ENV PATH="/esp/xtensa-lx106-elf/bin:${PATH}"
RUN cd / && \
git clone --recursive https://github.com/espressif/ESP8266_RTOS_SDK.git ESP8266_RTOS_SDK && \
python3 -m pip install --user -r ESP8266_RTOS_SDK/requirements.txt
RUN cd / && \
git clone -b v5.3.2 --recursive https://github.com/espressif/esp-idf.git esp-idf && \
cd esp-idf && \
apt install -y python3.10-venv && \
./install.sh esp32,esp32s2,esp32s3 && \
. ./export.sh && \
git clone https://github.com/espressif/esp32-camera.git && \
idf.py add-dependency "espressif/esp32-camera"
ADD /patches/ /thirdparty
RUN git clone https://github.com/STMicroelectronics/stm32l4xx_hal_driver.git /thirdparty/STM32L4XX_HAL && \
git clone https://github.com/modm-io/cmsis-header-stm32.git /thirdparty/cmsis-header-stm32 && \
git clone https://github.com/ARM-software/CMSIS_5.git /thirdparty/CMSIS_5 && \
git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.git /thirdparty/FreeRTOS-Kernel && \
git clone https://github.com/STMicroelectronics/stm32f1xx_hal_driver.git /thirdparty/STM32F103X_HAL && \
git clone https://github.com/dogusyuksel/embedded_linting.git /thirdparty/linting && \
git clone https://github.com/mpaland/printf.git /thirdparty/custom_printf && \
git clone https://github.com/STMicroelectronics/OpenOCD.git /thirdparty/openocd && \
cd /thirdparty && git clone -b kirkstone git://git.yoctoproject.org/poky.git && \
git clone https://github.com/dogusyuksel/ti_cc2640r2f_sdk.git ti_cc2640r2f_sdk && \
cat /thirdparty/openocd/tcl/board/stm32f103c8_blue_pill.cfg | sed -e "s/set FLASH_SIZE 0x20000/set FLASH_SIZE 0x10000/" > /thirdparty/openocd/tcl/board/stm32f103c8_custom.cfg && \
git clone https://github.com/OpenCyphal/libcanard.git /thirdparty/libcanard && \
cd /thirdparty/libcanard && git checkout 43de1c4966b8d1e5d57978949d63e697f045b358 && \
git submodule update --init --recursive && \
cd / && patch -d . -p1 < /thirdparty/transport.py.patch && patch -d . -p1 < /thirdparty/canard_stm32.patch && \
cd /thirdparty/ && git clone https://github.com/DaveGamble/cJSON.git cjson && \
cd /thirdparty/cjson && git checkout 87d8f0961a01bf09bef98ff89bae9fdec42181ee && \
mkdir build && cd build && cmake .. && make
CMD ["/bin/bash"]
WORKDIR /workspace/