core: allow building and running without udev

Instead of relying on the udev daemon and GUDev to manage the devices reported
by the kernel, we can now run ModemManager relying solely on the kernel events
reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan'
option is implicit for the ModemManager daemon when udev is disabled in the
build.

Additionally, a new custom implementation of the kernel device object is
provided, which uses sysfs to load the properties and attributes required in
each kernel device, instead of using a GUdevDevice.

The udev rule files are kept in place, and a simple custom parser is provided
which preloads all rules in memory once and then applies them to the different
kernel objects reported via ReportKernelEvent(), e.g. to set port type hints.
A simple unit test setup is prepared to validate the udev rules during the
`check' Makefile target.
This commit is contained in:
Aleksander Morgado
2016-09-29 15:43:05 +02:00
parent ae9ede926a
commit 58c955f5f2
19 changed files with 1944 additions and 45 deletions
+3
View File
@@ -56,6 +56,7 @@ Makefile.in
/src/tests/test-at-serial-port
/src/tests/test-sms-part-3gpp
/src/tests/test-sms-part-cdma
/src/tests/test-udev-rules
/cli/mmcli
@@ -158,6 +159,7 @@ Makefile.in
/uml290/uml290mode
/plugins/test-suite.log
/plugins/test-udev-rules
/plugins/test-modem-helpers-huawei*
/plugins/test-modem-helpers-altair*
/plugins/test-modem-helpers-cinterion*
@@ -169,6 +171,7 @@ Makefile.in
/test/lsudev
/test/mmtty
/test/mmrules
/ModemManager-*-coverage.info
/ModemManager-*-coverage/