Skip to contentSkip to conversation

package/gr-osmosdr: add support for HACKRF receivers

PATCH Applied Martin Böh via buildroot 1 participant 3 messages Feb 23, 2023 – Aug 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gr-osmosdr: add support for HACKRF receivers

---
 package/gr-osmosdr/Config.in     | 6 ++++++
 package/gr-osmosdr/gr-osmosdr.mk | 7 +++++++
 2 files changed, 13 insertions(+)
package/gr-osmosdr/Config.in +6 -0
index 04fa10be80..05b5c46a63 100644
@@ -43,4 +43,10 @@ config BR2_PACKAGE_GR_OSMOSDR_RFSPACE
 	help
 	  Enable RFSPACE Receivers support
 
+config BR2_PACKAGE_GR_OSMOSDR_HACKRF
+	bool "Osmocom HACKRF support"
+	depends on BR2_PACKAGE_HACKRF
+	help
+	  Enable Osmocom HACKRF support
+
 endif
package/gr-osmosdr/gr-osmosdr.mk +7 -0
index b96a32a221..78c7fa30da 100644
@@ -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))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Martin,

package/gr-osmosdr/Config.in config BR2_PACKAGE_GR_OSMOSDR_RFSPACE · line 48

Quoted 3 lines · On Thu, 23 Feb 2023 21:18:17 +0100 Martin Böh via buildroot…
package/gr-osmosdr/Config.in +3 -0
+config BR2_PACKAGE_GR_OSMOSDR_HACKRF
+	bool "Osmocom HACKRF support"
+	depends on BR2_PACKAGE_HACKRF

We would normally use a select BR2_PACKAGE_HACKRF here, which means you have to replicate the depends on from hackrf:

depends on !BR2_STATIC_LIBS # hackrf depends on BR2_TOOLCHAIN_HAS_THREADS # hackrf depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # hackrf

and the corresponding Config.in comment:

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

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Martin Böh via buildroot

Hello Martin,

Quoted 5 lines · On Thu, 23 Feb 2023 21:18:17 +0100 Martin Böh via buildroot…
---
 package/gr-osmosdr/Config.in     | 6 ++++++
 package/gr-osmosdr/gr-osmosdr.mk | 7 +++++++
 2 files changed, 13 insertions(+)

Applied to next after changing the "depends on" to a "select" like I suggested in my review back in February.

Best regards,

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot