android_system_core/libmodprobe
Grzegorz Jaszczyk 3063d84e9c libmodprobe: add support for dynamic module options
Hitherto libmodprobe was supporting modules.options which allows passing
extra module options. This commit extends that support and beside
`options`, modules.options can now contain `dyn_options` entries.

Syntax example:
dyn_options snd_sof_pci system "/vendor/bin/mod_options --sof-fw"

This allows to determine extra module options, with help of external
program, at runtime which can be useful for unibuilds, supporting
various device flavors and therefore requiring different module options.

Using external program to customize modules parameters are inspired by
Android's external firmware handler:
https://android.googlesource.com/platform/system/core/+/master/init/README.ueventd.md#firmware-loading
and the same RunExternalHandler is reused for both dynamic module
handling and firmware handling.

Bug: 335619610
Test: Test audio on systems using snd_sof_pci module and verify
correctness of custom module parameters.

Change-Id: Ibd1a942d4ea022519676435ed525cd7c3e720d31
2024-10-25 09:27:45 +00:00
..
include libmodprobe: add support for dynamic module options 2024-10-25 09:27:45 +00:00
Android.bp firmware_handler: extract part responsible for running ext program to lib 2024-10-25 09:27:43 +00:00
exthandler.cpp firmware_handler: extract part responsible for running ext program to lib 2024-10-25 09:27:43 +00:00
libmodprobe.cpp libmodprobe: add support for dynamic module options 2024-10-25 09:27:45 +00:00
libmodprobe_ext.cpp Improve error message of libmodprobe 2023-06-27 13:53:43 -07:00
libmodprobe_ext_test.cpp modprobe: Use more inclusive language for modprobe and libmodprobe 2020-06-15 12:51:38 -07:00
libmodprobe_test.cpp Load kernel modules in parallel 2022-03-18 08:06:07 +00:00
libmodprobe_test.h libmodprobe: parse kernel command line for module options 2019-12-27 13:39:23 -08:00
OWNERS Update libmodprobe's OWNERS. 2021-03-23 17:53:08 -07:00
TEST_MAPPING Add libmodprobe to hwasan-postsubmit 2022-03-18 21:48:29 +00:00