2024-11-25 08:19:43 +00:00
|
|
|
FROM ubuntu:noble
|
2023-06-09 19:52:14 +00:00
|
|
|
|
|
|
|
# Set location to download ARM toolkit from.
|
|
|
|
# This will need to be changed over time or replaced with a static link to the latest release.
|
|
|
|
ENV ARMBINURL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-aarch64-linux.tar.bz2?revision=4583ce78-e7e7-459a-ad9f-bff8e94839f1&rev=4583ce78e7e7459aad9fbff8e94839f1&hash=C9B942D74CEA05FF9DE28380F267BB7D3F3B17A6 \
|
|
|
|
PATH=$HOME/bin:$PATH:/opt/build/armbin/bin
|
|
|
|
|
|
|
|
#Create volume /havoc/bin for compiled firmware binaries
|
|
|
|
VOLUME /havoc
|
|
|
|
WORKDIR /havoc/firmware
|
|
|
|
|
|
|
|
# Fetch dependencies from APT
|
2024-01-05 23:42:36 +00:00
|
|
|
RUN apt-get update \
|
2024-11-25 08:19:43 +00:00
|
|
|
&& apt-get install -y git tar wget dfu-util cmake python3 python3-pip python3-yaml ccache bzip2 liblz4-tool curl ninja-build \
|
2024-01-05 23:42:36 +00:00
|
|
|
&& apt-get -qy autoremove \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2023-06-09 19:52:14 +00:00
|
|
|
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
ENV LC_ALL C.UTF-8
|
|
|
|
|
|
|
|
# Grab the GNU ARM toolchain from arm.com
|
|
|
|
# Then extract contents to /opt/build/armbin/
|
2024-01-05 23:42:36 +00:00
|
|
|
RUN mkdir /opt/build \
|
|
|
|
&& cd /opt/build \
|
|
|
|
&& wget -O gcc-arm-none-eabi $ARMBINURL \
|
|
|
|
&& mkdir armbin \
|
|
|
|
&& tar --strip=1 -xjvf gcc-arm-none-eabi -C armbin
|
2023-06-09 19:52:14 +00:00
|
|
|
|
2024-01-05 23:42:36 +00:00
|
|
|
ADD firmware/tools/docker-entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
|
|
|
|
|
|
# replace make with ninja temporarily while building your image if you prefer to use that by default
|
|
|
|
CMD ["make"]
|