Previously, we ran modprobe command for every .ko file listed in
init.insmod.*.cfg. Let's move to a different approach where we call
modprobe with the following command line.
modprobe -b --all=/vendor/lib/modules/modules.load
This will insmod all modules listed in modules.load except for those
that are mentioned in the blocklist at
/vendor/lib/modules/modules.blocklist
A common reason for a module to be on the blocklist is that it must only
be loaded under a certain condition like when a specific service is
launched.
Bug: 190652328
Change-Id: I37dfc83cbc90534243765f6985bc53f3fa83aef0
modprobe is smarter about locating .ko files if they are stored in
subdirectories. For example, it finds heatmap.ko regardless of whether
it's stored in /vendor/lib/modules/heatmap.ko or
/vendor/lib/modules/extra/heatmap.ko. modprobe also loads all
dependencies automatically. Let's migrate from insmod to modprobe.
Bug: 185184472
Change-Id: I810709b8053f3bf3bbec18bcaa37780289388e07