Skip to contentSkip to conversation

sigrok fixes and pulseview package

PATCH Superseded Bartosz Golaszewski 3 participants 12 messages Feb 20, 2015 – Feb 23, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover sigrok fixes and pulseview package

This series fixes a couple of bugs which have been noticed on the sigrok mailing list, adds some needed infrastructure in order to be able to build pulseview (the graphical front-end for sigrok) and the pulseview package itself.

The first patch removes an unused flag from libsigrok.mk. The second modifies the help text for libserialport to indicate to users that it's a reusable library not tied to the sigrok project in any way. The third patch makes it possible to compile libsigrok without libserialport support. The fourth adds autoconf-archive host package needed to build libsigrok C++ bindings. The fifth updates the commit tag to checkout as several things have been merged since the previous version - BayLibre ACME driver has been merged and several bugs preventing buildroot from building pulseview have been fixed. The sixth patch adds the option of building libsigrokcxx. Finally the seventh patch adds the pulseview package.

Please note, that pulseview can be built using Qt4 as well - this option should be added in the future.

Bartosz Golaszewski (7):
libsigrok: remove --disable-udev from CONF_OPTS
libserialport: drop untrue statement from Config.in help
libsigrok: don't select libserialport in Config.in
autoconf-archive: new package
libsigrok: bump git commit tag
libsigrok: enable building C++ bindings
pulseview: new package

 package/Config.in                            |  1 +
 package/autoconf-archive/autoconf-archive.mk | 13 ++++++++++++
 package/libserialport/Config.in              |  7 ++++---
 package/libsigrok/Config.in                  | 16 +++++++++++++-
 package/libsigrok/libsigrok.mk               | 18 ++++++++++++++--
 package/pulseview/Config.in                  | 31 ++++++++++++++++++++++++++++
 package/pulseview/pulseview.mk               | 24 +++++++++++++++++++++
 package/sigrok-cli/Config.in                 |  1 -
 8 files changed, 104 insertions(+), 7 deletions(-)
 create mode 100644 package/autoconf-archive/autoconf-archive.mk
 create mode 100644 package/pulseview/Config.in
 create mode 100644 package/pulseview/pulseview.mk
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/7 libsigrok: remove --disable-udev from CONF_OPTS

This option is invalid and thus ignored by libsigrok configure.

---
 package/libsigrok/libsigrok.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libsigrok/libsigrok.mk +1 -1
index f91b8cb..109d4d3 100644
@@ -13,7 +13,7 @@ LIBSIGROK_LICENSE_FILES = COPYING
 LIBSIGROK_AUTORECONF = YES
 LIBSIGROK_INSTALL_STAGING = YES
 LIBSIGROK_DEPENDENCIES = libglib2 libzip host-pkgconf
-LIBSIGROK_CONF_OPTS = --disable-libudev --disable-bindings --disable-glibtest
+LIBSIGROK_CONF_OPTS = --disable-bindings --disable-glibtest
 
 define LIBSIGROK_ADD_MISSING
 	mkdir -p $(@D)/autostuff
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/7 libserialport: drop untrue statement from Config.in help

In reply to Bartosz Golaszewski

According to http://sigrok.org/wiki/Libserialport:

Note: While libserialport is hosted on sigrok.org (and sigrok uses libserialport), this is a completely independent library that can be used by other projects as well. The libserialport library does not depend on any sigrok related libraries or projects.

Drop the fragment about being a part of the sigrok suite and extend the help text.

---
 package/libserialport/Config.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
package/libserialport/Config.in +4 -3
index 1e2935f..d821830 100644
@@ -1,8 +1,9 @@
 config BR2_PACKAGE_LIBSERIALPORT
 	bool "libserialport"
 	help
-	  Serial port access library.
-
-	  This library is a part of the sigrok software suite.
+	  Libserialport is a minimal, cross-platform shared
+	  library written in C that is intended to take care
+	  of the OS-specific details when writing software
+	  that uses serial ports.
 
 	  http://sigrok.org/wiki/Libserialport
Signature · 1 line
2.1.4
#3 lore raw

PATCH 3/7 libsigrok: don't select libserialport in Config.in

In reply to Bartosz Golaszewski

Libsigrok can be built without libserialport. Don't select it in Config.in from both libsigrok and sigrok-cli and add a check to libsigrok.mk to determine whether libserialport should be enabled.

---
 package/libsigrok/Config.in    | 1 -
 package/libsigrok/libsigrok.mk | 7 +++++++
 package/sigrok-cli/Config.in   | 1 -
 3 files changed, 7 insertions(+), 2 deletions(-)
package/libsigrok/Config.in +0 -1
index 09077fb..47f812c 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_LIBSIGROK
 	bool "libsigrok"
-	select BR2_PACKAGE_LIBSERIALPORT
 	select BR2_PACKAGE_LIBZIP
 	select BR2_PACKAGE_LIBGLIB2
 	# libglib2
package/libsigrok/libsigrok.mk +7 -0
index 109d4d3..d19c3c8 100644
@@ -21,6 +21,13 @@ endef
 
 LIBSIGROK_PRE_CONFIGURE_HOOKS += LIBSIGROK_ADD_MISSING
 
+ifeq ($(BR2_PACKAGE_LIBSERIALPORT),y)
+LIBSIGROK_CONF_OPTS += --enable-libserialport
+LIBSIGROK_DEPENDENCIES += libserialport
+else
+LIBSIGROK_CONF_OPTS += --disable-libserialport
+endif
+
 ifeq ($(BR2_PACKAGE_LIBFTDI),y)
 LIBSIGROK_CONF_OPTS += --enable-libftdi
 LIBSIGROK_DEPENDENCIES += libftdi
package/sigrok-cli/Config.in +0 -1
index e3e5420..4e7f137 100644
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_SIGROK_CLI
 	bool "sigrok-cli"
-	select BR2_PACKAGE_LIBSERIALPORT
 	select BR2_PACKAGE_LIBSIGROK
 	# libsigrok->libglib2:
 	depends on BR2_USE_WCHAR
Signature · 1 line
2.1.4
#4 lore raw

PATCH 4/7 autoconf-archive: new package

In reply to Bartosz Golaszewski

This package contains a collection of freely re-usable autoconf macros.

---
 package/autoconf-archive/autoconf-archive.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/autoconf-archive/autoconf-archive.mk
package/autoconf-archive/autoconf-archive.mk new file +13 -0
new file mode 100644
index 0000000..e11df28
@@ -0,0 +1,13 @@
+################################################################################
+#
+# autoconf-archive
+#
+################################################################################
+
+AUTOCONF_ARCHIVE_VERSION = 2015.02.04
+AUTOCONF_ARCHIVE_SOURCE = autoconf-archive-$(AUTOCONF_ARCHIVE_VERSION).tar.xz
+AUTOCONF_ARCHIVE_SITE = http://gnu.cardse.net/autoconf-archive/
+AUTOCONF_ARCHIVE_LICENSE = GPLv3+
+AUTOCONF_ARCHIVE_LICENSE_FILES = COPYING
+
+$(eval $(host-autotools-package))
Signature · 1 line
2.1.4
#5 lore raw

PATCH 4/7 autoconf-archive: new package

Dear Bartosz Golaszewski,

package/autoconf-archive/autoconf-archive.mk line 9

Quoted 3 lines · Bartosz Golaszewski
package/autoconf-archive/autoconf-archive.mk new file +3 -0
+AUTOCONF_ARCHIVE_VERSION = 2015.02.04
+AUTOCONF_ARCHIVE_SOURCE = autoconf-archive-$(AUTOCONF_ARCHIVE_VERSION).tar.xz
+AUTOCONF_ARCHIVE_SITE = http://gnu.cardse.net/autoconf-archive/

Since this package is a GNU package, using $(BR2_GNU_MIRROR) was a better idea here. I've changed it.

package/autoconf-archive/autoconf-archive.mk line 11

Quoted 2 lines
package/autoconf-archive/autoconf-archive.mk new file +2 -0
+AUTOCONF_ARCHIVE_LICENSE = GPLv3+
+AUTOCONF_ARCHIVE_LICENSE_FILES = COPYING

The license is actually GPLv3+ with exceptions, and I've added COPYING.EXCEPTION to the LICENSE_FILES variable.

Also, could you send a follow-up patch adding a .hash file for this package?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 5/7 libsigrok: bump git commit tag

In reply to Bartosz Golaszewski
---
 package/libsigrok/libsigrok.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libsigrok/libsigrok.mk +1 -1
