From b380187453ca1289bc7786c2fc5844a2c42906cd Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 1 Dec 2020 21:39:22 +0100 Subject: [PATCH] add docker build for eb200 devices --- docker.sh | 2 +- docker/Dockerfiles/Dockerfile-eb200 | 12 +++++++ docker/scripts/install-connectors.sh | 4 +-- docker/scripts/install-dependencies-eb200.sh | 33 ++++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 docker/Dockerfiles/Dockerfile-eb200 create mode 100755 docker/scripts/install-dependencies-eb200.sh diff --git a/docker.sh b/docker.sh index eda1ad0b..1be30015 100755 --- a/docker.sh +++ b/docker.sh @@ -2,7 +2,7 @@ set -euo pipefail 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-radioberry openwebrx-uhd openwebrx-redpitaya openwebrx-rtltcp 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-uhd openwebrx-redpitaya openwebrx-rtltcp openwebrx-eb200 openwebrx-full openwebrx" ALL_ARCHS="x86_64 armv7l aarch64" TAG=${TAG:-"latest"} ARCHTAG="$TAG-$ARCH" diff --git a/docker/Dockerfiles/Dockerfile-eb200 b/docker/Dockerfiles/Dockerfile-eb200 new file mode 100644 index 00000000..f2f5181f --- /dev/null +++ b/docker/Dockerfiles/Dockerfile-eb200 @@ -0,0 +1,12 @@ +ARG ARCHTAG +FROM openwebrx-base:$ARCHTAG + +COPY docker/scripts/install-connectors.sh \ + docker/scripts/install-dependencies-eb200.sh / + +RUN /install-connectors.sh &&\ + rm /install-connectors.sh && \ + /install-dependencies-eb200.sh && \ + rm /install-dependencies-eb200.sh + +COPY . /opt/openwebrx diff --git a/docker/scripts/install-connectors.sh b/docker/scripts/install-connectors.sh index 9307fffa..be76988b 100755 --- a/docker/scripts/install-connectors.sh +++ b/docker/scripts/install-connectors.sh @@ -24,8 +24,8 @@ apt-get update apt-get -y install --no-install-recommends $BUILD_PACKAGES git clone https://github.com/jketterl/owrx_connector.git -# latest develop as of 2020-11-28 (c++ refactoring) -cmakebuild owrx_connector 8c7982f1f91bb38f359126725de64a5875221898 +# latest develop as of 2020-11-28 (int32 samples; debhelper) +cmakebuild owrx_connector 87a2fcc54e221aad71ec0700737ca7f385c388de apt-get -y purge --autoremove $BUILD_PACKAGES apt-get clean diff --git a/docker/scripts/install-dependencies-eb200.sh b/docker/scripts/install-dependencies-eb200.sh new file mode 100755 index 00000000..ce0aba16 --- /dev/null +++ b/docker/scripts/install-dependencies-eb200.sh @@ -0,0 +1,33 @@ +#!/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 + make install + cd ../.. + rm -rf $1 +} + +cd /tmp + +STATIC_PACKAGES="" +BUILD_PACKAGES="git cmake make gcc g++ pkg-config" + +apt-get update +apt-get -y install --no-install-recommends $STATIC_PACKAGES $BUILD_PACKAGES + +git clone https://github.com/jketterl/eb200_connector.git +# latest from develop as of 2020-12-01 +cmakebuild eb200_connector 9c8313770c1072df72d2fdb85307ca206c29c60a + +apt-get -y purge --autoremove $BUILD_PACKAGES +apt-get clean +rm -rf /var/lib/apt/lists/*