summaryrefslogtreecommitdiff
path: root/init/modalias_handler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* create libmodprobe, integrate into first_stage_initSteve Muckle2019-06-181-131/+4
| | | | | | | | | | | Modprobe functionality is required both within first stage init and also as a standalone binary. Create a library for this using and extending the logic in modalias_handler.cpp. First stage init will attempt to load modules from /lib/modules. Bug: 129780532 Change-Id: Ie3582358fd839c2f64e1b386b30ed551a86aef5d
* init: replace Result<Success> with Result<void>Tom Cherry2019-06-101-9/+9
| | | | | | | | | | | Now that Result<T> is actually expected<T, ...>, and the expected proposal states expected<void, ...> as the way to indicate an expected object that returns either successfully with no object or an error, let's move init's Result<Success> to the preferred Result<void>. Bug: 132145659 Test: boot, init unit tests Change-Id: Ib2f98396d8e6e274f95a496fcdfd8341f77585ee
* Fix clang-tidy performance warnings in system/core.Chih-Hung Hsieh2018-09-171-1/+1
| | | | | | | | * Use more efficient overloaded string methods. Bug: 30411878 Test: build with WITH_TIDY=1 Change-Id: I449347565f83fae14ea337d0b3173beb5a56e0ca
* ueventd: require opt-in for modalias handlingTom Cherry2018-08-011-1/+1
| | | | | | | | | | | | | Some devices have modules.alias and modules.dep for modprobe and other purposes but do not want to opt into ueventd auto loading their modules. Therefore we add a flag that can be added to ueventd configuration files to opt into this behavior. Bug: 111916071 Bug: 112048758 Test: check that modules are loaded with this opt-in Test: check that modules are not loaded without this opt-in Change-Id: Ifb281b273059b4671eea1ca5bc726c9e79f3adfb
* ueventd: Add dynamic kernel module loadingAndrew F. Davis2018-07-261-0/+163
For some platforms it is not known at build time what devices will be attached at runtime. Building into the kernel or pre-loading at init all the modules that could be needed would unnecessary bloat the kernel. The solution is dynamic kernel module loading. The kernel will generate uevents when devices are added, userspace should monitor for these events and load the compatible modules. The init process already monitors for uevents, add here the ability to respond to modalias events and preform the correct action. Adding this to init is preferred over an external program as we can read and process the module alias and dependency files once, instead of for each module needing to be loaded. Test: Run on Beagle-X15, check all needed modules are loaded (lsmod) Change-Id: I1b57d9aeb0a9770f309207183dc4bc2b7b905f14 Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>