sdm660-common: add qcom early boot script
* to control power off alarm feature Change-Id: I0d2f5b96f8604d459130aec5f20f87cc75c7bad0
This commit is contained in:
parent
3c2614ac95
commit
6c2913c9b8
4 changed files with 48 additions and 1 deletions
|
@ -10,6 +10,15 @@ LOCAL_MODULE_CLASS := ETC
|
|||
LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.early_boot.sh
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.early_boot.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
36
rootdir/bin/init.qcom.early_boot.sh
Normal file
36
rootdir/bin/init.qcom.early_boot.sh
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012-2013,2016,2018 The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
boot_reason=`cat /proc/sys/kernel/boot_reason`
|
||||
reboot_reason=`getprop ro.boot.alarmboot`
|
||||
if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
|
||||
setprop ro.vendor.alarm_boot true
|
||||
else
|
||||
setprop ro.vendor.alarm_boot false
|
||||
fi
|
|
@ -84,6 +84,7 @@ on early-boot
|
|||
write /sys/kernel/boot_cdsp/boot 1
|
||||
write /sys/devices/virtual/npu/msm_npu/boot 1
|
||||
write /sys/kernel/boot_slpi/boot 1
|
||||
exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
|
||||
setprop ro.alarm_boot false
|
||||
|
||||
# SSR Setup
|
||||
|
|
|
@ -296,6 +296,7 @@ PRODUCT_PACKAGES += \
|
|||
init.goodix.sh \
|
||||
init.msm.usb.configfs.rc \
|
||||
init.qcom.post_boot.sh \
|
||||
init.qcom.early_boot.sh \
|
||||
init.qcom.rc \
|
||||
init.qcom.sh \
|
||||
init.qcom.usb.rc \
|
||||
|
@ -313,7 +314,7 @@ PRODUCT_PACKAGES += \
|
|||
libqcomfm_jni \
|
||||
qcom.fmradio \
|
||||
qcom.fmradio.xml
|
||||
|
||||
|
||||
PRODUCT_BOOT_JARS += \
|
||||
qcom.fmradio
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue