Use modprobe --all to load all modules in modules.load
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
This commit is contained in:
parent
71bf42f42d
commit
fe798d9f4f
2 changed files with 9 additions and 21 deletions
|
@ -7,25 +7,6 @@
|
|||
# Load common kernel modules
|
||||
# Modules here will be loaded *before* device specific modules
|
||||
install_display_drivers
|
||||
modprobe|mailbox-wc.ko
|
||||
modprobe|aoc_core.ko
|
||||
modprobe|aoc_channel_dev.ko
|
||||
modprobe|aoc_control_dev.ko
|
||||
modprobe|snd-soc-wm-adsp.ko
|
||||
modprobe|snd-soc-cs35l41.ko
|
||||
modprobe|aoc_char_dev.ko
|
||||
modprobe|aoc_usb_driver.ko
|
||||
modprobe|heatmap.ko
|
||||
modprobe|gsa.ko
|
||||
modprobe|gsa_gsc.ko
|
||||
modprobe|abrolhos.ko
|
||||
modprobe|haptics-cs40l2x.ko
|
||||
modprobe|snd_soc_cs40l2x.ko
|
||||
modprobe|slg51000-core.ko
|
||||
modprobe|slg51000-regulator.ko
|
||||
modprobe|pinctrl-slg51000.ko
|
||||
modprobe|lwis.ko
|
||||
modprobe|stmvl53l1.ko
|
||||
modprobe|st21nfc.ko
|
||||
modprobe|-b *
|
||||
# All common modules loaded
|
||||
setprop|vendor.common.modules.ready
|
||||
|
|
|
@ -61,7 +61,14 @@ if [ -f $cfg_file ]; then
|
|||
"insmod") insmod $arg ;;
|
||||
"setprop") setprop $arg 1 ;;
|
||||
"enable") echo 1 > $arg ;;
|
||||
"modprobe") modprobe -a -d "${modules_dir}" $arg ;;
|
||||
"modprobe")
|
||||
case ${arg} in
|
||||
"-b *" | "-b")
|
||||
arg="-b --all=${modules_dir}/modules.load" ;;
|
||||
"*" | "")
|
||||
arg="--all=${modules_dir}/modules.load" ;;
|
||||
esac
|
||||
modprobe -a -d "${modules_dir}" $arg ;;
|
||||
"wait") wait_for_file $arg ;;
|
||||
"install_display_drivers") install_display_drivers ;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue