cm: init.rc: Fix compcache and cleanup init file
The "import" keyword is only parsed once, for a one shot execution, during the initial section setup, and before running "on fs". Having an import of a file that's located in a filesystem other than root will result in an error like <3> init: could not import file '/system/etc/init.local.rc' from '/init.rc' So... any files imported into init need to be moved to the root fs. While we're at it, move init.rc changes that are specific to CM (and don't involve modification of preexisting configs) into this file, to ease future upstream merges (and minimize breakage on devices that override init.rc with their own variants) Needs to be paired with the corresponding system/core patch Change-Id: Iab6340db2e28ef19dbcd84ae5c71737ce0cd491f
This commit is contained in:
parent
62cb5a8dda
commit
8f412cb14a
@ -85,9 +85,12 @@ PRODUCT_COPY_FILES += \
|
|||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
|
vendor/cm/prebuilt/common/etc/init.d/90userinit:system/etc/init.d/90userinit
|
||||||
|
|
||||||
|
# CM-specific init file
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc
|
||||||
|
|
||||||
# Compcache/Zram support
|
# Compcache/Zram support
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
vendor/cm/prebuilt/common/etc/init.local.rc:system/etc/init.local.rc \
|
|
||||||
vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
|
vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \
|
||||||
vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
|
vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache
|
||||||
|
|
||||||
|
@ -1,7 +1,40 @@
|
|||||||
# CyanogenMod Extras
|
# CyanogenMod Extras
|
||||||
|
|
||||||
|
on init
|
||||||
|
export ANDROID_CACHE /cache
|
||||||
|
export TERMINFO /system/etc/terminfo
|
||||||
|
export TERM linux
|
||||||
|
|
||||||
|
on post-fs-data
|
||||||
|
mkdir /cache/dalvik-cache 0771 system system
|
||||||
|
chown system system /cache/dalvik-cache
|
||||||
|
chmod 0771 /cache/dalvik-cache
|
||||||
|
|
||||||
|
on boot
|
||||||
|
chown system system /sys/block/mmcblk0/queue/scheduler
|
||||||
|
chmod 0664 /sys/block/mmcblk0/queue/scheduler
|
||||||
|
|
||||||
|
# allow system to modify ksm control files
|
||||||
|
chown root system /sys/kernel/mm/ksm/pages_to_scan
|
||||||
|
chmod 0664 /sys/kernel/mm/ksm/pages_to_scan
|
||||||
|
chown root system /sys/kernel/mm/ksm/sleep_millisecs
|
||||||
|
chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs
|
||||||
|
chown root system /sys/kernel/mm/ksm/run
|
||||||
|
chmod 0664 /sys/kernel/mm/ksm/run
|
||||||
|
write /sys/kernel/mm/ksm/sleep_millisecs 1500
|
||||||
|
write /sys/kernel/mm/ksm/pages_to_scan 256
|
||||||
|
|
||||||
|
# adb over network
|
||||||
|
on property:service.adb.tcp.port=5555
|
||||||
|
stop adbd
|
||||||
|
start adbd
|
||||||
|
on property:service.adb.tcp.port=-1
|
||||||
|
stop adbd
|
||||||
|
start adbd
|
||||||
|
|
||||||
# Compcache - handle at boot
|
# Compcache - handle at boot
|
||||||
service compcache /system/bin/handle_compcache
|
service compcache /system/bin/handle_compcache
|
||||||
|
class main
|
||||||
user root
|
user root
|
||||||
group root
|
group root
|
||||||
oneshot
|
oneshot
|
||||||
|
Loading…
Reference in New Issue
Block a user