[Buildroot] [PATCH] package/modem-manager: use libqmi and libmbim if they are selected

Yegor Yefremov yegorslists at googlemail.com
Mon Nov 4 17:30:51 UTC 2019


Hi Aleksander, Carlos,

On Mon, Nov 4, 2019 at 3:36 PM Aleksander Morgado
<aleksander at aleksander.es> wrote:
>
> Hey Carlos!
>
> > > > 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'
> > > >
> > >
> > > 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. :-)
> >
> > > > 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.
> >
> > 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?

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



More information about the buildroot mailing list