index d19c3c8..6bc210e 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBSIGROK_VERSION = 8656a71790133d4de42252a1e75b4209c03b4983
+LIBSIGROK_VERSION = 380ee96fdfe0895ca0aa0b158d5c332ef08f8b3c
 # No https access on upstream git
 LIBSIGROK_SITE = git://sigrok.org/libsigrok
 LIBSIGROK_LICENSE = GPLv3+
Signature · 1 line
2.1.4
#7 lore raw

PATCH 6/7 libsigrok: enable building C++ bindings

In reply to Bartosz Golaszewski
---
 package/libsigrok/Config.in    | 15 +++++++++++++++
 package/libsigrok/libsigrok.mk |  9 ++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)
package/libsigrok/Config.in +15 -0
index 47f812c..8f7e36f 100644
@@ -16,6 +16,21 @@ config BR2_PACKAGE_LIBSIGROK
 
 	  http://sigrok.org/wiki/Libsigrok
 
+config BR2_PACKAGE_LIBSIGROKCXX
+	bool "build C++ bindings"
+	select BR2_PACKAGE_GLIBMM
+	depends on BR2_PACKAGE_LIBSIGROK
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
+	# C++11 support
+	depends on BR2_TOOLCHAIN_BUILDROOT_GLIBC || BR2_TOOLCHAIN_BUILDROOT_EGLIBC
+	help
+	  Build libsigrok C++ bindings as well.
+
 comment "libsigrok needs a toolchain w/ wchar, threads"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "libsigrokcxx needs a toolchain w/ C++, (e)glibc"
+	depends on BR2_PACKAGE_LIBSIGROK
+	depends on !BR2_TOOLCHAIN_BUILDROOT_CXX
+	depends on !BR2_TOOLCHAIN_BUILDROOT_GLIBC && !BR2_TOOLCHAIN_BUILDROOT_EGLIBC
package/libsigrok/libsigrok.mk +8 -1
index 6bc210e..1e6080d 100644
@@ -13,7 +13,7 @@ LIBSIGROK_LICENSE_FILES = COPYING
 LIBSIGROK_AUTORECONF = YES
 LIBSIGROK_INSTALL_STAGING = YES
 LIBSIGROK_DEPENDENCIES = libglib2 libzip host-pkgconf
-LIBSIGROK_CONF_OPTS = --disable-bindings --disable-glibtest
+LIBSIGROK_CONF_OPTS = --disable-glibtest --disable-java --disable-python
 
 define LIBSIGROK_ADD_MISSING
 	mkdir -p $(@D)/autostuff
@@ -46,4 +46,11 @@ ifeq ($(BR2_PACKAGE_GLIBMM),y)
 LIBSIGROK_DEPENDENCIES += glibmm
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
+LIBSIGROK_CONF_OPTS += --enable-cxx
+LIBSIGROK_DEPENDENCIES += host-autoconf-archive glibmm
+else
+LIBSIGROK_CONF_OPTS += --disable-cxx
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.1.4
#8 lore raw

PATCH 6/7 libsigrok: enable building C++ bindings

Dear Bartosz Golaszewski,

package/libsigrok/Config.in config BR2_PACKAGE_LIBSIGROK · line 25

Quoted 7 lines · Bartosz Golaszewski
package/libsigrok/Config.in +7 -0
+config BR2_PACKAGE_LIBSIGROKCXX
+	bool "build C++ bindings"
+	select BR2_PACKAGE_GLIBMM
+	depends on BR2_PACKAGE_LIBSIGROK
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
+	# C++11 support
+	depends on BR2_TOOLCHAIN_BUILDROOT_GLIBC || BR2_TOOLCHAIN_BUILDROOT_EGLIBC

I am not really happy with this, because there are potentially plenty of external toolchains that support C++11. So I believe we really need to go ahead and add a:

	BR2_TOOLCHAIN_HAS_CXX11

And make sure it gets properly selected depending on whether the toolchain has C++11 support or not. You can look at how BR2_TOOLCHAIN_HAS_SSP or BR2_TOOLCHAIN_HAS_THREADS are implemented for example.

Moreover, you make this apparently depend on the selected C library. But isn't C++11 support purely a gcc problem ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH 6/7 libsigrok: enable building C++ bindings

Quoted 2 lines · Thomas Petazzoni

Moreover, you make this apparently depend on the selected C library. But isn't C++11 support purely a gcc problem ?

