From ec29e20d7921ef966c610e0b480c3ad677890555 Mon Sep 17 00:00:00 2001 From: Erwin Ried <1091420+eried@users.noreply.github.com> Date: Sat, 25 Apr 2020 04:04:38 +0200 Subject: [PATCH] Adding CCACHE --- dockerfile-nogit | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dockerfile-nogit b/dockerfile-nogit index 0f560b93..f1949a3a 100644 --- a/dockerfile-nogit +++ b/dockerfile-nogit @@ -3,7 +3,7 @@ FROM ubuntu:latest # 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-x86_64-linux.tar.bz2?revision=108bd959-44bd-4619-9c19-26187abf5225&la=en&hash=E788CE92E5DFD64B2A8C246BBA91A249CB8E2D2D \ - PATH=$PATH:/opt/build/armbin/bin + PATH=$HOME/bin:$PATH:/opt/build/armbin/bin #Create volume /havoc/bin for compiled firmware binaries VOLUME /havoc @@ -11,7 +11,7 @@ WORKDIR /havoc/firmware # Fetch dependencies from APT RUN apt-get update && \ - apt-get install -y git tar wget dfu-util cmake python3 python-pip && \ + apt-get install -y git tar wget dfu-util cmake python3 python-pip ccache && \ apt-get -qy autoremove RUN pip install pyyaml @@ -23,5 +23,9 @@ RUN mkdir /opt/build && cd /opt/build && \ mkdir armbin && \ tar --strip=1 -xjvf gcc-arm-none-eabi -C armbin +# Configure CCACHE +RUN mkdir ~/bin && cd ~/bin && \ + for tool in gcc g++ cpp c++;do ln -s $(which ccache) arm-none-eabi-$tool;done + CMD cd .. && cd build && \ cmake .. && make firmware \ No newline at end of file