[Buildroot] [git commit] libqmi: add optional features

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Sep 6 21:48:24 UTC 2017

commit: https://git.buildroot.net/buildroot/commit/?id=5cb40de7ee09338f1e7db03915447434485959cd
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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
 * 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).

Signed-off-by: Aleksander Morgado <aleksander at aleksander.es>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
 package/libqmi/libqmi.mk | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk
index 917265f..3a3d079 100644
--- a/package/libqmi/libqmi.mk
+++ b/package/libqmi/libqmi.mk
@@ -15,7 +15,33 @@ LIBQMI_AUTORECONF = YES
-# 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
+LIBQMI_CONF_OPTS += --with-udev
+LIBQMI_CONF_OPTS += --without-udev
+# if libmbim available, request QMI-over-MBIM support
+ifeq ($(BR2_PACKAGE_LIBMBIM),y)
+LIBQMI_CONF_OPTS += --enable-mbim-qmux
+LIBQMI_CONF_OPTS += --disable-mbim-qmux
+# if ModemManager available, enable MM runtime check in
+# qmi-firmware-update (note that we don't need to build-depend on
+# anything else)
+LIBQMI_CONF_OPTS += --enable-mm-runtime-check
+LIBQMI_CONF_OPTS += --disable-mm-runtime-check
 $(eval $(autotools-package))

More information about the buildroot mailing list