From fb9fc969d91f69851b4c70dba512b607e52bda7b Mon Sep 17 00:00:00 2001 From: Michael Nosthoff Date: Mon, 26 Jul 2021 22:12:42 +0200 Subject: [PATCH] package/bluez5_utils: expose more disable options BlueZ builds a lot of Classic BT profiles by default but allows to disable them. This is especially handy when only BLE is needed and enabled in the kernel. Otherwise this yields warnings like this on bootup: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support src/plugin.c:plugin_init() System does not support network plugin Also it allows to disable btmon which should not be needed on production systems and is ~800KB in size. Expose those options but default to 'y' to no break existing configurations. Signed-off-by: Michael Nosthoff Signed-off-by: Thomas Petazzoni --- package/bluez5_utils/Config.in | 36 ++++++++++++++++++++++++ package/bluez5_utils/bluez5_utils.mk | 41 ++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in index 2c8625a66d..9f20bf83ac 100644 --- a/package/bluez5_utils/Config.in +++ b/package/bluez5_utils/Config.in @@ -37,6 +37,12 @@ config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT help Build the command line client "bluetoothctl". +config BR2_PACKAGE_BLUEZ5_UTILS_MONITOR + bool "build monitor utility" + default y + help + Build monitor utility btmon. + config BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED bool "install deprecated tools" depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT @@ -52,11 +58,35 @@ config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL "Nokia OBEX PC Suite tool". So, only if OBEX support is enabled this option has an effect. +config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_A2DP + bool "build a2dp plugin" + default y + help + Build plugin for A2DP (audio) profiles. + +config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AVRCP + bool "build avrcp plugin" + default y + help + Build plugin for AVRCP (audio) profiles. + config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH bool "build health plugin" help Build plugin for health profiles. +config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID + bool "build hid plugin" + default y + help + Build plugin for HID (input) profiles. + +config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG + bool "build hog plugin" + default y + help + Build plugin for HoG (input) profiles. + config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MESH bool "build mesh plugin" depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 # ell @@ -76,6 +106,12 @@ config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MIDI help Build MIDI support via ALSA sequencer. +config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NETWORK + bool "build network plugin" + default y + help + Build plugin for PANU, NAP, GN profiles. + config BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC bool "build nfc plugin" help diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk index 3bd3f5490d..7b7e31500f 100644 --- a/package/bluez5_utils/bluez5_utils.mk +++ b/package/bluez5_utils/bluez5_utils.mk @@ -40,6 +40,12 @@ else BLUEZ5_UTILS_CONF_OPTS += --disable-client endif +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_MONITOR),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-monitor +else +BLUEZ5_UTILS_CONF_OPTS += --disable-monitor +endif + # experimental plugins ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y) BLUEZ5_UTILS_CONF_OPTS += --enable-experimental @@ -47,6 +53,20 @@ else BLUEZ5_UTILS_CONF_OPTS += --disable-experimental endif +# enable a2dp plugin +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_A2DP),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-a2dp +else +BLUEZ5_UTILS_CONF_OPTS += --disable-a2dp +endif + +#enable avrcp plugin +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_AVRCP),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-avrcp +else +BLUEZ5_UTILS_CONF_OPTS += --disable-avrcp +endif + # enable health plugin ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HEALTH),y) BLUEZ5_UTILS_CONF_OPTS += --enable-health @@ -54,6 +74,20 @@ else BLUEZ5_UTILS_CONF_OPTS += --disable-health endif +# enable hid plugin +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HID),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-hid +else +BLUEZ5_UTILS_CONF_OPTS += --disable-hid +endif + +# enable hog plugin +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_HOG),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-hog +else +BLUEZ5_UTILS_CONF_OPTS += --disable-hog +endif + # enable mesh profile ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_MESH),y) BLUEZ5_UTILS_CONF_OPTS += --enable-external-ell --enable-mesh @@ -70,6 +104,13 @@ else BLUEZ5_UTILS_CONF_OPTS += --disable-midi endif +# enable network plugin +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NETWORK),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-network +else +BLUEZ5_UTILS_CONF_OPTS += --disable-network +endif + # enable nfc plugin ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_PLUGINS_NFC),y) BLUEZ5_UTILS_CONF_OPTS += --enable-nfc -- 2.30.2