Skip to contentSkip to conversation

package/modem-manager: use libqmi and libmbim if they are selected

PATCH New unixmania at gmail.com 6 participants 14 messages Nov 4, 2019 – May 6, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

From: Carlos Santos <[email protected]>

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

then libqmi is configured with --enable-mbim-qmux and requires libmbim so ModemManager must be configured --with-mbim otherwise it fails to link due to missing libmbim symbols required by libqmi:

    qmi-endpoint-mbim.c:(.text+0x158): undefined reference to `mbim_device_close_finish'

Prevent this kind of error by using a simpler approach:

- Always enable MBIM support if libmbim is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and add a legacy option that selects BR2_PACKAGE_LIBMBIM
- Always enable QMI support if libqmi is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBQMI and add a legacy option that selects BR2_PACKAGE_LIBQMI
- Update the help text explaining how to enable MBIM and QMI

Fixes:
http://autobuild.buildroot.net/results/9c6b8ec2b9cc31f1ab460532c378731ab455210c/

---
 Config.in.legacy                       | 16 ++++++++++++++++
 package/modem-manager/Config.in        | 17 +++--------------
 package/modem-manager/modem-manager.mk |  4 ++--
 package/network-manager/Config.in      |  7 ++++---
 4 files changed, 25 insertions(+), 19 deletions(-)
Config.in.legacy +16 -0
index fcb10b1291..3336ef85d1 100644
@@ -146,6 +146,22 @@ endif
 
 comment "Legacy options removed in 2019.11"
 
+config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
+	bool "BR2_PACKAGE_MODEM_MANAGER_LIBMBIM has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBMBIM
+	help
+	  Select BR2_PACKAGE_LIBMBIM to enable support for MBIM protocol
+	  in ModemManager
+
+config BR2_PACKAGE_MODEM_MANAGER_LIBQMI
+	bool "BR2_PACKAGE_MODEM_MANAGER_LIBQMI has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBQMI
+	help
+	  Select BR2_PACKAGE_LIBQMI to enable support for QMI protocol
+	  in ModemManager
+
 config BR2_PACKAGE_ALLJOYN
 	bool "alljoyn was removed"
 	select BR2_LEGACY
package/modem-manager/Config.in +3 -14
index c4c723776d..e7987ad1e6 100644
@@ -10,22 +10,11 @@ config BR2_PACKAGE_MODEM_MANAGER
 	  ModemManager is a DBus-activated daemon which controls mobile
 	  broadband (2G/3G/4G) devices and connections.
 
-	  http://www.freedesktop.org/wiki/Software/ModemManager/
-
-if BR2_PACKAGE_MODEM_MANAGER
+	  Select BR2_PACKAGE_LIBMBIM to enable support for MBIM protocol
 
-config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
-	bool "MBIM support"
-	select BR2_PACKAGE_LIBMBIM
-	help
-	  This option enables support for MBIM protocol
+	  Select BR2_PACKAGE_LIBQMI to enable support for QMI protocol
 
-config BR2_PACKAGE_MODEM_MANAGER_LIBQMI
-	bool "QMI support"
-	select BR2_PACKAGE_LIBQMI
-	help
-	  This option enables support for QMI protocol
-endif
+	  http://www.freedesktop.org/wiki/Software/ModemManager/
 
 comment "modemmanager needs a toolchain w/ wchar, threads"
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/modem-manager/modem-manager.mk +2 -2
index dde841b80a..554d1a235e 100644
@@ -13,7 +13,7 @@ MODEM_MANAGER_DEPENDENCIES = host-pkgconf libglib2 $(TARGET_NLS_DEPENDENCIES)
 MODEM_MANAGER_INSTALL_STAGING = YES
 MODEM_MANAGER_CONF_OPTS = --disable-more-warnings
 
-ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBQMI),y)
+ifeq ($(BR2_PACKAGE_LIBQMI),y)
 MODEM_MANAGER_DEPENDENCIES += libqmi
 MODEM_MANAGER_CONF_OPTS += --with-qmi
 else
@@ -27,7 +27,7 @@ else
 MODEM_MANAGER_CONF_OPTS += --without-udev
 endif
 
-ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBMBIM),y)
+ifeq ($(BR2_PACKAGE_LIBMBIM),y)
 MODEM_MANAGER_DEPENDENCIES += libmbim
 MODEM_MANAGER_CONF_OPTS += --with-mbim
 else
package/network-manager/Config.in +4 -3
index 1257e08e6f..79ad161f31 100644
@@ -37,10 +37,11 @@ config BR2_PACKAGE_NETWORK_MANAGER_TUI
 config BR2_PACKAGE_NETWORK_MANAGER_MODEM_MANAGER
 	bool "modem-manager support"
 	select BR2_PACKAGE_MODEM_MANAGER
-	select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
-	select BR2_PACKAGE_MODEM_MANAGER_LIBQMI
+	select BR2_PACKAGE_LIBMBIM
+	select BR2_PACKAGE_LIBQMI
 	help
-	  This option enables support for ModemManager
+	  This option enables support for ModemManager with support for
+	  MBIM and QMI protocols
 
 config BR2_PACKAGE_NETWORK_MANAGER_PPPD
 	bool "pppd support"
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hey Carlos,

Quoted 9 lines

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

Quoted 6 lines

then libqmi is configured with --enable-mbim-qmux and requires libmbim so ModemManager must be configured --with-mbim otherwise it fails to link due to missing libmbim symbols required by libqmi:

    qmi-endpoint-mbim.c:(.text+0x158): undefined reference to `mbim_device_close_finish'

Wouldn't this Libs.private fix in libqmi solve this specific build problem? See http://lists.busybox.net/pipermail/buildroot/2019-October/264787.html

Quoted 10 lines

Prevent this kind of error by using a simpler approach:

- Always enable MBIM support if libmbim is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and add a legacy option that selects BR2_PACKAGE_LIBMBIM
- Always enable QMI support if libqmi is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBQMI and add a legacy option that selects BR2_PACKAGE_LIBQMI
- Update the help text explaining how to enable MBIM and QMI

It is true that the current setup may lead to a strange configuration where ModemManager may be built with only QMI support and no explicit MBIM support while at the same time libqmi is built with MBIM support. That would not be any problem per se, it would just be weird.

I'm not totally sure how these settings are usually preferred in buildroot, truth be told. Maybe someone with more experience in buildroot itself could suggest how to best handle this? Is it better to have a setting in the ModemManager package to enable/disable features explicitly? Or is it better to implicitly enable/disable those features based on whether some other packages are also included in the build? I guess the question would be whether we want to have a non-QMI non-MBIM capable ModemManager installed at the same time as libqmi+qmicli/libmbim+mbimcli. I have absolutely no idea whether this is a real usecase for anyone or not, truth be told. If it is (or may be) a real usecase, then I don't think this patch should go in.

Signature · 2 lines
Aleksander
https://aleksander.es
#2 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Quoted 16 lines · Aleksander Morgado

Hey Carlos,

Quoted 13 lines

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

then libqmi is configured with --enable-mbim-qmux and requires libmbim so ModemManager must be configured --with-mbim otherwise it fails to link due to missing libmbim symbols required by libqmi:

Quoted 5 lines
Quoted 2 lines
    qmi-endpoint-mbim.c:(.text+0x158): undefined reference to `mbim_device_close_finish'

Wouldn't this Libs.private fix in libqmi solve this specific build problem? See http://lists.busybox.net/pipermail/buildroot/2019-October/264787.html

Yes, but it passed below my radar due to ETOOMUCHMAIL. :-)

Quoted 28 lines
Quoted 10 lines

Prevent this kind of error by using a simpler approach:

- Always enable MBIM support if libmbim is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and add a legacy option that selects BR2_PACKAGE_LIBMBIM
- Always enable QMI support if libqmi is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBQMI and add a legacy option that selects BR2_PACKAGE_LIBQMI
- Update the help text explaining how to enable MBIM and QMI

It is true that the current setup may lead to a strange configuration where ModemManager may be built with only QMI support and no explicit MBIM support while at the same time libqmi is built with MBIM support. That would not be any problem per se, it would just be weird.

I'm not totally sure how these settings are usually preferred in buildroot, truth be told. Maybe someone with more experience in buildroot itself could suggest how to best handle this? Is it better to have a setting in the ModemManager package to enable/disable features explicitly? Or is it better to implicitly enable/disable those features based on whether some other packages are also included in the build? I guess the question would be whether we want to have a non-QMI non-MBIM capable ModemManager installed at the same time as libqmi+qmicli/libmbim+mbimcli. I have absolutely no idea whether this is a real usecase for anyone or not, truth be told. If it is (or may be) a real usecase, then I don't think this patch should go in.

Quoted 3 lines

--
Aleksander
https://aleksander.es

The main client of ModemManager is NetworkManager, which always selects MBIM and QMI support, so I don't believe it would make much difference, in practice.

Signature · 1 line
Carlos Santos <[email protected]>
#3 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hey Carlos!

Quoted 48 lines
Quoted 12 lines
Quoted 12 lines

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

then libqmi is configured with --enable-mbim-qmux and requires libmbim so ModemManager must be configured --with-mbim otherwise it fails to link due to missing libmbim symbols required by libqmi:

Quoted 5 lines
Quoted 2 lines
    qmi-endpoint-mbim.c:(.text+0x158): undefined reference to `mbim_device_close_finish'

