From 6f8c8a3b66d5c035c9ce3d6cf34f3ecf4ab71d7b Mon Sep 17 00:00:00 2001 From: pa3gsb Date: Sat, 15 Aug 2020 14:02:20 +0200 Subject: [PATCH] radioberry added to docker setup --- build.sh | 1 + docker/Dockerfiles/Dockerfile-radioberry | 8 +++++ docker/env | 2 +- .../install-dependencies-radioberry.sh | 35 +++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docker/Dockerfiles/Dockerfile-radioberry create mode 100644 docker/scripts/install-dependencies-radioberry.sh diff --git a/build.sh b/build.sh index 3fccffa..84a543c 100755 --- a/build.sh +++ b/build.sh @@ -14,4 +14,5 @@ docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-limesdr:$ARCHTAG docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-soapyremote:$ARCHTAG -f docker/Dockerfiles/Dockerfile-soapyremote . docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-perseus:$ARCHTAG -f docker/Dockerfiles/Dockerfile-perseus . docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-fcdpp:$ARCHTAG -f docker/Dockerfiles/Dockerfile-fcdpp . +docker build --build-arg ARCHTAG=$ARCHTAG -t jketterl/openwebrx-radioberry:$ARCHTAG -f docker/Dockerfiles/Dockerfile-radioberry . 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-radioberry b/docker/Dockerfiles/Dockerfile-radioberry new file mode 100644 index 0000000..9eabed8 --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-radioberry @@ -0,0 +1,8 @@ +ARG ARCHTAG +FROM openwebrx-soapysdr-base:$ARCHTAG + +ADD docker/scripts/install-dependencies-radioberry.sh / +RUN /install-dependencies-radioberry.sh &&\ + rm /install-dependencies-radioberry.sh + +ADD . /opt/openwebrx diff --git a/docker/env b/docker/env index 55d1586..daa5e10 100644 --- a/docker/env +++ b/docker/env @@ -1,5 +1,5 @@ ARCH=$(uname -m) -IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-plutosdr openwebrx-limesdr openwebrx-soapyremote openwebrx-perseus openwebrx-fcdpp openwebrx-full openwebrx" +IMAGES="openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf openwebrx-airspy openwebrx-rtlsdr-soapy openwebrx-plutosdr openwebrx-limesdr openwebrx-soapyremote openwebrx-perseus openwebrx-fcdpp openwebrx-radioberry openwebrx-full openwebrx" ALL_ARCHS="x86_64 armv7l aarch64" TAG=${TAG:-"latest"} ARCHTAG="$TAG-$ARCH" diff --git a/docker/scripts/install-dependencies-radioberry.sh b/docker/scripts/install-dependencies-radioberry.sh new file mode 100644 index 0000000..3ace195 --- /dev/null +++ b/docker/scripts/install-dependencies-radioberry.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -euxo pipefail +export MAKEFLAGS="-j4" + +function cmakebuild() { + cd $1 + if [[ ! -z "${2:-}" ]]; then + git checkout $2 + fi + mkdir build + cd build + cmake .. + make MAKEFLAGS + make install + cd ../.. + rm -rf $1 +} + +cd /tmp + +STATIC_PACKAGES="libusb-1.0-0 libfftw3-3 udev" +BUILD_PACKAGES="git cmake make patch wget sudo gcc g++ libusb-1.0-0-dev libfftw3-dev pkg-config" + +apt-get update +apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES + +cd Radioberry-2.x\SBC\rpi-4\ + +cmakebuild SoapyRadioberrySDR +cd ../../.. +rm -rf Radioberry-2.x + +SUDO_FORCE_REMOVE=yes apt-get -y purge --autoremove $BUILD_PACKAGES +apt-get clean +rm -rf /var/lib/apt/lists/*