add hackrf support

This commit is contained in:
Jakob Ketterl 2019-01-24 17:24:15 +01:00
parent 7bec9eaa87
commit 6294797466
4 changed files with 40 additions and 1 deletions

View File

@ -17,3 +17,4 @@ docker build --build-arg BASE_IMAGE=$BASE_IMAGE -t openwebrx-base:$ARCH -f docke
docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-rtlsdr:$ARCH -t jketterl/openwebrx:$ARCH -f docker/Dockerfiles/Dockerfile-rtlsdr .
docker build --build-arg ARCH=$ARCH -t openwebrx-soapysdr-base:$ARCH -f docker/Dockerfiles/Dockerfile-soapysdr .
docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-sdrplay:$ARCH -f docker/Dockerfiles/Dockerfile-sdrplay .
docker build --build-arg ARCH=$ARCH -t jketterl/openwebrx-hackrf:$ARCH -f docker/Dockerfiles/Dockerfile-hackrf .

View File

@ -0,0 +1,6 @@
ARG ARCH
FROM openwebrx-soapysdr-base:$ARCH
ADD docker/scripts/install-dependencies-hackrf.sh /
RUN /install-dependencies-hackrf.sh

View File

@ -0,0 +1,32 @@
#!/bin/bash
set -euxo pipefail
function cmakebuild() {
cd $1
mkdir build
cd build
cmake ..
make
make install
cd ../..
rm -rf $1
}
cd /tmp
STATIC_PACKAGES="libusb fftw"
BUILD_PACKAGES="git cmake make patch wget sudo udev gcc g++ libusb-dev fftw-dev"
apk add --no-cache $STATIC_PACKAGES
apk add --no-cache --virtual .build-deps $BUILD_PACKAGES
git clone https://github.com/mossmann/hackrf.git
cd hackrf
cmakebuild host
cd ..
rm -rf hackrf
git clone https://github.com/pothosware/SoapyHackRF.git
cmakebuild SoapyHackRF
apk del .build-deps

View File

@ -3,6 +3,6 @@ set -euxo pipefail
ARCH=$(uname -m)
for image in openwebrx openwebrx-rtlsdr openwebrx-sdrplay; do
for image in openwebrx openwebrx-rtlsdr openwebrx-sdrplay openwebrx-hackrf; do
docker push jketterl/$image:$ARCH
done