Skip to contentSkip to conversation

bluez5_utils: version bump fixes and updates

PATCH New Baruch Siach 4 participants 12 messages May 1, 2017 – May 5, 2017

lore
Share & tools
lore
#0 lore raw

cover bluez5_utils: version bump fixes and updates

The recent bluez5_utils version bump moved around the build options so that some builds now fail, and the help text became incorrect. This short series fixes some of these issues.

This series is mostly based on Andy Shevchenko's patch[1] with the following main changes:

* Split out the DEPRECATED handling, adding a fix to the gatttool build issue in the process

* Remove the redundant BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL config option

* Split the option addition patch into two: one for options that were previously under --enable-experimental, and one for the newly introduced midi profile

* Add missing BR2_PACKAGE_ALSA_LIB_SEQ select

[1] https://patchwork.ozlabs.org/patch/741645/

Andy Shevchenko (2):
bluez5_utils: allow enabling formerly experimental plugins
bluez5_utils: allow building the midi profile

Baruch Siach (2):
bluez5_utils: allow install of deprecated tools
bluez5_utils: correct the experimental option text

 Config.in.legacy                     |  9 +++++++++
 package/bluez5_utils/Config.in       | 39 +++++++++++++++++++++++++++---------
 package/bluez5_utils/bluez5_utils.mk | 34 ++++++++++++++++++++++++++++++-
 3 files changed, 71 insertions(+), 11 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/4 bluez5_utils: allow install of deprecated tools

Since BlueZ 5.44 many command line tools are deprecated, among them gatttool. Add an option to install these tools.

Remove the gatttool specific option, since it is redundant now.

Fixes:
http://autobuild.buildroot.net/results/ddb/ddb975c9e1475fee1da63cb21240d8d59b161076/
http://autobuild.buildroot.net/results/19a/19adc0aa5a7e48119ef4ba25ba0403867f74f678/
http://autobuild.buildroot.net/results/9bd/9bd8e13ddffdd0631ddca30ec40cc4664729b0cb/

Cc Marcin Bis <[email protected]>
Cc Bernd Kuhls <[email protected]>
---
 Config.in.legacy                     |  9 +++++++++
 package/bluez5_utils/Config.in       | 13 +++++--------
 package/bluez5_utils/bluez5_utils.mk |  5 ++++-
 3 files changed, 18 insertions(+), 9 deletions(-)
Config.in.legacy +9 -0
index 98b9eeb84fc2..bc14bf2a61da 100644
@@ -145,6 +145,15 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2017.05"
 
+config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
+	bool "bluez5_utils gatttool install option removed"
+	select BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
+	help
+	  The option to install gatttool specifically has been removed.
+	  Since version 5.44 gatttool is in the list of deprecated
+	  tools. The option to build and install deprecated tools has
+	  been automatically enabled.
+
 config BR2_PACKAGE_OPENOCD_FT2XXX
 	bool "openocd ft2232 support has been removed"
 	select BR2_PACKAGE_OPENOCD_FTDI
package/bluez5_utils/Config.in +5 -8
index 3611c6971a6d..285560aee9be 100644
@@ -48,16 +48,13 @@ config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
 comment "bluez5-utils client needs a glibc or musl toolchain"
 	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
-config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
-	bool "install GATT tool"
+config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
+	bool "install deprecated tool"
 	depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
 	help
-	  Generic Attribute Profile (GATT) support. This provides
-	  profile discovery and description services for Bluetooth Low
-	  Energy. This will install the gatttool utility.
-
-	  It is always built with BlueZ 5.x, but upstream choose not
-	  to install it by default.
+	  Build BlueZ 5.x deprecated tools. These currently include:
+	  hciattach, hciconfig, hcitool, hcidump, rfcomm, sdptool,
+	  ciptool, gatttool.
 
 config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL
 	bool "build experimental plugins"
package/bluez5_utils/bluez5_utils.mk +4 -1
index aaefcb6ace9b..fac79580024f 100644
@@ -46,11 +46,14 @@ BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
 endif
 
 # install gatttool (For some reason upstream choose not to do it by default)
-ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y)
+ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
 define BLUEZ5_UTILS_INSTALL_GATTTOOL
 	$(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
 endef
 BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
+BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
 endif
 
 # enable test
Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/4 bluez5_utils: allow install of deprecated tools

Hello,

package/bluez5_utils/bluez5_utils.mk BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis · line 54

Quoted 7 lines · Baruch Siach
package/bluez5_utils/bluez5_utils.mk +2 -1
-ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y)
+ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
 define BLUEZ5_UTILS_INSTALL_GATTTOOL
 	$(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
 endef
 BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
+BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated

So the --enable-deprecated option only enables the build of gatttool ?

Thomas

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

PATCH 1/4 bluez5_utils: allow install of deprecated tools

Hi Thomas,

Quoted 11 lines · Thomas Petazzoni

package/bluez5_utils/bluez5_utils.mk BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis · line 54

Quoted 7 lines · Baruch Siach
package/bluez5_utils/bluez5_utils.mk +2 -1
-ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y)
+ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
 define BLUEZ5_UTILS_INSTALL_GATTTOOL
 	$(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool
 endef
 BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL
+BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated

So the --enable-deprecated option only enables the build of gatttool ?

No. It enables all deprecated tools. But for all other tools bluez does the installation as well. Only gatttool needs manual installation like before.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#4 lore raw

PATCH 1/4 bluez5_utils: allow install of deprecated tools

In reply to Baruch Siach
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

Since BlueZ 5.44 many command line tools are deprecated, among them gatttool. Add an option to install these tools.

Remove the gatttool specific option, since it is redundant now.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/ddb/ddb975c9e1475fee1da63cb21240d8d59b161076/
http://autobuild.buildroot.net/results/19a/19adc0aa5a7e48119ef4ba25ba0403867f74f678/
http://autobuild.buildroot.net/results/9bd/9bd8e13ddffdd0631ddca30ec40cc4664729b0cb/

Cc Marcin Bis <[email protected]>
Cc Bernd Kuhls <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 2/4 bluez5_utils: correct the experimental option text

In reply to Baruch Siach

In BlueZ 5.44 the --enable-experimental configure option only controls the build of the Nokia OBEX PC Suite plugin. Correct the option prompt and help text.

Cc Marcin Bis <[email protected]>
Cc Andy Shevchenko <[email protected]>
---
 package/bluez5_utils/Config.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/bluez5_utils/Config.in +2 -2
index 285560aee9be..f8e3540ec5e9 100644
@@ -57,9 +57,9 @@ config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
 	  ciptool, gatttool.
 
 config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL
-	bool "build experimental plugins"
+	bool "build experimental obexd plugin"
 	help
-	  Build BlueZ 5.x experimental plugins (SAP, NFC, ...).
+	  Build BlueZ 5.x experimental Nokia OBEX PC Suite plugin
 
 config BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS
 	bool "build sixaxis plugin"
Signature · 1 line
2.11.0
#6 lore raw

PATCH 2/4 bluez5_utils: correct the experimental option text

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

In BlueZ 5.44 the --enable-experimental configure option only controls the build of the Nokia OBEX PC Suite plugin. Correct the option prompt and help text.

Cc Marcin Bis <[email protected]>
Cc Andy Shevchenko <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 3/4 bluez5_utils: allow enabling formerly experimental plugins

In reply to Baruch Siach

From: Andy Shevchenko <[email protected]>

Disregard to increase just minor version BlueZ 5.44 is drastically different in a way what plugins that used to be enabled by the --enable-experimental configure option, now have their own option.

Extend Buildroot package to cover these plugins.

---
 package/bluez5_utils/Config.in       | 15 +++++++++++++++
 package/bluez5_utils/bluez5_utils.mk | 21 +++++++++++++++++++++
 2 files changed, 36 insertions(+)
package/bluez5_utils/Config.in +15 -0
index f8e3540ec5e9..181003b42c9b 100644
@@ -61,6 +61,21 @@ config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL
 	help
 	  Build BlueZ 5.x experimental Nokia OBEX PC Suite plugin
 
+config BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH
+	bool "build health plugin"
+	help
+	  Build BlueZ 5.x health plugin
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_NFC
+	bool "build nfc plugin"
+	help
+	  Build BlueZ 5.x nfc plugin
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_SAP
+	bool "build sap plugin"
+	help
+	  Build BlueZ 5.x sap plugin
+
 config BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS
 	bool "build sixaxis plugin"
 	depends on BR2_PACKAGE_HAS_UDEV
package/bluez5_utils/bluez5_utils.mk +21 -0
index fac79580024f..431783997d7f 100644
@@ -38,6 +38,27 @@ else
 BLUEZ5_UTILS_CONF_OPTS += --disable-experimental
 endif
 
+# enable health plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-health
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-health
+endif
+
+# enable nfc plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_NFC),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-nfc
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-nfc
+endif
+
+# enable sap plugin
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SAP),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-sap
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-sap
+endif
+
 # enable sixaxis plugin
 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS),y)
 BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis
Signature · 1 line
2.11.0
#8 lore raw

PATCH 3/4 bluez5_utils: allow enabling formerly experimental plugins

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

From: Andy Shevchenko <[email protected]> Disregard to increase just minor version BlueZ 5.44 is drastically different in a way what plugins that used to be enabled by the --enable-experimental configure option, now have their own option.

Extend Buildroot package to cover these plugins.

Cc Marcin Bis <[email protected]>
Cc Bernd Kuhls <[email protected]>

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 4/4 bluez5_utils: allow building the midi profile

In reply to Baruch Siach

From: Andy Shevchenko <[email protected]>

The midi profile was introduced in BlueZ 5.44.

---
 package/bluez5_utils/Config.in       | 7 +++++++
 package/bluez5_utils/bluez5_utils.mk | 8 ++++++++
 2 files changed, 15 insertions(+)
package/bluez5_utils/Config.in +7 -0
index 181003b42c9b..bdb6682c1645 100644
@@ -66,6 +66,13 @@ config BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH
 	help
 	  Build BlueZ 5.x health plugin
 
+config BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI
+	bool "build midi profile"
+	select BR2_PACKAGE_ALSA_LIB
+	select BR2_PACKAGE_ALSA_LIB_SEQ
+	help
+	  Build BlueZ 5.x midi plugin
+
 config BR2_PACKAGE_BLUEZ5_PLUGINS_NFC
 	bool "build nfc plugin"
 	help
package/bluez5_utils/bluez5_utils.mk +8 -0
index 431783997d7f..4a0323488113 100644
@@ -45,6 +45,14 @@ else
 BLUEZ5_UTILS_CONF_OPTS += --disable-health
 endif
 
+# enable midi profile
+ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-midi
+BLUEZ5_UTILS_DEPENDENCIES += alsa-lib
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-midi
+endif
+
 # enable nfc plugin
 ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_NFC),y)
 BLUEZ5_UTILS_CONF_OPTS += --enable-nfc
Signature · 1 line
2.11.0
#10 lore raw

PATCH 4/4 bluez5_utils: allow building the midi profile

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

From: Andy Shevchenko <[email protected]> The midi profile was introduced in BlueZ 5.44.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

cover bluez5_utils: version bump fixes and updates

In reply to Baruch Siach
Quoted 6 lines · Baruch Siach

The recent bluez5_utils version bump moved around the build options so that?
some builds now fail, and the help text became incorrect. This short series?
fixes some of these issues.

Thanks for taking care of this, I appreciate.
I have no time to keep on it right now, so, feel free modify as it satisfies Thomas and others.

On first glance what you did looks sane to me.

Quoted 36 lines

This series is mostly based on Andy Shevchenko's patch[1] with the following?
main changes:

? * Split out the DEPRECATED handling, adding a fix to the gatttool build?
????issue in the process

? * Remove the redundant BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL config option

? * Split the option addition patch into two: one for options that were?
????previously under --enable-experimental, and one for the newly introduced?
????midi profile

? * Add missing BR2_PACKAGE_ALSA_LIB_SEQ select

[1] https://patchwork.ozlabs.org/patch/741645/

Andy Shevchenko (2):
? bluez5_utils: allow enabling formerly experimental plugins ? bluez5_utils: allow building the midi profile

Baruch Siach (2):
? bluez5_utils: allow install of deprecated tools ? bluez5_utils: correct the experimental option text

?Config.in.legacy?????????????????????|??9 +++++++++ ?package/bluez5_utils/Config.in???????| 39
+++++++++++++++++++++++++++---------
?package/bluez5_utils/bluez5_utils.mk | 34
++++++++++++++++++++++++++++++-
?3 files changed, 71 insertions(+), 11 deletions(-)

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy