diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..c795b054 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 9730d81b..060e85cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,4 +53,3 @@ addons: - sed - cmake - dfu-util - diff --git a/docker-compose-nogit.yml b/docker-compose-nogit.yml new file mode 100644 index 00000000..652203f4 --- /dev/null +++ b/docker-compose-nogit.yml @@ -0,0 +1,9 @@ +version: '3.9' + +services: + portapack-mayhem-dev: + build: + context: . + dockerfile: dockerfile-nogit-alpine + volumes: + - ".:/havoc" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..ce49fbdf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3.9' + +services: + portapack-mayhem-dev: + build: + context: . + dockerfile: dockerfile-alpine + volumes: + - "./bin:/havocbin" \ No newline at end of file diff --git a/dockerfile b/dockerfile index a087fcd2..750ecb90 100644 --- a/dockerfile +++ b/dockerfile @@ -24,9 +24,9 @@ RUN curl https://bootstrap.pypa.io/pip/3.4/get-pip.py -o get-pip.py && \ #Fetch additional dependencies from Python 2.x pip RUN pip install pyyaml RUN rm -rf /usr/bin/python && \ - rm -rf /usr/bin/pip && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - ln -s /usr/bin/pip3 /usr/bin/pip + rm -rf /usr/bin/pip && \ + ln -s /usr/bin/python3 /usr/bin/python && \ + ln -s /usr/bin/pip3 /usr/bin/pip ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 @@ -37,12 +37,12 @@ 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 - + #Set environment variable so compiler knows where the toolchain lives ENV PATH=$PATH:/opt/build/armbin/bin CMD cd /havocsrc && \ - mkdir build && cd build && \ - cmake .. && make firmware && \ - cp /portapack-havoc/firmware/portapack-h1-havoc.bin /havocbin + mkdir build && cd build && \ + cmake .. && make firmware && \ + cp /portapack-havoc/firmware/portapack-h1-havoc.bin /havocbin diff --git a/dockerfile-alpine b/dockerfile-alpine new file mode 100644 index 00000000..4b680a24 --- /dev/null +++ b/dockerfile-alpine @@ -0,0 +1,29 @@ +# Download base image. +FROM alpine:edge + +# Download ARM toolkit. +RUN apk add --no-cache gcc-arm-none-eabi gcc + +# Create volume /havocbin for compiled firmware binaries +VOLUME /havocbin + +# Copy build context (repository root) to /havocsrc +COPY ./ /havocsrc + +# Fetch dependencies from APK +RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories +RUN apk update -U +RUN apk add --no-cache git tar wget cmake curl bzip2 make +RUN apk add --no-cache dfu-util ccache icu-data-full +RUN apk add --no-cache python3 py3-pip py3-yaml +RUN apk add --no-cache py3-pyyaml-env-tag +RUN apk add --no-cache g++ gcc clang clang-static clang-dev llvm-dev llvm-static + +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 + +CMD cd /havocsrc && \ + mkdir build && cd build && \ + cmake .. && make firmware && \ + cp /portapack-havoc/firmware/portapack-h1-havoc.bin /havocbin + diff --git a/dockerfile-nogit b/dockerfile-nogit index b317a834..a48a5522 100644 --- a/dockerfile-nogit +++ b/dockerfile-nogit @@ -21,7 +21,7 @@ RUN curl https://bootstrap.pypa.io/pip/3.4/get-pip.py -o get-pip.py && \ #Fetch additional dependencies from Python 3.x pip RUN pip install pyyaml RUN ln -s /usr/bin/python3 /usr/bin/python && \ - ln -s /usr/bin/pip3 /usr/bin/pip + ln -s /usr/bin/pip3 /usr/bin/pip ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 @@ -38,4 +38,4 @@ 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 + cmake .. && make firmware diff --git a/dockerfile-nogit-alpine b/dockerfile-nogit-alpine new file mode 100644 index 00000000..8cfe172d --- /dev/null +++ b/dockerfile-nogit-alpine @@ -0,0 +1,27 @@ +FROM alpine:edge + +# Download ARM toolkit. +RUN apk add --no-cache gcc-arm-none-eabi gcc + +# Create volume /havoc/bin for compiled firmware binaries +VOLUME /havoc +WORKDIR /havoc/firmware + +# Fetch dependencies from APK +RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories +RUN apk update -U +RUN apk add --no-cache git tar wget cmake curl bzip2 make +RUN apk add --no-cache dfu-util ccache icu-data-full +RUN apk add --no-cache python3 py3-pip py3-yaml +RUN apk add --no-cache py3-pyyaml-env-tag +RUN apk add --no-cache g++ gcc clang clang-static clang-dev llvm-dev llvm-static + +ENV LANG C.UTF-8 +ENV LC_ALL C.UTF-8 + +# 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 diff --git a/sdcard/WAV/noise.wav b/sdcard/WAV/noise.wav new file mode 100644 index 00000000..52c8d9fe Binary files /dev/null and b/sdcard/WAV/noise.wav differ diff --git a/sdcard/WAV/tone square.wav b/sdcard/WAV/tone square.wav new file mode 100644 index 00000000..e37614f9 Binary files /dev/null and b/sdcard/WAV/tone square.wav differ