Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/signal-estimator: add new package
@ 2022-03-17 17:03 Théo Lebrun via buildroot
  2022-08-02 20:30 ` Giulio Benetti
  2022-08-22  8:24 ` Yann E. MORIN
  0 siblings, 2 replies; 4+ messages in thread
From: Théo Lebrun via buildroot @ 2022-03-17 17:03 UTC (permalink / raw)
  To: buildroot; +Cc: Samuel Martin, Théo Lebrun

Measure characteristics of a looped back signal.
https://github.com/gavv/signal-estimator

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 package/Config.in                             |  1 +
 .../0001-fix-nanosecond-type-size.patch       | 33 +++++++++++++++++++
 package/signal-estimator/Config.in            | 14 ++++++++
 .../signal-estimator/signal-estimator.hash    |  3 ++
 package/signal-estimator/signal-estimator.mk  | 19 +++++++++++
 5 files changed, 70 insertions(+)
 create mode 100644 package/signal-estimator/0001-fix-nanosecond-type-size.patch
 create mode 100644 package/signal-estimator/Config.in
 create mode 100644 package/signal-estimator/signal-estimator.hash
 create mode 100644 package/signal-estimator/signal-estimator.mk

diff --git a/package/Config.in b/package/Config.in
index 7ed075ae19..971b238831 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -139,6 +139,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/rt-tests/Config.in"
 	source "package/rwmem/Config.in"
 	source "package/sentry-native/Config.in"
+	source "package/signal-estimator/Config.in"
 	source "package/spidev_test/Config.in"
 	source "package/strace/Config.in"
 	source "package/stress/Config.in"
diff --git a/package/signal-estimator/0001-fix-nanosecond-type-size.patch b/package/signal-estimator/0001-fix-nanosecond-type-size.patch
new file mode 100644
index 0000000000..6807fc296b
--- /dev/null
+++ b/package/signal-estimator/0001-fix-nanosecond-type-size.patch
@@ -0,0 +1,33 @@
+From be8443db76c691eb1a8ee07760a801a530752d0a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Th=C3=A9o=20Lebrun?= <theo.lebrun@bootlin.com>
+Date: Thu, 17 Mar 2022 11:42:24 +0100
+Subject: [PATCH] fix nanosecond type size
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The previous type was long, it got replaced by long long to ensure being
+capable of storing big enough durations/times. 2**31-1 could only
+represent about ~2.15s which was conflicting with the minute constant.
+
+Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
+---
+ src/cli/Time.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cli/Time.hpp b/src/cli/Time.hpp
+index befd521..638413e 100644
+--- a/src/cli/Time.hpp
++++ b/src/cli/Time.hpp
+@@ -8,7 +8,7 @@
+ namespace signal_estimator {
+ 
+ //! Nanoseconds type.
+-using nanoseconds_t = long;
++using nanoseconds_t = long long;
+ 
+ //! One nanosecond represented in nanoseconds.
+ inline constexpr nanoseconds_t Nanosecond = 1;
+-- 
+2.35.1
+
diff --git a/package/signal-estimator/Config.in b/package/signal-estimator/Config.in
new file mode 100644
index 0000000000..9a40b66612
--- /dev/null
+++ b/package/signal-estimator/Config.in
@@ -0,0 +1,14 @@
+comment "signal-estimator needs a toochain w/ C++, threads, gcc >= 7"
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+			!BR2_TOOLCHAIN_GCC_AT_LEAST_7
+
+config BR2_PACKAGE_SIGNAL_ESTIMATOR
+	bool "signal-estimator"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
+	select BR2_PACKAGE_ALSA_LIB
+	help
+	  Measure characteristics of a looped back signal.
+
+	  https://github.com/gavv/signal-estimator
diff --git a/package/signal-estimator/signal-estimator.hash b/package/signal-estimator/signal-estimator.hash
new file mode 100644
index 0000000000..444f73099e
--- /dev/null
+++ b/package/signal-estimator/signal-estimator.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  bead8b5eac5a7d4172a9272cc0b618252a747685ee6de2349cb2c235c18627f7  signal-estimator-v0.0.3-br1.tar.gz
+sha256  825f572a6a7ca7389e5bddbebe45c839e23a6cf0b63fab6c9e0c6ed018056204  LICENSE
diff --git a/package/signal-estimator/signal-estimator.mk b/package/signal-estimator/signal-estimator.mk
new file mode 100644
index 0000000000..24120b36da
--- /dev/null
+++ b/package/signal-estimator/signal-estimator.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# signal-estimator
+#
+################################################################################
+
+SIGNAL_ESTIMATOR_VERSION = v0.0.3
+# Using Git as the package depends on a submodule (an old version of cxxopt).
+SIGNAL_ESTIMATOR_SITE_METHOD = git
+SIGNAL_ESTIMATOR_SITE = https://github.com/gavv/signal-estimator
+SIGNAL_ESTIMATOR_GIT_SUBMODULES = YES
+SIGNAL_ESTIMATOR_LICENSE = MIT
+SIGNAL_ESTIMATOR_LICENSE_FILES = LICENSE
+
+SIGNAL_ESTIMATOR_DEPENDENCIES = alsa-lib
+
+SIGNAL_ESTIMATOR_CONF_OPTS += -DBUILD_GUI=OFF
+
+$(eval $(cmake-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-22  8:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17 17:03 [Buildroot] [PATCH] package/signal-estimator: add new package Théo Lebrun via buildroot
2022-08-02 20:30 ` Giulio Benetti
2022-08-22  8:26   ` Yann E. MORIN
2022-08-22  8:24 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox