mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Integrates the modem management subsystem, donated by Avvero Pty Ltd,
adapted to work on any platform without proprietary hardware (simctrl,
modules.json, /sys/class/sim/).
Components:
- package/feature-modem: Buildroot feature package pulling in modemd,
ModemManager, libmbim, libqmi, and USB serial/MBIM/QMI kernel drivers
- package/modemd: Buildroot package for the modemd daemon and helpers
- src/modemd: modem management daemon — detects modems via ModemManager,
connects bearers, configures IP addresses, handles SMS and location
- src/confd/src/modem.c: confd plugin — enables/disables modemd and
modem-manager via sysrepo, forwards RPCs (restart/reset/send-sms)
- src/confd/src/interfaces.{c,h}: IFT_MODEM type for wwan* interfaces;
confd manages address/route assignment, modem daemon owns link state
- src/confd/yang/confd/infix-modem.yang: YANG model for modem config and
operational state (bearers, APN, bands, modes, location, SMS)
- src/statd/python/yanger/infix_modem.py: operational state collector
- patches/modem-manager: upstream patches for udev install path,
multiplexed interface naming, and MBIM port trust from udev hint
(the last fixes Dell DW5811e / Sierra EM7455 on cold boot)
- patches/libqmi: ignore sysfs in download mode
Platform portability fixes for boards without simctrl hardware:
- modem-info: fall back to /run/modems.json when /run/modules.json is
absent; discover wwan interfaces via sysfs scan; provide synthetic SIM
entry when /sys/class/sim/ is not present; fix dbg() to respect flag
- modemd: make --set-allowed-modes=any best-effort (some modems only
support one mode combination and reject any change); skip mode set
when current mode already matches requested mode
- sim-setup: guard simctrl open, return None when modules.json absent
to skip SIM slot switching entirely on non-simctrl hardware
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
45 lines
2.1 KiB
Makefile
45 lines
2.1 KiB
Makefile
################################################################################
|
|
#
|
|
# modemd
|
|
#
|
|
################################################################################
|
|
|
|
MODEMD_VERSION = 1.0
|
|
MODEMD_SITE_METHOD = local
|
|
MODEMD_SITE = $(BR2_EXTERNAL_INFIX_PATH)/src/modemd
|
|
MODEMD_LICENSE = BSD-3-Clause
|
|
MODEMD_LICENSE_FILES = LICENSE
|
|
MODEMD_REDISTRIBUTE = NO
|
|
MODEMD_DEPENDENCIES = modem-manager jansson python3
|
|
|
|
define MODEMD_BUILD_CMDS
|
|
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
|
|
$(MODEMD_DIR)/modem-command.c -o $(MODEMD_DIR)/modem-command -ljansson
|
|
endef
|
|
|
|
define MODEMD_INSTALL_TARGET_CMDS
|
|
mkdir -p $(TARGET_DIR)/usr/libexec/modemd
|
|
mkdir -p $(TARGET_DIR)/lib/udev/rules.d
|
|
mkdir -p $(FINIT_D)/available/
|
|
mkdir -p $(TARGET_DIR)/sbin
|
|
$(INSTALL) -D -m 0644 $(MODEMD_DIR)/finit.conf $(FINIT_D)/available/modemd.conf
|
|
install -m 644 $(MODEMD_DIR)/modemd.rules $(TARGET_DIR)/lib/udev/rules.d/90-modemd.rules
|
|
install -m 644 $(MODEMD_DIR)/qmi-wwan-ids.rules $(TARGET_DIR)/lib/udev/rules.d/91-qmi-wwan-ids.rules
|
|
install -m 644 $(MODEMD_DIR)/77-mm-dell-port-types.rules $(TARGET_DIR)/etc/udev/rules.d/77-mm-dell-port-types.rules
|
|
install -D -m 644 $(MODEMD_DIR)/modemd.modules-load $(TARGET_DIR)/etc/modules-load.d/modemd.conf
|
|
install -m 755 $(MODEMD_DIR)/modem-udev $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modemd $(TARGET_DIR)/sbin/modemd
|
|
install -m 755 $(MODEMD_DIR)/modem-command $(TARGET_DIR)/sbin/modem-command
|
|
install -m 755 $(MODEMD_DIR)/modem-info $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-rpc $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-sms $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-scan-networks $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-update-firmware $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-ussd $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-carrier $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/modem-power $(TARGET_DIR)/usr/libexec/modemd/
|
|
install -m 755 $(MODEMD_DIR)/sim-setup $(TARGET_DIR)/usr/libexec/modemd/
|
|
endef
|
|
|
|
$(eval $(generic-package))
|