From 060b88ace6772ceb016a1ebe45d415f10c194c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C3=B6h?= Date: Thu, 23 Feb 2023 21:18:17 +0100 Subject: [PATCH] package/gr-osmosdr: add support for HACKRF receivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Böh Signed-off-by: Thomas Petazzoni --- package/gr-osmosdr/Config.in | 13 +++++++++++++ package/gr-osmosdr/gr-osmosdr.mk | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/package/gr-osmosdr/Config.in b/package/gr-osmosdr/Config.in index d83de75282..72d3c3f481 100644 --- a/package/gr-osmosdr/Config.in +++ b/package/gr-osmosdr/Config.in @@ -36,4 +36,17 @@ config BR2_PACKAGE_GR_OSMOSDR_RFSPACE help Enable RFSPACE Receivers support +config BR2_PACKAGE_GR_OSMOSDR_HACKRF + bool "Osmocom HACKRF support" + depends on !BR2_STATIC_LIBS # hackrf + depends on BR2_TOOLCHAIN_HAS_THREADS # hackrf + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # hackrf + select BR2_PACKAGE_HACKRF + help + Enable Osmocom HACKRF support + +comment "hackrf support needs a toolchain w/ threads, dynamic library, gcc >= 4.9" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + endif diff --git a/package/gr-osmosdr/gr-osmosdr.mk b/package/gr-osmosdr/gr-osmosdr.mk index 6011a67539..8491c005d8 100644 --- a/package/gr-osmosdr/gr-osmosdr.mk +++ b/package/gr-osmosdr/gr-osmosdr.mk @@ -54,4 +54,11 @@ else GR_OSMOSDR_CONF_OPTS += -DENABLE_RFSPACE=OFF endif +ifeq ($(BR2_PACKAGE_GR_OSMOSDR_HACKRF),y) +GR_OSMOSDR_CONF_OPTS += -DENABLE_HACKRF=ON +GR_OSMOSDR_DEPENDENCIES += hackrf +else +GR_OSMOSDR_CONF_OPTS += -DENABLE_HACKRF=OFF +endif + $(eval $(cmake-package))