From 5951d2a8746183d2c71d3ce7fd0d892ad713e8f7 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 8 Feb 2020 19:01:50 +0100 Subject: [PATCH] add docker build for pluto --- build.sh | 1 + docker/Dockerfiles/Dockerfile-full | 1 + docker/Dockerfiles/Dockerfile-plutosdr | 10 ++++++ .../scripts/install-dependencies-plutosdr.sh | 35 +++++++++++++++++++ push.sh | 2 +- 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfiles/Dockerfile-plutosdr create mode 100755 docker/scripts/install-dependencies-plutosdr.sh diff --git a/build.sh b/build.sh index 5a991a7..1997bbc 100755 --- a/build.sh +++ b/build.sh @@ -13,4 +13,5 @@ docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-sdrplay:$ARCHTAG docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-hackrf:$ARCHTAG -f docker/Dockerfiles/Dockerfile-hackrf . docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-airspy:$ARCHTAG -f docker/Dockerfiles/Dockerfile-airspy . docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-rtlsdr-soapy:$ARCHTAG -f docker/Dockerfiles/Dockerfile-rtlsdr-soapy . +docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-plutosdr:$ARCHTAG -f docker/Dockerfiles/Dockerfile-plutosdr . docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-full:$ARCHTAG -t jketterl/openwebrx:$ARCHTAG -f docker/Dockerfiles/Dockerfile-full . diff --git a/docker/Dockerfiles/Dockerfile-full b/docker/Dockerfiles/Dockerfile-full index 5d59e6a..c538b2d 100644 --- a/docker/Dockerfiles/Dockerfile-full +++ b/docker/Dockerfiles/Dockerfile-full @@ -10,6 +10,7 @@ RUN /install-dependencies-soapysdr.sh RUN /install-dependencies-sdrplay.sh RUN /install-dependencies-airspy.sh RUN /install-dependencies-rtlsdr-soapy.sh +RUN /install-dependencies-plutosdr.sh RUN rm /install-dependencies-*.sh ADD docker/scripts/install-connectors.sh / diff --git a/docker/Dockerfiles/Dockerfile-plutosdr b/docker/Dockerfiles/Dockerfile-plutosdr new file mode 100644 index 0000000..d9edda5 --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-plutosdr @@ -0,0 +1,10 @@ +ARG ARCHTAG +FROM openwebrx-soapysdr-base:$ARCHTAG + +ADD docker/scripts/install-dependencies-plutosdr.sh / +RUN /install-dependencies-plutosdr.sh +RUN rm /install-dependencies-plutosdr.sh + +ADD docker/scripts/install-connectors.sh / +RUN /install-connectors.sh +RUN rm /install-connectors.sh diff --git a/docker/scripts/install-dependencies-plutosdr.sh b/docker/scripts/install-dependencies-plutosdr.sh new file mode 100755 index 0000000..06bef53 --- /dev/null +++ b/docker/scripts/install-dependencies-plutosdr.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -euo pipefail + +function cmakebuild() { + cd $1 + if [[ ! -z "${2:-}" ]]; then + git checkout $2 + fi + mkdir build + cd build + cmake .. + make + make install + cd ../.. + rm -rf $1 +} + +cd /tmp + +STATIC_PACKAGES="libusb" +BUILD_PACKAGES="git libusb-dev cmake make gcc musl-dev g++ linux-headers" + +apk add --no-cache $STATIC_PACKAGES +apk add --no-cache --virtual .build-deps $BUILD_PACKAGES + +git clone https://github.com/analogdevicesinc/libiio.git +cmakebuild libiio 4e22517c60f3c5e691320871956edede15459ae3 + +git clone https://github.com/analogdevicesinc/libad9361-iio.git +cmakebuild libad9361-iio 8ac95f3325c18c2e34cd9cfd49c7b63d69a0a9d2 + +git clone https://github.com/pothosware/SoapyPlutoSDR.git +cmakebuild SoapyPlutoSDR e28e4f5c68c16a38c0b50b9606035f3267a135c8 + +apk del .build-deps diff --git a/push.sh b/push.sh index 1bb5fde..93e3954 100755 --- a/push.sh +++ b/push.sh @@ -7,7 +7,7 @@ ALL_ARCHS="x86_64 armv7l aarch64" TAG="latest" ARCHTAG="$TAG-$ARCH" -IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-full openwebrx" +IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-plutosdr openwebrx-full openwebrx" for image in ${IMAGES}; do docker push jketterl/$image:$ARCHTAG