Skip to contentSkip to conversation

package/bluez5_utils: Allow user to enable disabled plugins

PATCH Superseded Andy Shevchenko 5 participants 15 messages Mar 21, 2017 – Apr 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/bluez5_utils: Allow user to enable disabled plugins

Disregard to increase just minor version BlueZ 5.44 is drastically different in a way what tools and plugins are enabled and installed by default.

Extend Buildroot package to cover these changes.

---
 package/bluez5_utils/Config.in       | 28 +++++++++++++++++++++++++++-
 package/bluez5_utils/bluez5_utils.mk | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)
package/bluez5_utils/Config.in +27 -1
index a7c0ee4ba..e99f0f69f 100644
@@ -48,6 +48,11 @@ 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_DEPRECATED
+	bool "build deprecated tools"
+	help
+	  Build BlueZ 5.x deprecated tools (hciattach, gatttool, ...).
+
 config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
 	bool "install GATT tool"
 	depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
@@ -62,7 +67,28 @@ config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
 config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL
 	bool "build experimental plugins"
 	help
-	  Build BlueZ 5.x experimental plugins (SAP, NFC, ...).
+	  Build BlueZ 5.x experimental plugins (PCSuite, ...).
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_HEALTH
+	bool "build health plugin"
+	help
+	  Build BlueZ 5.x health plugin
+
+config BR2_PACKAGE_BLUEZ5_PLUGINS_MIDI
+	bool "build midi plugin"
+	select BR2_PACKAGE_ALSA_LIB
+	help
+	  Build BlueZ 5.x midi 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"
package/bluez5_utils/bluez5_utils.mk +36 -0
index 4d31a187b..4eae3d01d 100644
@@ -38,6 +38,35 @@ 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 midi plugin
+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
+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
@@ -45,6 +74,13 @@ else
 BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis
 endif
 
+# build deprecated tools
+ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED),y)
+BLUEZ5_UTILS_CONF_OPTS += --enable-deprecated
+else
+BLUEZ5_UTILS_CONF_OPTS += --disable-deprecated
+endif
+
 # install gatttool (For some reason upstream choose not to do it by default)
 ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y)
 define BLUEZ5_UTILS_INSTALL_GATTTOOL
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to the development of BlueZ user space support that commit basically makes the bluez5_utils package somewhat piece of junk. Since bluez5_utils 5.44 deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

Cc Thomas Petazzoni <[email protected]>
---
 package/uclibc/uClibc-ng.config | 1 +
 1 file changed, 1 insertion(+)
package/uclibc/uClibc-ng.config +1 -0
index 528bce965..91082975e 100644
@@ -32,6 +32,7 @@ UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 UCLIBC_HAS_PRINTF_M_SPEC=y
 # UCLIBC_HAS_REGEX_OLD is not set
 # UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GNU_GLOB=y
Signature · 1 line
2.11.0
#2 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

Hello,

Quoted 4 lines · Andy Shevchenko

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to the development of BlueZ user space support that commit basically makes the bluez5_utils package somewhat piece of junk.

Not sure I understand what you mean here.

Quoted 3 lines

Since bluez5_utils 5.44
deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

Same here, I don't understand.

package/uclibc/uClibc-ng.config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y · line 38

Quoted 12 lines
package/uclibc/uClibc-ng.config +1 -0
index 528bce965..91082975e 100644
@@ -32,6 +32,7 @@ UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 UCLIBC_HAS_PRINTF_M_SPEC=y
 # UCLIBC_HAS_REGEX_OLD is not set
 # UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GNU_GLOB=y

Could you comment on the size impact of enabling this option? I.e the size of uClibc without/with this option enabled, for example on ARM?

Thanks!

Thomas

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

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

Quoted 4 lines · Thomas Petazzoni

Hello,

On Tue, 21 Mar 2017 18:02:36 +0200, Andy Shevchenko wrote:

Quoted 8 lines
Quoted 6 lines

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to
the development of BlueZ user space support that commit basically makes
the bluez5_utils package somewhat piece of junk.

Not sure I understand what you mean here.

Without new tools like bluetoothctl it's impossible to use Bluetooth modules, such as BCM43341 based.

hcitool, hciattach, hciconfig, etc (see the list under DEPRECATED in Makefile.tools in bluez5_utils sources) does *not* work with it.

Quoted 5 lines
Quoted 3 lines

Since bluez5_utils 5.44
deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

Same here, I don't understand.

See above.

Quoted 16 lines
Quoted 7 lines
package/uclibc/uClibc-ng.config +0 -0
index 528bce965..91082975e 100644
@@ -32,6 +32,7 @@ UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
Quoted 7 lines

?UCLIBC_HAS_PRINTF_M_SPEC=y
?# UCLIBC_HAS_REGEX_OLD is not set
?# UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
?UCLIBC_HAS_NFTW=y
?UCLIBC_HAS_FTW=y
?UCLIBC_HAS_GNU_GLOB=y

