sm8350-common: Update init scripts from OOS 11.2.5.5
Change-Id: Ia4e798ae3c5cbdb7246669b833c75e7058efa523
This commit is contained in:
parent
7c98da93ba
commit
b2e66f9cc7
27 changed files with 2040 additions and 665 deletions
43
rootdir/bin/vendor_modprobe.sh
Executable file
43
rootdir/bin/vendor_modprobe.sh
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
#! /vendor/bin/sh
|
||||
#=============================================================================
|
||||
# Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Qualcomm Technologies, Inc.
|
||||
#=============================================================================
|
||||
|
||||
#default to /vendor/lib/modules
|
||||
MODULES_PATH="/vendor/lib/modules/"
|
||||
GKI_MOD_PATH="/vendor/lib/modules/5.4-gki"
|
||||
|
||||
MODPROBE="/vendor/bin/modprobe"
|
||||
MODULES=`${MODPROBE} -d ${MODULES_PATH} -l`
|
||||
|
||||
# insmod op_cmdline before other modules
|
||||
CMD_LINE=`cat /proc/cmdline`
|
||||
${MODPROBE} -a -b -d ${MODULES_PATH} op_cmdline.ko op_cmdline="\"${CMD_LINE}\""
|
||||
${MODPROBE} -a -b -d ${GKI_MOD_PATH} op_cmdline.ko op_cmdline="\"${CMD_LINE}\""
|
||||
|
||||
# Find the first non-blacklisted module and try
|
||||
# inserting it. If insertion fails the module is not
|
||||
# compatible with the current kernel. Change the modules
|
||||
# directory to gki.
|
||||
for MODULE in ${MODULES}; do
|
||||
cat ${MODULES_PATH}/modules.blocklist | grep $MODULE
|
||||
if [ $? -ne 0 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
${MODPROBE} -a -b -d ${MODULES_PATH} ${MODULE}
|
||||
if [ $? -ne 0 ];then
|
||||
MODULES_PATH=$GKI_MOD_PATH
|
||||
MODULES=`${MODPROBE} -d ${MODULES_PATH} -l`
|
||||
fi
|
||||
|
||||
# Iterate over module list and modprobe them in background.
|
||||
for MODULE in ${MODULES}; do
|
||||
${MODPROBE} -a -b -d ${MODULES_PATH} ${MODULE} &
|
||||
done
|
||||
|
||||
# Wait until all the modprobes are finished
|
||||
wait
|
||||
Loading…
Add table
Add a link
Reference in a new issue