Last active
August 15, 2018 05:43
-
-
Save sparklespdx/da169dc2614cf8d5f88751cabd9bc598 to your computer and use it in GitHub Desktop.
SoapyBladeRF Docker Test Cases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This dockerfile builds BladeRF, SoapySDR, and SoapyBladeRF. | |
# We are using the 2017.12-rc1 release because it's the version in the PPA. | |
# This is mainly to validate the build environment. | |
# This build passes. | |
# BladeRF2 board is not recognized by bladeRF-cli or Soapy. | |
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV LD_PRELOAD_DIR /usr/local/lib:/usr/local/lib64 | |
ENV PATH $PATH:/usr/local/bin:/usr/local/sbin | |
# Install Dependencies | |
RUN apt-get update | |
# BladeRF | |
# https://github.com/Nuand/bladeRF/wiki/Getting-Started:-Linux#Building_bladeRF_libraries_and_tools_from_source | |
RUN apt-get install -y libusb-1.0-0-dev libusb-1.0-0 \ | |
build-essential cmake libncurses5-dev libtecla1 \ | |
libtecla-dev pkg-config git wget | |
# Diagnostic tool | |
RUN apt-get install -y usbutils | |
# Soapy build dependencies | |
# https://github.com/pothosware/SoapySDR/wiki/BuildGuide#ubuntu | |
RUN apt-get install -y cmake g++ libpython-dev python-numpy \ | |
libpython3-dev swig python3-distutils | |
# Get software | |
WORKDIR /work | |
RUN git clone https://github.com/pothosware/SoapySDR.git | |
RUN git clone https://github.com/pothosware/SoapyBladeRF.git | |
RUN git clone https://github.com/Nuand/bladeRF.git | |
# Run builds | |
WORKDIR /work/bladeRF/build | |
# Known working build from bladerf-snapshots PPA | |
# 2017.12-rc1+1SNAPSHOT20180327222401-git23c6379~bionic | |
# https://launchpad.net/~bladerf/+archive/ubuntu/bladerf-snapshots | |
RUN git checkout 2017.12-rc1 | |
RUN cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr/local \ | |
-DINSTALL_UDEV_RULES=OFF \ | |
../ && \ | |
make && \ | |
make install && \ | |
ldconfig | |
# Install latest revision from master | |
WORKDIR /work/SoapySDR/build | |
RUN cmake ../ && make && make install && ldconfig | |
WORKDIR /work/SoapyBladeRF/build | |
RUN cmake ../ && make && make install && ldconfig | |
WORKDIR /work | |
CMD bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This dockerfile builds BladeRF, SoapySDR, and SoapyBladeRF. | |
# We are using the master branch from BladeRF. | |
# This demonstrates the issue building SoapyBladeRF against newer versions of libbladerf. | |
# This build fails. | |
# BladeRF2 board is recognized by bladeRF-cli. Soapy doesn't see it. | |
FROM ubuntu:18.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV LD_PRELOAD_DIR /usr/local/lib:/usr/local/lib64 | |
ENV PATH $PATH:/usr/local/bin:/usr/local/sbin | |
# Install Dependencies | |
RUN apt-get update | |
# BladeRF | |
# https://github.com/Nuand/bladeRF/wiki/Getting-Started:-Linux#Building_bladeRF_libraries_and_tools_from_source | |
RUN apt-get install -y libusb-1.0-0-dev libusb-1.0-0 \ | |
build-essential cmake libncurses5-dev libtecla1 \ | |
libtecla-dev pkg-config git wget | |
# Diagnostic tool | |
RUN apt-get install -y usbutils | |
# Soapy build dependencies | |
# https://github.com/pothosware/SoapySDR/wiki/BuildGuide#ubuntu | |
RUN apt-get install -y cmake g++ libpython-dev python-numpy \ | |
libpython3-dev swig python3-distutils | |
# Get software | |
WORKDIR /work | |
RUN git clone https://github.com/pothosware/SoapySDR.git | |
RUN git clone https://github.com/pothosware/SoapyBladeRF.git | |
RUN git clone https://github.com/Nuand/bladeRF.git | |
# Run builds | |
WORKDIR /work/bladeRF/build | |
# Build from current master branch | |
RUN cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=/usr/local \ | |
-DINSTALL_UDEV_RULES=OFF \ | |
../ && \ | |
make && \ | |
make install && \ | |
ldconfig | |
# Install latest revision from master | |
WORKDIR /work/SoapySDR/build | |
RUN cmake ../ && make && make install && ldconfig | |
WORKDIR /work/SoapyBladeRF/build | |
RUN cmake ../ && make && make install && ldconfig | |
WORKDIR /work | |
CMD bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment