a55x: Initial vendor import
Change-Id: Ie27bd6e2a7fa32e6835908c8475e0319ef5ce673 Signed-off-by: fiqys <elsifycritic@gmail.com>
This commit is contained in:
commit
46d4303054
268 files changed
+35140
No files matched your search
+38
@@ -0,0 +1,38 @@
|
||||
#! /vendor/bin/sh
|
||||
|
||||
SILENT_LOGGING_9900=/data/vendor/gps/silentGnssLogging
|
||||
SILENT_LOGGING_ISSUETRACKER=/data/vendor/gps/silentGnssLoggingIssueTracker
|
||||
|
||||
PRODUCT_NAME=`getprop ro.vendor.gnss.variant`
|
||||
DAEMONFILE=/vendor/bin/hw/gpsd_K44
|
||||
FIRMWAREFILE=/vendor/firmware/gnss/firmware_signed_$PRODUCT_NAME.bin
|
||||
|
||||
if [[ $PRODUCT_NAME == *"kdi"* ]] ; then
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.kdi.cfg
|
||||
elif [[ $PRODUCT_NAME == *"dcm"* ]] ; then
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.dcm.cfg
|
||||
else
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.cfg
|
||||
fi
|
||||
|
||||
if [ -d "$SILENT_LOGGING_ISSUETRACKER" ] ; then
|
||||
if [[ $PRODUCT_NAME == *"kdi"* ]] ; then
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.kdi.issuetracker.cfg
|
||||
elif [[ $PRODUCT_NAME == *"dcm"* ]] ; then
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.dcm.issuetracker.cfg
|
||||
else
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.issuetracker.cfg
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$SILENT_LOGGING_9900" ] ; then
|
||||
if [[ $PRODUCT_NAME == *"kdi"* ]] ; then
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.kdi.debug.cfg
|
||||
elif [[ $PRODUCT_NAME == *"dcm"* ]] ; then
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.dcm.debug.cfg
|
||||
else
|
||||
CONFIGFILE=/vendor/etc/gnss/gps.debug.cfg
|
||||
fi
|
||||
fi
|
||||
|
||||
exec $DAEMONFILE -c $CONFIGFILE -b $FIRMWAREFILE
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+76
@@ -0,0 +1,76 @@
|
||||
#!/vendor/bin/sh
|
||||
|
||||
#########################################################
|
||||
### init.insmod.cfg format: ###
|
||||
### ------------------------------------------------ ###
|
||||
### [insmod|setprop|enable/modprobe] [path|prop name] ###
|
||||
### ... ###
|
||||
#########################################################
|
||||
|
||||
function get_module_dir()
|
||||
{
|
||||
local type=$1
|
||||
modules_dir=
|
||||
for f in /${type}/lib/modules/*/modules.dep /${type}/lib/modules/modules.dep /${type}_dlkm/lib/modules/*/modules.dep; do
|
||||
if [[ -f "$f" ]]; then
|
||||
modules_dir="$(dirname "$f")"
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo "${modules_dir}"
|
||||
}
|
||||
|
||||
if [ $# -eq 1 ]; then
|
||||
cfg_file=$1
|
||||
else
|
||||
# Set property even if there is no insmod config
|
||||
# to unblock early-boot trigger
|
||||
setprop vendor.common.modules.ready
|
||||
setprop vendor.device.modules.ready
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$cfg_file" == "system_dlkm" ]; then
|
||||
modules_dir=$(get_module_dir system)
|
||||
if [[ -z "${modules_dir}" ]]; then
|
||||
echo "Unable to locate kernel modules directory" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
echo "modules_dir is ${modules_dir}" 2>&1
|
||||
modprobe -s -a -d "${modules_dir}" --all=${modules_dir}/modules.load
|
||||
if [ $? -eq 0 ]; then
|
||||
setprop vendor.system_dlkm.modules.ready true
|
||||
fi
|
||||
elif [ "$cfg_file" == "vendor_dlkm" ]; then
|
||||
modules_dir=$(get_module_dir vendor)
|
||||
if [[ -z "${modules_dir}" ]]; then
|
||||
echo "Unable to locate kernel modules directory" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
echo "modules_dir is ${modules_dir}" 2>&1
|
||||
modprobe -s -a -d "${modules_dir}" --all=${modules_dir}/modules.load
|
||||
if [ $? -eq 0 ]; then
|
||||
setprop vendor.vendor_dlkm.modules.ready true
|
||||
else
|
||||
echo "modprobe failed! Loading modules using insmod"
|
||||
vendor_dlkm_cfg="/vendor/etc/init.insmod.vendor_dlkm.cfg"
|
||||
if [ ! -f $vendor_dlkm_cfg ]; then
|
||||
echo "$vendor_dlkm_cfg not found!"
|
||||
exit 1
|
||||
fi
|
||||
for m in $(cat ${vendor_dlkm_cfg}); do
|
||||
insmod ${modules_dir}/$(basename $m)
|
||||
done
|
||||
fi
|
||||
elif [ -f $cfg_file ]; then
|
||||
modules_dir=$(get_module_dir vendor)
|
||||
while IFS="|" read -r action arg
|
||||
do
|
||||
case $action in
|
||||
"insmod") insmod $arg ;;
|
||||
"setprop") setprop $arg 1 ;;
|
||||
"enable") echo 1 > $arg ;;
|
||||
"modprobe") modprobe -s -a -d "${modules_dir}" $arg ;;
|
||||
esac
|
||||
done < $cfg_file
|
||||
fi
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in new issue
Block a user