This software uses std::stod, which suffers from the same problem as std::to_string with uclibc : GCC currently requires a lot more than necessary to enable it.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393

So it's just a matter of updating buildroot's
850-libstdcxx-uclibc-c99.patch. Again.

#10 lore raw

PATCH 7/7 pulseview: new package

In reply to Bartosz Golaszewski
---
 package/Config.in              |  1 +
 package/pulseview/Config.in    | 31 +++++++++++++++++++++++++++++++
 package/pulseview/pulseview.mk | 24 ++++++++++++++++++++++++
 3 files changed, 56 insertions(+)
 create mode 100644 package/pulseview/Config.in
 create mode 100644 package/pulseview/pulseview.mk
package/Config.in +1 -0
index fe3d3d0..17b4e76 100644
@@ -360,6 +360,7 @@ endif
 	source "package/picocom/Config.in"
 	source "package/pifmrds/Config.in"
 	source "package/pps-tools/Config.in"
+	source "package/pulseview/Config.in"
 	source "package/read-edid/Config.in"
 	source "package/rng-tools/Config.in"
 	source "package/rpi-userland/Config.in"
package/pulseview/Config.in new file +31 -0
new file mode 100644
index 0000000..ccf3fd7
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_PULSEVIEW
+	bool "pulseview"
+	select BR2_PACKAGE_LIBSERIALPORT
+	select BR2_PACKAGE_LIBSIGROK
+	select BR2_PACKAGE_LIBSIGROKCXX
+	depends on BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_WIDGETS
+	select BR2_PACKAGE_QT5SVG
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_BOOST_THREAD
+	# libsigrok->libglib2:
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
+	# libsigrokcxx
+	depends on BR2_TOOLCHAIN_BUILDROOT_GLIBC || BR2_TOOLCHAIN_BUILDROOT_EGLIBC
+	help
+	  PulseView is a Qt based logic analyzer, oscilloscope
+	  and MSO GUI for sigrok.
+
+	  http://sigrok.org/wiki/PulseView
+
+comment "pulseview needs a toolchain w/ wchar, threads, C++, (e)glibc"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_PACKAGE_QT5
+	depends on !BR2_TOOLCHAIN_BUILDROOT_CXX
+	depends on !BR2_TOOLCHAIN_BUILDROOT_GLIBC && !BR2_TOOLCHAIN_BUILDROOT_EGLIBC
package/pulseview/pulseview.mk new file +24 -0
new file mode 100644
index 0000000..923459d
@@ -0,0 +1,24 @@
+################################################################################
+#
+# pulseview
+#
+################################################################################
+
+# TODO Pulseview can be built and linked against Qt4 as well.
+
+# No https access on upstream git
+PULSEVIEW_SITE = git://sigrok.org/pulseview
+PULSEVIEW_VERSION = 19be0af16af83ca10f7ce69cb64f0b0c6f6a0d81
+PULSEVIEW_LICENSE = GPLv3+
+PULSEVIEW_LICENSE_FILES = COPYING
+PULSEVIEW_DEPENDENCIES = libsigrok qt5base qt5svg boost
+PULSEVIEW_CONF_OPTS = -DDISABLE_WERROR=y
+
+ifeq ($(BR2_PACKAGE_LIBSIGROKDECODE),y)
+PULSEVIEW_CONF_OPTS += -DENABLE_DECODE=TRUE
+PULSEVIEW_DEPENDENCIES += libsigrokdecode
+else
+PULSEVIEW_CONF_OPTS += -DENABLE_DECODE=FALSE
+endif
+
+$(eval $(cmake-package))
Signature · 1 line
2.1.4
#11 lore raw

cover sigrok fixes and pulseview package

In reply to Bartosz Golaszewski

Dear Bartosz Golaszewski,

Quoted 6 lines · Bartosz Golaszewski

Bartosz Golaszewski (7):
libsigrok: remove --disable-udev from CONF_OPTS
libserialport: drop untrue statement from Config.in help
libsigrok: don't select libserialport in Config.in
autoconf-archive: new package
libsigrok: bump git commit tag

All these patches applied to next. On the autoconf-archive, I did a few changes, I'll indicate which ones as a comment to the patch itself.

Quoted 2 lines

libsigrok: enable building C++ bindings
pulseview: new package

For those ones, I have some issues/concerns.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com