Could you comment on the size impact of enabling this option?

I can do it (on x86).

Quoted 2 lines

I.e the
size of uClibc without/with this option enabled, for example on ARM?

No, I have no ARM board to test this. Or you mean to built entire stack what I'm using for some arbitrary ARM board?

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#4 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

Hello,

Quoted 5 lines · Andy Shevchenko
Quoted 2 lines

I.e the
size of uClibc without/with this option enabled, for example on ARM?

No, I have no ARM board to test this. Or you mean to built entire stack what I'm using for some arbitrary ARM board?

You don't need a ARM board. Just make a Buildroot build for ARM with uClibc (wordexp disabled), look at the uClibc size, and then the same build but this time with your patch applied (which enables wordexp).

Best regards,

Thomas

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

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · Andy Shevchenko
Quoted 3 lines

?I.e the
size of uClibc without/with this option enabled, for example on ARM???

Quoted 7 lines
Quoted 3 lines

No, I have no ARM board to test this. Or you mean to built entire stack
what I'm using for some arbitrary ARM board?

You don't need a ARM board. Just make a Buildroot build for ARM with uClibc (wordexp disabled), look at the uClibc size, and then the same build but this time with your patch applied (which enables wordexp).

Got it.
Will do when will have time later this week.

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy
#6 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

In reply to Andy Shevchenko

Hi Andy,

Quoted 9 lines · Andy Shevchenko
Quoted 8 lines · Thomas Petazzoni
Quoted 6 lines · Andy Shevchenko

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to
the development of BlueZ user space support that commit basically makes
the bluez5_utils package somewhat piece of junk.

Quoted 4 lines
Quoted 1 line

Not sure I understand what you mean here.

Without new tools like bluetoothctl it's impossible to use Bluetooth modules, such as BCM43341 based.

This is a UART attached device, isn't it?

Quoted 2 lines

hcitool, hciattach, hciconfig, etc (see the list under DEPRECATED in Makefile.tools in bluez5_utils sources) does *not* work with it.

How do you bind the driver to the UART device without hciattach?

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 -
#7 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

In reply to Thomas Petazzoni

Hi,
Thomas Petazzoni wrote,

Quoted 17 lines

Hello,

Quoted 4 lines · Andy Shevchenko

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to the development of BlueZ user space support that commit basically makes the bluez5_utils package somewhat piece of junk.

Not sure I understand what you mean here.

Quoted 3 lines

Since bluez5_utils 5.44
deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

Same here, I don't understand.

Quoted 15 lines

package/uclibc/uClibc-ng.config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y · line 38

Quoted 12 lines
package/uclibc/uClibc-ng.config +1 -0
index 528bce965..91082975e 100644
@@ -32,6 +32,7 @@ UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 UCLIBC_HAS_PRINTF_M_SPEC=y
 # UCLIBC_HAS_REGEX_OLD is not set
 # UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GNU_GLOB=y

Could you comment on the size impact of enabling this option? I.e the size of uClibc without/with this option enabled, for example on ARM?

For mips64:

(quoted diff) +0 -0

b/package/uclibc/uClibc-ng.config
index 528bce9..9108297 100644

package/uclibc/uClibc-ng.config +1 -0
@@ -32,6 +32,7 @@ UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 UCLIBC_HAS_PRINTF_M_SPEC=y
 # UCLIBC_HAS_REGEX_OLD is not set
 # UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GNU_GLOB=y

wbx at helium:~/buildroot$ ls -la t1/lib/libu* -rwxr-xr-x 1 wbx wbx 655320 Apr 8 22:00 t1/lib/libuClibc-1.0.23.so wbx at helium:~/buildroot$ ls -la t2/lib/libu* -rwxr-xr-x 1 wbx wbx 672280 Apr 8 23:08 t2/lib/libuClibc-1.0.23.so wbx at helium:~/buildroot$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
672280-655320
16960

16960 Bytes. Can we enable it by default?

best regards
Waldemar

#8 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

Hello,

Quoted 1 line · Waldemar Brodkorb

16960 Bytes. Can we enable it by default?

I'd say yes.

Thomas

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

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

In reply to Andy Shevchenko

Hi,
Andy Shevchenko wrote,

Quoted 6 lines

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to the development of BlueZ user space support that commit basically makes the bluez5_utils package somewhat piece of junk. Since bluez5_utils 5.44 deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

You can add my Acked-By. It will allow to use more applications and I think it is just a minor size increase.

Looking forward to your size comparison requested by Thomas,

Thanks
Waldemar

#10 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

In reply to Andy Shevchenko

Hi,
Andy Shevchenko wrote,

Quoted 18 lines

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to the development of BlueZ user space support that commit basically makes the bluez5_utils package somewhat piece of junk. Since bluez5_utils 5.44 deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

Cc Thomas Petazzoni <[email protected]>
---
 package/uclibc/uClibc-ng.config | 1 +
 1 file changed, 1 insertion(+)
package/uclibc/uClibc-ng.config +0 -0
index 528bce965..91082975e 100644

package/uclibc/uClibc-ng.config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y · line 38

Quoted 7 lines
package/uclibc/uClibc-ng.config +1 -0
@@ -32,6 +32,7 @@ UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
 UCLIBC_HAS_PRINTF_M_SPEC=y
 # UCLIBC_HAS_REGEX_OLD is not set
 # UCLIBC_HAS_FNMATCH_OLD is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GNU_GLOB=y

I would like to see it included.

best regards
Waldemar

#11 lore raw

PATCH v2 1/1 package/uclibc: Enable wordexp functionality

In reply to Andy Shevchenko

Hello,

Quoted 7 lines · Andy Shevchenko

The commit d7c54cb0c0cf ("bluez5_utils: not available with uClibc") disables bluez5_utils (most of them) to be built with uClibc. Looking to the development of BlueZ user space support that commit basically makes the bluez5_utils package somewhat piece of junk. Since bluez5_utils 5.44 deprecates all previously used tools and focuses on btmgmt and bluetoothctl we need to restore status quo.

Quoted 5 lines
Cc Thomas Petazzoni <[email protected]>
---
 package/uclibc/uClibc-ng.config | 1 +
 1 file changed, 1 insertion(+)

I've applied, after rewriting the commit message. If there's some bluez5_utils improvements that can be done now that wordexp is enabled, please send patches. Thanks!

Thomas

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

PATCH v2 1/1 Revert "bluez5_utils: not available with uClibc"

In reply to Andy Shevchenko

Since uClibc supports wordexp functionality we may revert the commit d7c54cb0c0cf.

---
 package/bluez5_utils/Config.in | 5 -----
 1 file changed, 5 deletions(-)
package/bluez5_utils/Config.in +0 -5
index e99f0f69f..315747592 100644
@@ -39,15 +39,10 @@ comment "OBEX support needs a toolchain w/ C++"
 
 config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
 	bool "build CLI client"
-	# wordexp support not in our uClibc configuration
-	depends on !BR2_TOOLCHAIN_USES_UCLIBC
 	select BR2_PACKAGE_READLINE
 	help
 	  Enable the Bluez 5.x command line client.
 
-comment "bluez5-utils client needs a glibc or musl toolchain"
-	depends on BR2_TOOLCHAIN_USES_UCLIBC
-
 config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
 	bool "build deprecated tools"
 	help
Signature · 1 line
2.11.0
#13 lore raw

PATCH v2 1/1 package/bluez5_utils: Allow user to enable disabled plugins

In reply to Andy Shevchenko
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andy" == Andy Shevchenko <[email protected]> writes:

Disregard to increase just minor version BlueZ 5.44 is drastically different in a way what tools and plugins are enabled and installed by default.

Extend Buildroot package to cover these changes.

---
 package/bluez5_utils/Config.in       | 28 +++++++++++++++++++++++++++-
 package/bluez5_utils/bluez5_utils.mk | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 1 deletion(-)
package/bluez5_utils/Config.in +0 -0
index a7c0ee4ba..e99f0f69f 100644
@@ -48,6 +48,11 @@ config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT
 comment "bluez5-utils client needs a glibc or musl toolchain"

package/bluez5_utils/Config.in config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT · line 58

Quoted 10 lines
package/bluez5_utils/Config.in +5 -0
 	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
+config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
+	bool "build deprecated tools"
+	help
+	  Build BlueZ 5.x deprecated tools (hciattach, gatttool, ...).
+
 config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
 	bool "install GATT tool"
 	depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT

Then _UTILS_GATTTOOL should depend on _UTILS_DEPRECATED. Or perhaps it doesn't make sense to have a dedicated option for this and it should just be automatically installed when deprecated is enabled.

It would also be good to add the autobuilder failures:

http://autobuild.buildroot.net/?reason=bluez5_utils-5.44

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

PATCH v2 1/1 package/bluez5_utils: Allow user to enable disabled plugins

Quoted 11 lines · Peter Korsgaard

?> +config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED
?> + bool "build deprecated tools"
?> + help
?> + ??Build BlueZ 5.x deprecated tools (hciattach, gatttool,
...).
?> +
?>??config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL
?>?? bool "install GATT tool"
?>?? depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT

Then _UTILS_GATTTOOL should depend on _UTILS_DEPRECATED.

There is a patch flying around (from Bernd) to fix build and add -- enable-deprecated to GATTTOOL in bluez5_utils.mk.

Quoted 3 lines

Or perhaps it
doesn't make sense to have a dedicated option for this and it should just be automatically installed when deprecated is enabled.

Note, gatttool is left in noinst list, meaning the option should be still here.

Quoted 3 lines

It would also be good to add the autobuilder failures:

http://autobuild.buildroot.net/?reason=bluez5_utils-5.44

Makes sense.

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