diff options
-rwxr-xr-x | device.mk | 4 | ||||
-rw-r--r-- | rootdir/Android.mk | 11 | ||||
-rw-r--r-- | rootdir/etc/init.zuk.rc | 44 |
3 files changed, 59 insertions, 0 deletions
@@ -36,5 +36,9 @@ DEVICE_PACKAGE_OVERLAYS += \ $(LOCAL_PATH)/overlay \ $(LOCAL_PATH)/overlay-lineage +# Ramdisk +PRODUCT_PACKAGES += \ + init.zuk.rc + # Vendor properties -include $(LOCAL_PATH)/vendor_prop.mk diff --git a/rootdir/Android.mk b/rootdir/Android.mk new file mode 100644 index 0000000..4ef5400 --- /dev/null +++ b/rootdir/Android.mk @@ -0,0 +1,11 @@ +LOCAL_PATH:= $(call my-dir) + +# Device specific init script + +include $(CLEAR_VARS) +LOCAL_MODULE := init.zuk.rc +LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/init.zuk.rc +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw +include $(BUILD_PREBUILT) diff --git a/rootdir/etc/init.zuk.rc b/rootdir/etc/init.zuk.rc new file mode 100644 index 0000000..8349e05 --- /dev/null +++ b/rootdir/etc/init.zuk.rc @@ -0,0 +1,44 @@ +# Copyright (c) 2019, 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. +# + +on init + # Disable MMC powersaving + write /sys/devices/soc/${ro.boot.bootdevice}/mmc_host/mmc0/clk_scaling/enable 0 + write /sys/devices/soc/74a4900.sdhci/mmc_host/mmc1/clk_scaling/enable 0 + write /sys/devices/soc/${ro.boot.bootdevice}/pm_qos_irq_enable 0 + +on charger + # Enable MMC powersaving + write /sys/devices/soc/${ro.boot.bootdevice}/mmc_host/mmc0/clk_scaling/enable 1 + write /sys/devices/soc/74a4900.sdhci/mmc_host/mmc1/clk_scaling/enable 1 + write /sys/devices/soc/${ro.boot.bootdevice}/pm_qos_irq_enable 1 + +on sys.post_boot.parsed=1 + # Enable MMC powersaving + write /sys/devices/soc/${ro.boot.bootdevice}/mmc_host/mmc0/clk_scaling/enable 1 + write /sys/devices/soc/74a4900.sdhci/mmc_host/mmc1/clk_scaling/enable 1 + write /sys/devices/soc/${ro.boot.bootdevice}/pm_qos_irq_enable 1 |