Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/push-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,48 @@ jobs:

- name: free space
run: |
./free_space.sh
df . -h
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "some packages purged" echo -e "Removing unnecessary packages"
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo -e "Cleaning package cache"
sudo apt-get clean >/dev/null 2>&1
echo -e "Removing orphaned packages"
sudo deborphan | xargs -r sudo apt-get -y remove >/dev/null 2>&1
echo -e "Cleaning thumbnail cache"
rm -rf ~/.cache/thumbnails/*
echo -e "Cleaning system temporary files"
sudo rm -rf /tmp/* /var/tmp/*
echo -e "Cleaning journal logs (optional, keep last 2 weeks)"
sudo journalctl --vacuum-time=2weeks
echo -e "Cleaning old log files"
sudo find /var/log -type f -name "*.log" -exec truncate -s 0 {} \;
df . -h

- uses: dorny/paths-filter@v3
id: changes
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/test-pr.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cjson
libcanard
libcsp
cmsis-header-stm32
CMSIS_5
FreeRTOS-Kernel
STM32F103X_HAL
custom_printf
openocd
STM32L4XX_HAL
STM32F103X_HAL

esp8266/ESP8266_RTOS_SDK/
esp8266/esp8266/
esp32cam/esp-idf/
esp32cam/esp32cam/
cc2640r2f/ti_cc2640r2f_sdk/
cc2640r2f/cc2640r2f/
stm32l4a6_freertos/stm32l4a6_freertos/
stm32f103_libcanard/stm32f103_libcanard/
bbb_yocto/poky/
bbb_yocto/bbb_yocto/
atmega328p/atmega328p/
libcsp_works/libcsp_works/
helper/libcanard_sniffer/build/
renode/renode/

*.exe
195 changes: 113 additions & 82 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ RUN apt-get update && \
apt-get -y upgrade && \
apt-get -y --no-install-recommends install \
build-essential \
clang-format \
valgrind \
gdb \
ruby \
software-properties-common \
language-pack-en-base \
git \
git-core \
git-lfs \
ffmpeg \
python3 \
python3-dbg \
python3-dev \
python3-pip \
Expand All @@ -22,41 +22,37 @@ RUN apt-get update && \
python3-jinja2 \
python3-subunit \
vim \
language-pack-en-base \
tree \
wget \
gcc \
g++ \
gdbserver \
gcc-avr \
binutils-avr \
avr-libc \
gdb-avr \
libusb-dev \
avrdude \
can-utils \
socat \
cmake \
gdb-multiarch \
graphviz \
gcc-multilib \
g++-multilib \
software-properties-common \
wget \
openocd \
stlink-tools \
gdb-multiarch \
usbutils \
libusb-1.0-0-dev \
default-jdk \
gawk \
diffstat \
can-utils \
openocd \
valgrind \
libncurses5 \
libncurses5-dev \
cmake \
gdb \
clang \
clang-format \
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 \
ruby \
texlive-xetex \
inkscape \
libcairo2-dev \
flex \
bison \
gperf \
Expand All @@ -66,70 +62,105 @@ RUN apt-get update && \
libffi-dev \
libssl-dev \
dfu-util \
splint && \
apt-get -y clean
default-jre \
default-jdk \
diffstat \
chrpath \
cpio \
gawk \
file \
zstd \
liblz4-tool \
python3.10-venv \
curl \
autoconf \
automake \
libtool \
libzmq3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -y clean

RUN python3 -m pip install pyserial
RUN git config --global --add safe.directory /workspace

RUN ln -s /usr/bin/python3 /usr/bin/python

RUN gem install ceedling
RUN python3 -m pip install pyserial

RUN pip install gcovr
RUN pip install Pillow==9.5.0
RUN pip install json_repair==0.30.0
RUN pip install Requests==2.32.3
RUN pip install black==21.12b0
RUN pip install click==8.0.4
RUN pip install flake8==4.0.1
RUN pip install isort==6.0.1
RUN pip install pandas==2.3.0
RUN pip install xgboost==3.0.2
RUN pip install pulp==3.2.1
RUN pip install -U scikit-learn
RUN pip install ffmpeg_python==0.2.0
RUN pip install openai==1.86.0
RUN pip install opencv_python==4.10.0.84
RUN pip install matplotlib==3.10.5
RUN pip install graphviz
RUN pip install reportlab
RUN pip install google-auth==2.40.3
RUN pip install google-auth-oauthlib==1.2.2
RUN pip install google-auth-httplib2==0.2.0
RUN pip install google-api-python-client==2.172.0
RUN pip install scikit-learn==1.7.2
RUN pip install pytest
RUN pip install gTTS==2.5.4
RUN pip install googletrans==4.0.2
RUN pip install flatlib==0.2.3
RUN pip install pyswisseph==2.10.3.2
RUN pip install kerykeion==4.26.2
RUN pip install geopy==2.4.1
RUN pip install pytz==2025.2
RUN pip install timezonefinder==6.5.9
RUN pip install pylatex==1.4.2
RUN pip install numpy==2.0.2
RUN pip install skyfield==1.53
RUN pip install pikepdf==9.8.1
RUN pip install pyparsing==2.4.2
RUN pip install flask==3.1.2
RUN pip install jsonify==0.5

RUN git config --global --add safe.directory /workspace
# Install non-eabi-gcc
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 ln -s /usr/bin/python3 /usr/bin/python
RUN pip install matplotlib
RUN pip install pytest
RUN python3 -m pip install flake8
# Install Renode
ARG RENODE_VERSION=1.16.0
RUN wget https://github.com/renode/renode/releases/download/v${RENODE_VERSION}/renode_${RENODE_VERSION}_amd64.deb && \
apt-get update && \
apt-get install -y --no-install-recommends ./renode_${RENODE_VERSION}_amd64.deb python3-dev && \
rm ./renode_${RENODE_VERSION}_amd64.deb && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install -r /opt/renode/tests/requirements.txt --no-cache-dir

RUN cd / && \
git clone git://git.openembedded.org/bitbake
# Yocto/Bitbake related
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 && \
# esp8266 related
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
# rust related
# Rust + Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y
# cargo and rust path
ENV PATH="/root/.cargo/bin:${PATH}"
# test cargo
RUN cargo --version && rustc --version

CMD ["/bin/bash"]

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# embedded_docker

A Docker File to be used in different kind of embedded projects.

This is kind of a base project to work on different kind of technologies.

main script is "bake" and the below is its help menu

```
This script is used for setting up the environment.
Options are are:
--verbose : Enable verbose output
--module <module_name> : Specify a module to include (can be used multiple times)
: Available modules are:
- helper
- esp8266
- esp32cam
- cc2640r2f
- stm32l4a6_freertos
- stm32f103_libcanard
- bbb_yocto
- atmega328p
- libcsp_works
- renode
```
Loading