From 42fb9d8fc5e1bc0591a279a23f166f460bcc8c90 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sat, 4 Jan 2014 16:58:59 -0800 Subject: [PATCH] cm: Remove legacy compcache stuff * Remove all this stuff. If a device wants ZRAM, it should be enabled by the maintainer and properly configured and tuned. * This stuff currently causes a conflict with the ZRAM support added in Kitkat. Kill it. Change-Id: Ib2488ea4463e32ec44b65fe786f732145b5b6e23 --- config/common.mk | 5 --- prebuilt/common/bin/compcache | 53 ---------------------------- prebuilt/common/bin/handle_compcache | 31 ---------------- prebuilt/common/etc/init.local.rc | 7 ---- 4 files changed, 96 deletions(-) delete mode 100644 prebuilt/common/bin/compcache delete mode 100644 prebuilt/common/bin/handle_compcache diff --git a/config/common.mk b/config/common.mk index 53b321ad..64e0d3c4 100644 --- a/config/common.mk +++ b/config/common.mk @@ -97,11 +97,6 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ vendor/cm/prebuilt/common/etc/init.local.rc:root/init.cm.rc -# Compcache/Zram support -PRODUCT_COPY_FILES += \ - vendor/cm/prebuilt/common/bin/compcache:system/bin/compcache \ - vendor/cm/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache - # Bring in camera effects PRODUCT_COPY_FILES += \ vendor/cm/prebuilt/common/media/LMprec_508.emd:system/media/LMprec_508.emd \ diff --git a/prebuilt/common/bin/compcache b/prebuilt/common/bin/compcache deleted file mode 100644 index bb3a3495..00000000 --- a/prebuilt/common/bin/compcache +++ /dev/null @@ -1,53 +0,0 @@ -#!/system/bin/sh -# -# Compcache manager -# shade@chemlab.org (cyanogen) -# - -isramzswap="$(find /system/lib/modules/ -name ramzswap.ko 2>/dev/null)" -isramzswapbuiltin="$(ls -l /dev/block/ramzswap0 2>/dev/null)" - -if [ -n "$isramzswap$isramzswapbuiltin" ] ; then - MODULE=ramzswap - DEV=/dev/block/ramzswap0 -else - DEV=/dev/block/zram0 - MODULE=zram - SYSFS_PATH=/sys/block/zram0 -fi - -case "$1" in - start) - echo 3 > /proc/sys/vm/drop_caches - echo 30 > /proc/sys/vm/swappiness - modprobe $MODULE - if [ $MODULE = ramzswap ]; then - rzscontrol $DEV --disksize_kb=$2 --init - else - echo "$(($2 * 1024))" > $SYSFS_PATH/disksize - mkswap $DEV >/dev/null - fi - swapon $DEV - ;; - - stop) - swapoff $DEV >/dev/null 2>&1 - rmmod $MODULE >/dev/null 2>&1 - ;; - stats) - if [ $MODULE = ramzswap ]; then - rzscontrol $DEV --stats - else - cd $SYSFS_PATH && for i in * ; do - echo -n "$i:" - cat $i - done - fi - ;; - *) - echo "Usage: $0 {start |stop|stats}" - exit 1 -esac - -exit 0 - diff --git a/prebuilt/common/bin/handle_compcache b/prebuilt/common/bin/handle_compcache deleted file mode 100644 index 21822d0f..00000000 --- a/prebuilt/common/bin/handle_compcache +++ /dev/null @@ -1,31 +0,0 @@ -#!/system/bin/sh -# -# Compcache handler -# Decides whether or not Compcache is enabled -# -MEMTOTAL=$( awk '{ if ($1 eq "MemTotal:") print $2 ;exit }'