You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
4.2 KiB

modemmanager: increase initial timeout for event reporting When the ModemManager daemon is started by the init script, we're explicitly calling mm_report_events_from_cache() so that all the hotplug events that happened before that moment are properly notified to the newly launched daemon. This initial reporting of events does a wait for the ModemManager process to be available in DBus, and if the daemon isn't registered in the bus in a given time, the process is considered failed: Sun Sep 6 16:20:02 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:02 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:03 2020 [2180]: <info> ModemManager (version 1.14.6) starting in system bus... Sun Sep 6 16:20:03 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:04 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:05 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:05 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:06 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:06 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:07 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:07 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:08 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:08 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:09 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:09 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:10 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:10 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:11 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:11 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:12 2020 ModemManager: hotplug: checking if ModemManager is available... Sun Sep 6 16:20:12 2020 ModemManager: hotplug: ModemManager not yet available Sun Sep 6 16:20:12 2020 ModemManager: hotplug: error: couldn't report initial kernel events: ModemManager not running Update the default wait time for this initial event notification from 10s to 60s, because there are cases where the daemon is slower to boot, e.g. during the first boot after a sysupgrade. Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
4 years ago
  1. #
  2. # Copyright (C) 2016 Velocloud Inc.
  3. # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=modemmanager
  9. PKG_VERSION:=1.14.6
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
  13. PKG_HASH:=783d5da925b2ca69f6233fcead691dd0f5cba06aa479d71495efdc07053fc0fd
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Nicholas Smith <nicholas.smith@telcoantennas.com.au>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_BUILD_DEPENDS:=libxslt/host
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/modemmanager/config
  24. source "$(SOURCE)/Config.in"
  25. endef
  26. define Package/modemmanager
  27. SECTION:=net
  28. CATEGORY:=Network
  29. TITLE:=Control utility for any kind of mobile broadband modem
  30. URL:=https://www.freedesktop.org/wiki/Software/ModemManager
  31. DEPENDS:= \
  32. $(INTL_DEPENDS) \
  33. +glib2 \
  34. +dbus \
  35. +ppp \
  36. +MODEMMANAGER_WITH_MBIM:libmbim \
  37. +MODEMMANAGER_WITH_QMI:libqmi
  38. endef
  39. define Package/modemmanager/description
  40. ModemManager is a D-Bus-activated service which allows controlling mobile
  41. broadband modems. Add kernel modules for your modems as needed.
  42. Select Utilities/usb-modeswitch if needed.
  43. endef
  44. CONFIGURE_ARGS += \
  45. --without-polkit \
  46. --without-udev \
  47. --without-systemdsystemunitdir \
  48. --disable-rpath \
  49. --disable-gtk-doc
  50. ifdef CONFIG_MODEMMANAGER_WITH_MBIM
  51. CONFIGURE_ARGS += --with-mbim
  52. else
  53. CONFIGURE_ARGS += --without-mbim
  54. endif
  55. ifdef CONFIG_MODEMMANAGER_WITH_QMI
  56. CONFIGURE_ARGS += --with-qmi
  57. else
  58. CONFIGURE_ARGS += --without-qmi
  59. endif
  60. define Build/Prepare
  61. $(call Build/Prepare/Default)
  62. ( cd "$(PKG_BUILD_DIR)"; \
  63. printf "all:\ninstall:\n" >po/Makefile.in.in; \
  64. )
  65. endef
  66. define Build/InstallDev
  67. $(INSTALL_DIR) $(1)/usr/include/ModemManager
  68. $(CP) $(PKG_INSTALL_DIR)/usr/include/ModemManager/*.h $(1)/usr/include/ModemManager
  69. $(INSTALL_DIR) $(1)/usr/include/libmm-glib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/include/libmm-glib/*.h $(1)/usr/include/libmm-glib
  71. $(INSTALL_DIR) $(1)/usr/lib
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so* $(1)/usr/lib
  73. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ModemManager.pc $(1)/usr/lib/pkgconfig
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mm-glib.pc $(1)/usr/lib/pkgconfig
  76. endef
  77. define Package/modemmanager/install
  78. $(INSTALL_DIR) $(1)/lib/udev/rules.d
  79. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/udev/rules.d/*.rules $(1)/lib/udev/rules.d
  80. $(INSTALL_DIR) $(1)/usr/sbin
  81. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so.* $(1)/usr/lib
  86. $(INSTALL_DIR) $(1)/usr/lib/ModemManager
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-shared-*.so* $(1)/usr/lib/ModemManager
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-plugin-*.so* $(1)/usr/lib/ModemManager
  89. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
  90. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf $(1)/etc/dbus-1/system.d
  91. $(INSTALL_DIR) $(1)/usr/share/dbus-1/system-services
  92. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service $(1)/usr/share/dbus-1/system-services
  93. $(INSTALL_DIR) $(1)/usr/share/ModemManager
  94. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager
  95. $(INSTALL_DATA) ./files/modemmanager.common $(1)/usr/share/ModemManager
  96. $(INSTALL_DIR) $(1)/etc/init.d
  97. $(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager
  98. $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
  99. $(INSTALL_DATA) ./files/25-modemmanager-usb $(1)/etc/hotplug.d/usb
  100. $(INSTALL_DIR) $(1)/etc/hotplug.d/net
  101. $(INSTALL_DATA) ./files/25-modemmanager-net $(1)/etc/hotplug.d/net
  102. $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
  103. $(INSTALL_DATA) ./files/25-modemmanager-tty $(1)/etc/hotplug.d/tty
  104. $(INSTALL_DIR) $(1)/lib/netifd/proto
  105. $(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh
  106. endef
  107. $(eval $(call BuildPackage,modemmanager))