diff options
| author | Georg Veichtlbauer <georg@vware.at> | 2023-05-14 20:46:00 +0200 |
|---|---|---|
| committer | Georg Veichtlbauer <georg@vware.at> | 2023-05-22 09:26:48 +0200 |
| commit | 240c12b591e730644e6f023a689f49a5a8cd0a89 (patch) | |
| tree | 8851806acd6c903cf7fb7d1d97b42dbcd18a9fda | |
| parent | a1902f5c88a2cfdf8eccbc977d15d74c6ff96352 (diff) | |
msm8998-common: Import init.gbmods.sh
From beckham, commit a26b214.
Change-Id: I9e160f6605b3e2e95a529fe2ff335d4bc03a6e74
| -rw-r--r-- | rootdir/Android.mk | 8 | ||||
| -rwxr-xr-x | rootdir/bin/init.gbmods.sh | 30 |
2 files changed, 38 insertions, 0 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk index a07077ac..26cc2c3f 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -38,6 +38,14 @@ LOCAL_VENDOR_MODULE := true include $(BUILD_PREBUILT) include $(CLEAR_VARS) +LOCAL_MODULE := init.gbmods.sh +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_SRC_FILES := bin/init.gbmods.sh +LOCAL_VENDOR_MODULE := true +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) LOCAL_MODULE := init.mmi.usb.sh LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := EXECUTABLES diff --git a/rootdir/bin/init.gbmods.sh b/rootdir/bin/init.gbmods.sh new file mode 100755 index 00000000..bfa08de8 --- /dev/null +++ b/rootdir/bin/init.gbmods.sh @@ -0,0 +1,30 @@ +#!/vendor/bin/sh + +debug=$(getprop ro.boot.gbdebug 2> /dev/null) +bootmode=$(getprop ro.bootmode 2> /dev/null) + +# If androidboot.gbdebug is set on command line, skip inserting +# the pre-installed modules. +if [ "$debug" == "1" ]; then + return 0 +fi + +insmod /vendor/lib/modules/greybus.ko + +# Only support PTP and BATTERY in charge-only mode +if [ "$bootmode" == "charger" ]; then + insmod /vendor/lib/modules/gb-mods.ko + insmod /vendor/lib/modules/gb-battery.ko + insmod /vendor/lib/modules/gb-ptp.ko + + return 0 +fi + +gbmods="/vendor/lib/modules/gb-*" +for mod in $gbmods +do + insmod $mod +done + +insmod /vendor/lib/modules/v4l2-hal.ko +#start vendor.mods_camd |