Wouldn't this Libs.private fix in libqmi solve this specific build problem? See http://lists.busybox.net/pipermail/buildroot/2019-October/264787.html

Yes, but it passed below my radar due to ETOOMUCHMAIL. :-)

Quoted 16 lines
Quoted 10 lines

Prevent this kind of error by using a simpler approach:

- Always enable MBIM support if libmbim is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and add a legacy option that selects BR2_PACKAGE_LIBMBIM
- Always enable QMI support if libqmi is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBQMI and add a legacy option that selects BR2_PACKAGE_LIBQMI
- Update the help text explaining how to enable MBIM and QMI

It is true that the current setup may lead to a strange configuration where ModemManager may be built with only QMI support and no explicit MBIM support while at the same time libqmi is built with MBIM support. That would not be any problem per se, it would just be weird.

Quoted 11 lines

I'm not totally sure how these settings are usually preferred in buildroot, truth be told. Maybe someone with more experience in buildroot itself could suggest how to best handle this? Is it better to have a setting in the ModemManager package to enable/disable features explicitly? Or is it better to implicitly enable/disable those features based on whether some other packages are also included in the build? I guess the question would be whether we want to have a non-QMI non-MBIM capable ModemManager installed at the same time as libqmi+qmicli/libmbim+mbimcli. I have absolutely no idea whether this is a real usecase for anyone or not, truth be told. If it is (or may be) a real usecase, then I don't think this patch should go in.

Quoted 4 lines

The main client of ModemManager is NetworkManager, which always selects MBIM and QMI support, so I don't believe it would make much difference, in practice.

If you ask me, the NetworkManager package should not select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM or BR2_PACKAGE_MODEM_MANAGER_LIBQMI. The ModemManager API that NetworkManager uses doesn't in any way change based on whether QMI/MBIM support is enabled, it's really orthogonal.
@Yegor Yefremov what's your take on this?

Signature · 2 lines
Aleksander
https://aleksander.es
#4 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hi Aleksander, Carlos,

Quoted 56 lines · Aleksander Morgado

Hey Carlos!

Quoted 48 lines
Quoted 12 lines
Quoted 12 lines

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

then libqmi is configured with --enable-mbim-qmux and requires libmbim so ModemManager must be configured --with-mbim otherwise it fails to link due to missing libmbim symbols required by libqmi:

Quoted 5 lines
Quoted 2 lines
    qmi-endpoint-mbim.c:(.text+0x158): undefined reference to `mbim_device_close_finish'

Wouldn't this Libs.private fix in libqmi solve this specific build problem? See http://lists.busybox.net/pipermail/buildroot/2019-October/264787.html

Yes, but it passed below my radar due to ETOOMUCHMAIL. :-)

Quoted 16 lines
Quoted 10 lines

Prevent this kind of error by using a simpler approach:

- Always enable MBIM support if libmbim is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and add a legacy option that selects BR2_PACKAGE_LIBMBIM
- Always enable QMI support if libqmi is selected
- Drop BR2_PACKAGE_MODEM_MANAGER_LIBQMI and add a legacy option that selects BR2_PACKAGE_LIBQMI
- Update the help text explaining how to enable MBIM and QMI

It is true that the current setup may lead to a strange configuration where ModemManager may be built with only QMI support and no explicit MBIM support while at the same time libqmi is built with MBIM support. That would not be any problem per se, it would just be weird.

Quoted 11 lines

I'm not totally sure how these settings are usually preferred in buildroot, truth be told. Maybe someone with more experience in buildroot itself could suggest how to best handle this? Is it better to have a setting in the ModemManager package to enable/disable features explicitly? Or is it better to implicitly enable/disable those features based on whether some other packages are also included in the build? I guess the question would be whether we want to have a non-QMI non-MBIM capable ModemManager installed at the same time as libqmi+qmicli/libmbim+mbimcli. I have absolutely no idea whether this is a real usecase for anyone or not, truth be told. If it is (or may be) a real usecase, then I don't think this patch should go in.

Quoted 4 lines

The main client of ModemManager is NetworkManager, which always selects MBIM and QMI support, so I don't believe it would make much difference, in practice.

Quoted 6 lines

If you ask me, the NetworkManager package should not select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM or BR2_PACKAGE_MODEM_MANAGER_LIBQMI. The ModemManager API that NetworkManager uses doesn't in any way change based on whether QMI/MBIM support is enabled, it's really orthogonal.
@Yegor Yefremov what's your take on this?

I don't have a strong opinion here. I'm always using MM with both QMI and MBIM libraries. As you already need glib2 for MM, one won't waste too much disk space. Hence I would opt for MM to always enable both libraries. This would simplify both MM and NM configuration.

Yegor

#5 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

In reply to unixmania at gmail.com

Hello,

Adding our Config.in.legacy expert Arnout.

Quoted 13 lines · On Mon, 4 Nov 2019 09:48:44 -0300 unixmania at gmail.com wrote:
Config.in.legacy +5 -0
index fcb10b1291..3336ef85d1 100644
@@ -146,6 +146,22 @@ endif
 
 comment "Legacy options removed in 2019.11"
 
+config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
+	bool "BR2_PACKAGE_MODEM_MANAGER_LIBMBIM has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBMBIM
+	help

Config.in.legacy endif · line 163

Quoted 10 lines
Config.in.legacy +10 -0
+	  Select BR2_PACKAGE_LIBMBIM to enable support for MBIM protocol
+	  in ModemManager
+
+config BR2_PACKAGE_MODEM_MANAGER_LIBQMI
+	bool "BR2_PACKAGE_MODEM_MANAGER_LIBQMI has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBQMI
+	help
+	  Select BR2_PACKAGE_LIBQMI to enable support for QMI protocol
+	  in ModemManager

I think in this specific case, we don't need Config.in.legacy handling. Indeed, a full .config that had BR2_PACKAGE_MODEM_MANAGER_LIBQMI enabled will already have BR2_PACKAGE_LIBQMI, and since the .mk file now relies on BR2_PACKAGE_LIBQMI to enable libqmi support in modem-manager, I think we're good.

Of course, that won't work for defconfigs, but I believe updating with a defconfig is not really guaranteed to give the right result. Arnout ?

Other than that, patch looks good to me. No need to resend, let's just wait to see what Arnout says about the Config.in.legacy handling.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Quoted 37 lines · Thomas Petazzoni

Hello,

Adding our Config.in.legacy expert Arnout.

Quoted 13 lines · On Mon, 4 Nov 2019 09:48:44 -0300 unixmania at gmail.com wrote:
Config.in.legacy +5 -0
index fcb10b1291..3336ef85d1 100644
@@ -146,6 +146,22 @@ endif
 
 comment "Legacy options removed in 2019.11"
 
+config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
+	bool "BR2_PACKAGE_MODEM_MANAGER_LIBMBIM has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBMBIM
+	help

Config.in.legacy endif · line 163

Quoted 10 lines
Config.in.legacy +10 -0
+	  Select BR2_PACKAGE_LIBMBIM to enable support for MBIM protocol
+	  in ModemManager
+
+config BR2_PACKAGE_MODEM_MANAGER_LIBQMI
+	bool "BR2_PACKAGE_MODEM_MANAGER_LIBQMI has been removed"
+	select BR2_LEGACY
+	select BR2_PACKAGE_LIBQMI
+	help
+	  Select BR2_PACKAGE_LIBQMI to enable support for QMI protocol
+	  in ModemManager

I think in this specific case, we don't need Config.in.legacy handling. Indeed, a full .config that had BR2_PACKAGE_MODEM_MANAGER_LIBQMI enabled will already have BR2_PACKAGE_LIBQMI, and since the .mk file now relies on BR2_PACKAGE_LIBQMI to enable libqmi support in modem-manager, I think we're good.

Quoted 2 lines

Of course, that won't work for defconfigs, but I believe updating with a defconfig is not really guaranteed to give the right result. Arnout ?

In my point of view, indeed it isn't, but this isn't documented anywhere I think.

So indeed, I agree that no legacy handling is needed here. It will annoy many
users (because they have to go and disable it in the legacy menu), while being of no benefit for most of them.

Regards,
Arnout

Quoted 7 lines

Other than that, patch looks good to me. No need to resend, let's just wait to see what Arnout says about the Config.in.legacy handling.

Best regards,

Thomas

#7 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Quoted 44 lines · Arnout Vandecappelle
Quoted 37 lines · Thomas Petazzoni

Hello,

Adding our Config.in.legacy expert Arnout.

Quoted 13 lines · On Mon, 4 Nov 2019 09:48:44 -0300 unixmania at gmail.com wrote:
Config.in.legacy +5 -0
index fcb10b1291..3336ef85d1 100644
@@ -146,6 +146,22 @@ endif
 
 comment "Legacy options removed in 2019.11"
 
+config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
+    bool "BR2_PACKAGE_MODEM_MANAGER_LIBMBIM has been removed"
+    select BR2_LEGACY
+    select BR2_PACKAGE_LIBMBIM
+    help

Config.in.legacy endif · line 163

Quoted 10 lines
Config.in.legacy +10 -0
+      Select BR2_PACKAGE_LIBMBIM to enable support for MBIM protocol
+      in ModemManager
+
+config BR2_PACKAGE_MODEM_MANAGER_LIBQMI
+    bool "BR2_PACKAGE_MODEM_MANAGER_LIBQMI has been removed"
+    select BR2_LEGACY
+    select BR2_PACKAGE_LIBQMI
+    help
+      Select BR2_PACKAGE_LIBQMI to enable support for QMI protocol
+      in ModemManager

I think in this specific case, we don't need Config.in.legacy handling. Indeed, a full .config that had BR2_PACKAGE_MODEM_MANAGER_LIBQMI enabled will already have BR2_PACKAGE_LIBQMI, and since the .mk file now relies on BR2_PACKAGE_LIBQMI to enable libqmi support in modem-manager, I think we're good.

Quoted 2 lines

Of course, that won't work for defconfigs, but I believe updating with a defconfig is not really guaranteed to give the right result. Arnout ?

Quoted 17 lines

In my point of view, indeed it isn't, but this isn't documented anywhere I think.

So indeed, I agree that no legacy handling is needed here. It will annoy many
users (because they have to go and disable it in the legacy menu), while being of no benefit for most of them.

Regards,
Arnout

Quoted 7 lines

Other than that, patch looks good to me. No need to resend, let's just wait to see what Arnout says about the Config.in.legacy handling.

Best regards,

Thomas

I suggest to apply https://patchwork.ozlabs.org/patch/1186596/ to solve the build problem, then we can decide if modem-manager and network-manager need additional changes.

Signature · 1 line
Carlos Santos <[email protected]>
#8 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

In reply to unixmania at gmail.com

Hello Carlos, Aleksander, Yegor,

Quoted 7 lines · On Mon, 4 Nov 2019 09:48:44 -0300 unixmania at gmail.com wrote:

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

I had a new look at this. We need a new iteration of this patch, since the build issue doesn't exist anymore.

However, I would suggest to take a simpler approach:

- Keep the BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and
BR2_PACKAGE_MODEM_MANAGER_LIBQMI options.

- Change modem-manager.mk to test BR2_PACKAGE_LIBMBIM and BR2_PACKAGE_QMI instead of BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and BR2_PACKAGE_MODEM_MANAGER_LIBQMI.

Also, as was pointed out during the discussion, it would be good to change the network-manager package to not force the modem-manager MBIM/QMI support when modem-manager support is enabled. I.e, remove the following lines:

select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
select BR2_PACKAGE_MODEM_MANAGER_LIBQMI

from package/network-manager/Config.in

Could one of you have a look ?

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hey Thomas,

Quoted 10 lines

However, I would suggest to take a simpler approach:

- Keep the BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and
BR2_PACKAGE_MODEM_MANAGER_LIBQMI options.

- Change modem-manager.mk to test BR2_PACKAGE_LIBMBIM and BR2_PACKAGE_QMI instead of BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and BR2_PACKAGE_MODEM_MANAGER_LIBQMI.

I'm not sure what you mean with the above paragraph. What do you mean with e.g. "testing" BR2_PACKAGE_LIBMBIM instead of BR2_PACKAGE_:MODEM_MANAGER_LIBMBIM?

Quoted 10 lines

Also, as was pointed out during the discussion, it would be good to change the network-manager package to not force the modem-manager MBIM/QMI support when modem-manager support is enabled. I.e, remove the following lines:

select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
select BR2_PACKAGE_MODEM_MANAGER_LIBQMI

from package/network-manager/Config.in

I agree with this change in NM, I'll send a patch for that. But is it just removing those lines? Ideally, MBIM and QMI (and QMI over MBIM) support should be "the default" when building MM, and the users can disable them explicitly if not required. I'm not sure how to handle that in buildroot, truth be told.

Signature · 2 lines
Aleksander
https://aleksander.es
#10 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hello Aleksander,

Quoted 8 lines · On Mon, 20 Apr 2020 11:11:45 +0200 Aleksander Morgado…
Quoted 4 lines

- Change modem-manager.mk to test BR2_PACKAGE_LIBMBIM and BR2_PACKAGE_QMI instead of BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and BR2_PACKAGE_MODEM_MANAGER_LIBQMI.

I'm not sure what you mean with the above paragraph. What do you mean with e.g. "testing" BR2_PACKAGE_LIBMBIM instead of BR2_PACKAGE_:MODEM_MANAGER_LIBMBIM?

I mean this:

package/modem-manager/modem-manager.mk +2 -2
index 75fc5811db..6b4e9b6250 100644
@@ -13,7 +13,7 @@ MODEM_MANAGER_DEPENDENCIES = host-pkgconf libglib2 $(TARGET_NLS_DEPENDENCIES)
 MODEM_MANAGER_INSTALL_STAGING = YES
 MODEM_MANAGER_CONF_OPTS = --disable-more-warnings
 
-ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBQMI),y)
+ifeq ($(BR2_PACKAGE_LIBQMI),y)
 MODEM_MANAGER_DEPENDENCIES += libqmi
 MODEM_MANAGER_CONF_OPTS += --with-qmi
 else
@@ -27,7 +27,7 @@ else
 MODEM_MANAGER_CONF_OPTS += --without-udev
 endif
 
-ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBMBIM),y)
+ifeq ($(BR2_PACKAGE_LIBMBIM),y)
 MODEM_MANAGER_DEPENDENCIES += libmbim
 MODEM_MANAGER_CONF_OPTS += --with-mbim
 else
Quoted 5 lines
Quoted 5 lines

Also, as was pointed out during the discussion, it would be good to change the network-manager package to not force the modem-manager MBIM/QMI support when modem-manager support is enabled. I.e, remove the following lines:

Quoted 8 lines
Quoted 5 lines

select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
select BR2_PACKAGE_MODEM_MANAGER_LIBQMI

from package/network-manager/Config.in

I agree with this change in NM, I'll send a patch for that. But is it just removing those lines?

Yes.

Quoted 4 lines

Ideally, MBIM and QMI (and QMI over MBIM) support should be "the default" when building MM, and the users can disable them explicitly if not required. I'm not sure how to handle that in buildroot, truth be told.

Normally, the Buildroot policy is to make all features optional in the upstream software really optional in Buildroot as well. I.e, if modem-manager can build and be useful with qmi/mbim support, then we shouldn't force to build the modem-manager support with qmi/mbim support.

Is modem-manager completely useless without qmi/mbim support ? Does network-manager absolutely requires qmi/mbim support in modem-manager ?

If not, then qmi/mbim should be optional, and not force-selected by network-manager when enabling modem-manager support.

Thanks!

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#11 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hey Thomas,

Quoted 61 lines
Quoted 8 lines
Quoted 4 lines

- Change modem-manager.mk to test BR2_PACKAGE_LIBMBIM and BR2_PACKAGE_QMI instead of BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and BR2_PACKAGE_MODEM_MANAGER_LIBQMI.

I'm not sure what you mean with the above paragraph. What do you mean with e.g. "testing" BR2_PACKAGE_LIBMBIM instead of BR2_PACKAGE_:MODEM_MANAGER_LIBMBIM?

I mean this:

package/modem-manager/modem-manager.mk +2 -2
index 75fc5811db..6b4e9b6250 100644
@@ -13,7 +13,7 @@ MODEM_MANAGER_DEPENDENCIES = host-pkgconf libglib2 $(TARGET_NLS_DEPENDENCIES)
 MODEM_MANAGER_INSTALL_STAGING = YES
 MODEM_MANAGER_CONF_OPTS = --disable-more-warnings
 
-ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBQMI),y)
+ifeq ($(BR2_PACKAGE_LIBQMI),y)
 MODEM_MANAGER_DEPENDENCIES += libqmi
 MODEM_MANAGER_CONF_OPTS += --with-qmi
 else
@@ -27,7 +27,7 @@ else
 MODEM_MANAGER_CONF_OPTS += --without-udev
 endif
 
-ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBMBIM),y)
+ifeq ($(BR2_PACKAGE_LIBMBIM),y)
 MODEM_MANAGER_DEPENDENCIES += libmbim
 MODEM_MANAGER_CONF_OPTS += --with-mbim
 else
Quoted 6 lines
Quoted 6 lines

Also, as was pointed out during the discussion, it would be good to change the network-manager package to not force the modem-manager MBIM/QMI support when modem-manager support is enabled. I.e, remove the following lines:

Quoted 8 lines
Quoted 5 lines

select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
select BR2_PACKAGE_MODEM_MANAGER_LIBQMI

from package/network-manager/Config.in

I agree with this change in NM, I'll send a patch for that. But is it just removing those lines?

Yes.

Quoted 4 lines

Ideally, MBIM and QMI (and QMI over MBIM) support should be "the default" when building MM, and the users can disable them explicitly if not required. I'm not sure how to handle that in buildroot, truth be told.

Normally, the Buildroot policy is to make all features optional in the upstream software really optional in Buildroot as well. I.e, if modem-manager can build and be useful with qmi/mbim support, then we shouldn't force to build the modem-manager support with qmi/mbim support.

Quoted 6 lines

Is modem-manager completely useless without qmi/mbim support ? Does network-manager absolutely requires qmi/mbim support in modem-manager ?

If not, then qmi/mbim should be optional, and not force-selected by network-manager when enabling modem-manager support.

Better late than never! I've sent several patches addressing the above, let me know if there's any problem with them. Cheers!

Signature · 2 lines
Aleksander
https://aleksander.
#12 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

In reply to Thomas Petazzoni

Thomas, Aleksander, All,

On 2020-04-19 23:00 +0200, Thomas Petazzoni spake thusly:

Quoted 16 lines

Hello Carlos, Aleksander, Yegor,

Quoted 7 lines · On Mon, 4 Nov 2019 09:48:44 -0300 unixmania at gmail.com wrote:

If we have a cnfiguration like this

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

I had a new look at this. We need a new iteration of this patch, since the build issue doesn't exist anymore.

Quoted 8 lines

However, I would suggest to take a simpler approach:

- Keep the BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and
BR2_PACKAGE_MODEM_MANAGER_LIBQMI options.

- Change modem-manager.mk to test BR2_PACKAGE_LIBMBIM and BR2_PACKAGE_QMI instead of BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and BR2_PACKAGE_MODEM_MANAGER_LIBQMI.

Sorry, but I disagree here: a user who elects to not enable 'MBIM support' in modem-manager, but otherwise has libmbim enabled (for whatever reason) will in fact get a modem-mamanger that has support for MBIM. This is definitely counter-intuitive.

Ditto libqmi.

So I would rather agree with the original patch from Carlos (except for the legacy handling, which is indeed not needed).

Quoted 9 lines

Also, as was pointed out during the discussion, it would be good to change the network-manager package to not force the modem-manager MBIM/QMI support when modem-manager support is enabled. I.e, remove the following lines:

select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
select BR2_PACKAGE_MODEM_MANAGER_LIBQMI

from package/network-manager/Config.in

I do agree with that too, which must be done in a separate patch.

Regards,
Yann E. MORIN.

Quoted 13 lines

Could one of you have a look ?

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH 1/1 package/modem-manager: use libqmi and libmbim if they are selected

Hey Yann,

Quoted 23 lines
Quoted 9 lines
Quoted 5 lines

BR2_PACKAGE_MODEM_MANAGER=y
# BR2_PACKAGE_MODEM_MANAGER_LIBMBIM is not set BR2_PACKAGE_MODEM_MANAGER_LIBQMI=y [...]
BR2_PACKAGE_LIBMBIM=y

I had a new look at this. We need a new iteration of this patch, since the build issue doesn't exist anymore.

Quoted 8 lines

However, I would suggest to take a simpler approach:

- Keep the BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and
BR2_PACKAGE_MODEM_MANAGER_LIBQMI options.

- Change modem-manager.mk to test BR2_PACKAGE_LIBMBIM and BR2_PACKAGE_QMI instead of BR2_PACKAGE_MODEM_MANAGER_LIBMBIM and BR2_PACKAGE_MODEM_MANAGER_LIBQMI.

Sorry, but I disagree here: a user who elects to not enable 'MBIM support' in modem-manager, but otherwise has libmbim enabled (for whatever reason) will in fact get a modem-mamanger that has support for MBIM. This is definitely counter-intuitive.

Quoted 5 lines

Ditto libqmi.

So I would rather agree with the original patch from Carlos (except for the legacy handling, which is indeed not needed).

I have very mixed feelings here. I do agree with you in the sense that yes, if the software allows the possibility of having the system with libmbim installed *and* ModemManager *without MBIM* support installed, then why not allow that? It even gets more complicated than that actually, because libqmi may also be compiled with or without MBIM support (for the QMI over MBIM transport), so if we're up to adding lots of config options, we could even handle that as well, otherwise why even bother with the MM config options. In MM 1.14 there is also going to be the possibility to select which plugins to build and install, if users only need some. Really, we can make it as complex as we want build config wise.

But, on the other hand, I truly fail to see a case where a user may want to have libmbim installed and MM built without MBIM support (I haven't seen such a use case myself, and believe me I've seen lots of use cases!). Or both libmbim and libqmi installed but MM only built with QMI support and not MBIM. And what if MM wants to have MBIM and QMI support but libqmi hasn't been built with MBIM support? I think we would be making it complex for the sake of complexity, instead of just making it simple. The fact that MM was built with the possibility to disable MBIM support was really thought for the case where the system isn't going to have ever a MBIM device so you can "save" the kernel driver, the libmbim library, and still have MM to handle e.g. AT modems. Simplifying the config I think is good, and I kind of liked Thomas' suggestion here.

If I have to select among both points of view, I would really prefer simplifying, because it really just makes sense to have MBIM support in both libqmi and ModemManager if libmbim is installed, and same for libqmi. If we don't do that, I'm sure we'll get lots of users selecting the wrong configurations and having to debug why the hell MM isn't processing the QMI modem if libqmi and qmicli can happily talk to the device, for example. Removing config options isn't always bad, sometimes it's actually better in the long run.

This is just my opinion, and as I said, is not a strong one :D

Quoted 5 lines
Quoted 5 lines

Also, as was pointed out during the discussion, it would be good to change the network-manager package to not force the modem-manager MBIM/QMI support when modem-manager support is enabled. I.e, remove the following lines:

Quoted 7 lines
Quoted 4 lines

select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM
select BR2_PACKAGE_MODEM_MANAGER_LIBQMI

from package/network-manager/Config.in

I do agree with that too, which must be done in a separate patch.

There's a separate patch doing that already, it's also in the mailing list.

Cheers!

Signature · 2 lines
Aleksander
https://aleksander.es