Skip to contentSkip to conversation

libqmi: add optional features

PATCH New Aleksander Morgado 2 participants 2 messages Sep 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libqmi: add optional features

The libqmi library and tools come with several optional features that may be enabled or disabled during build.

This patch adds support to automatically enable or disable them based on the presence of the required dependencies for each:
* QMI-over-MBIM is enabled if libmbim is selected.
* udev support in qmi-firmware-update is enabled if libgudev is selected.
* MM runtime check in qmi-firmware-update is enabled if ModemManager is selected (but we don't build-depend on it, the runtime check is done using plain glib2 DBus operations).

---
 package/libqmi/libqmi.mk | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
package/libqmi/libqmi.mk +28 -2
index 917265f4b..3a3d079a0 100644
@@ -15,7 +15,33 @@ LIBQMI_AUTORECONF = YES
 
 LIBQMI_DEPENDENCIES = libglib2
 
-# we don't want -Werror and disable gudev Gobject bindings
-LIBQMI_CONF_OPTS = --enable-more-warnings=no --without-udev
+# we don't want -Werror
+LIBQMI_CONF_OPTS = --enable-more-warnings=no
+
+# if libgudev available, request udev support for a better
+# qmi-firmware-update experience
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+LIBQMI_DEPENDENCIES += libgudev
+LIBQMI_CONF_OPTS += --with-udev
+else
+LIBQMI_CONF_OPTS += --without-udev
+endif
+
+# if libmbim available, request QMI-over-MBIM support
+ifeq ($(BR2_PACKAGE_LIBMBIM),y)
+LIBQMI_DEPENDENCIES += libmbim
+LIBQMI_CONF_OPTS += --enable-mbim-qmux
+else
+LIBQMI_CONF_OPTS += --disable-mbim-qmux
+endif
+
+# if ModemManager available, enable MM runtime check in
+# qmi-firmware-update (note that we don't need to build-depend on
+# anything else)
+ifeq ($(BR2_PACKAGE_MODEM_MANAGER),y)
+LIBQMI_CONF_OPTS += --enable-mm-runtime-check
+else
+LIBQMI_CONF_OPTS += --disable-mm-runtime-check
+endif
 
 $(eval $(autotools-package))
Signature · 1 line
2.13.1
#1 lore raw

PATCH 1/1 libqmi: add optional features

Hello,

Quoted 12 lines · Aleksander Morgado

The libqmi library and tools come with several optional features that may be enabled or disabled during build.

This patch adds support to automatically enable or disable them based on the presence of the required dependencies for each:
* QMI-over-MBIM is enabled if libmbim is selected.
* udev support in qmi-firmware-update is enabled if libgudev is selected.
* MM runtime check in qmi-firmware-update is enabled if ModemManager is selected (but we don't build-depend on it, the runtime check is done using plain glib2 DBus operations).

Quoted 4 lines
---
 package/libqmi/libqmi.mk | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

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