Snap for 9039357 from 876031a635
to udc-release
Change-Id: I870bf626f0ebe70ce1dcef777bfcd1a64de34e1c
This commit is contained in:
commit
0fd217b8da
6 changed files with 27 additions and 129 deletions
|
@ -240,7 +240,7 @@ on init
|
|||
chown system system /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom
|
||||
|
||||
# Loading common kernel modules in background
|
||||
start insmod_sh_common
|
||||
start init_display
|
||||
|
||||
# Charge stats (write 0)
|
||||
chown system system /sys/class/power_supply/battery/charge_stats
|
||||
|
@ -848,7 +848,7 @@ on property:persist.sys.test_harness=1 && property:persist.vendor.testing_batte
|
|||
on property:ro.debuggable=1
|
||||
write /sys/module/scsi_mod/parameters/scsi_logging_level 63
|
||||
|
||||
service insmod_sh_common /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.gs201.cfg
|
||||
service init_display /vendor/bin/init.display.sh
|
||||
class main
|
||||
user root
|
||||
group root system
|
||||
|
|
|
@ -325,11 +325,9 @@ PRODUCT_COPY_FILES += \
|
|||
|
||||
# Shell scripts
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/gs201/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \
|
||||
device/google/gs201/init.display.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.display.sh \
|
||||
|
||||
# insmod files
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/gs201/init.insmod.gs201.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.gs201.cfg
|
||||
include device/google/gs-common/insmod/insmod.mk
|
||||
|
||||
# For creating dtbo image
|
||||
PRODUCT_HOST_PACKAGES += \
|
||||
|
@ -1180,7 +1178,7 @@ PRODUCT_PACKAGES_DEBUG += BatteryStatsViewer
|
|||
# Install product specific framework compatibility matrix
|
||||
# (TODO: b/169535506) This includes the FCM for system_ext and product partition.
|
||||
# It must be split into the FCM of each partition.
|
||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE := device/google/gs201/device_framework_matrix_product.xml
|
||||
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs201/device_framework_matrix_product.xml
|
||||
|
||||
# Preopt SystemUI
|
||||
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUIGoogle # For internal
|
||||
|
|
|
@ -126,38 +126,6 @@
|
|||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>hardware.google.bluetooth.bt_channel_avoidance</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IBTChannelAvoidance</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>hardware.google.bluetooth.sar</name>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IBluetoothSar</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>hardware.google.bluetooth.ext</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IBluetoothExt</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>hardware.google.bluetooth.ewp</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IBluetoothEwp</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>vendor.google.google_battery</name>
|
||||
<version>1</version>
|
||||
|
|
22
init.display.sh
Executable file
22
init.display.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/vendor/bin/sh
|
||||
modules_dir=
|
||||
|
||||
for f in /vendor/lib/modules/*/modules.dep /vendor/lib/modules/modules.dep; do
|
||||
if [[ -f "$f" ]]; then
|
||||
modules_dir="$(dirname "$f")"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z "${modules_dir}" ]]; then
|
||||
echo "Unable to locate kernel modules directory" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
panel_drv=`getprop ro.boot.primary_panel_drv`
|
||||
if [[ -z "$panel_drv" ]]; then
|
||||
panel_drv="panel-samsung-emul"
|
||||
fi
|
||||
modprobe -d "${modules_dir}" exynos-drm.ko
|
||||
modprobe -d "${modules_dir}" $panel_drv.ko
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
####################################################
|
||||
# init.insmod.common.cfg #
|
||||
# This file contains common kernel modules to load #
|
||||
# at init time by init.insmod.sh script #
|
||||
####################################################
|
||||
|
||||
# Load common kernel modules
|
||||
# Modules here will be loaded *before* device specific modules
|
||||
install_display_drivers
|
||||
modprobe|-b *
|
||||
# All common modules loaded
|
||||
setprop|vendor.common.modules.ready
|
|
@ -1,78 +0,0 @@
|
|||
#!/vendor/bin/sh
|
||||
|
||||
#############################################################
|
||||
### init.insmod.cfg format: ###
|
||||
### ----------------------------------------------------- ###
|
||||
### [insmod|setprop|enable/moprobe|wait] [path|prop name] ###
|
||||
### ... ###
|
||||
#############################################################
|
||||
|
||||
modules_dir=
|
||||
|
||||
for f in /vendor/lib/modules/*/modules.dep /vendor/lib/modules/modules.dep; do
|
||||
if [[ -f "$f" ]]; then
|
||||
modules_dir="$(dirname "$f")"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z "${modules_dir}" ]]; then
|
||||
echo "Unable to locate kernel modules directory" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# imitates wait_for_file() in init
|
||||
wait_for_file()
|
||||
{
|
||||
filename="${1}"
|
||||
timeout="${2:-5}"
|
||||
|
||||
expiry=$(($(date "+%s")+timeout))
|
||||
while [[ ! -e "${filename}" ]] && [[ "$(date "+%s")" -le "${expiry}" ]]
|
||||
do
|
||||
sleep 0.01
|
||||
done
|
||||
}
|
||||
|
||||
install_display_drivers()
|
||||
{
|
||||
panel_drv=`getprop ro.boot.primary_panel_drv`
|
||||
if [[ -z "$panel_drv" ]]; then
|
||||
panel_drv="panel-samsung-emul"
|
||||
fi
|
||||
modprobe -d "${modules_dir}" exynos-drm.ko
|
||||
modprobe -d "${modules_dir}" $panel_drv.ko
|
||||
}
|
||||
|
||||
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
|
||||
setprop vendor.all.modules.ready
|
||||
setprop vendor.all.devices.ready
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $cfg_file ]; then
|
||||
while IFS="|" read -r action arg
|
||||
do
|
||||
case $action in
|
||||
"insmod") insmod $arg ;;
|
||||
"setprop") setprop $arg 1 ;;
|
||||
"enable") echo 1 > $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
|
||||
done < $cfg_file
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue