Skip to content

Commit

Permalink
Added SDRplay support.
Browse files Browse the repository at this point in the history
  • Loading branch information
shajen committed Nov 5, 2023
1 parent d08d5ab commit 5432b24
Show file tree
Hide file tree
Showing 5 changed files with 4,717 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y curl git zip build-essential cmake ccache tzdata libspdlog-dev libliquid-dev nlohmann-json3-dev libmosquitto-dev libgtest-dev libgmock-dev libusb-1.0-0-dev libfftw3-dev libboost-all-dev libsoapysdr-dev

WORKDIR /sdrplay_api
COPY sdrplay/*.run .
RUN chmod +x ./SDRplay_RSP_API-`arch`-3.07.run && \
./SDRplay_RSP_API-`arch`-3.07.run --tar xvf && \
cp -rf inc/sdrplay_api*h /usr/local/include/ && \
cp -rf `arch`/sdrplay_apiService /usr/local/bin && \
cp -rf `arch`/libsdrplay_api.so* /usr/local/lib/ && \
ln -s /usr/local/lib/libsdrplay_api.so.3.07 /usr/local/lib/libsdrplay_api.so && \
chmod 644 /usr/local/include/* && \
chmod 644 /usr/local/lib/libsdrplay_api.so* && \
ldconfig

WORKDIR /soapy_sdrplay
RUN git clone --branch soapy-sdrplay3-0.4.2 https://github.com/pothosware/SoapySDRPlay3.git /soapy_sdrplay && \
cmake -B build -DCMAKE_BUILD_TYPE=Release . && \
cmake --build build -j$(nproc) && \
cmake --install build

WORKDIR /root/auto-sdr/
COPY . .
RUN cmake -B /root/auto-sdr/build -DCMAKE_BUILD_TYPE=Release /root/auto-sdr && \
Expand All @@ -26,6 +44,10 @@ CMD /usr/bin/auto_sdr_test

FROM run
COPY ./config.json /config/config.json
COPY --from=build /usr/local/lib/libsdrplay_api.so* /usr/local/lib/
COPY --from=build /usr/local/bin/sdrplay_apiService /usr/local/bin/
COPY --from=build /usr/local/lib/SoapySDR/modules0.8/libsdrPlaySupport.so /usr/local/lib/SoapySDR/modules0.8/
COPY --from=build /root/auto-sdr/build/auto_sdr /usr/bin/auto_sdr
RUN ldconfig
COPY entrypoint/run.sh /entrypoint/run.sh
CMD ["/entrypoint/run.sh"]
3 changes: 2 additions & 1 deletion entrypoint/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh

/usr/bin/auto_sdr /config/config.json
sdrplay_apiService &
/usr/bin/auto_sdr /config/config.json
Loading

0 comments on commit 5432b24

Please sign in to comment.