From 48331e578ddfb3380b123dece0c23b4d35d772a2 Mon Sep 17 00:00:00 2001 From: Vaughn Newman Date: Tue, 18 Mar 2014 22:19:30 -0400 Subject: [PATCH 1/6] zRAM only read one page at a time Change-Id: Iea25796e6a0bc0024552a838e22e2368e8ed6f7c --- init.aries.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.aries.rc b/init.aries.rc index cbff55a..6a58895 100644 --- a/init.aries.rc +++ b/init.aries.rc @@ -375,6 +375,9 @@ on post-fs # trigger governor change uevent write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive +# zRAM only read one page at a time + write /proc/sys/vm/page-cluster 0 + on post-fs-data # for migrating download provider's cache out of the small /data/data From 96c2317c632c2d37e560eef485ea0c9a44341ed9 Mon Sep 17 00:00:00 2001 From: Pawit Pornkitprasan Date: Sat, 10 May 2014 10:40:03 +0700 Subject: [PATCH 2/6] aries-common: create uncompressed ramdisk It is more efficient to let the kernel compress it only once. See corresponding kernel commit. http://review.cyanogenmod.org/63721 Change-Id: I8dcd03a4011367b68c96efb23f56348af12da79b --- shbootimg.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shbootimg.mk b/shbootimg.mk index a057b5a..f51d0b9 100644 --- a/shbootimg.mk +++ b/shbootimg.mk @@ -1,7 +1,12 @@ LOCAL_PATH := $(call my-dir) +# Uncompress ramdisk.img to avoid double compression +uncompressed_ramdisk := $(PRODUCT_OUT)/ramdisk.cpio +$(uncompressed_ramdisk): $(INSTALLED_RAMDISK_TARGET) + $(MINIGZIP) -d < $(INSTALLED_RAMDISK_TARGET) > $@ + # Add ramdisk dependencies to kernel -TARGET_KERNEL_BINARIES: $(recovery_ramdisk) $(INSTALLED_RAMDISK_TARGET) $(PRODUCT_OUT)/utilities/flash_image $(PRODUCT_OUT)/utilities/busybox $(PRODUCT_OUT)/utilities/make_ext4fs $(PRODUCT_OUT)/utilities/erase_image $(PRODUCT_OUT)/modem.bin +TARGET_KERNEL_BINARIES: $(recovery_ramdisk) $(uncompressed_ramdisk) $(PRODUCT_OUT)/utilities/flash_image $(PRODUCT_OUT)/utilities/busybox $(PRODUCT_OUT)/utilities/make_ext4fs $(PRODUCT_OUT)/utilities/erase_image $(PRODUCT_OUT)/modem.bin INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img $(INSTALLED_BOOTIMAGE_TARGET): $(INSTALLED_KERNEL_TARGET) From e0bfee368397da7914999cf17a5affec7e77c1ce Mon Sep 17 00:00:00 2001 From: Pawit Pornkitprasan Date: Sun, 6 Jul 2014 20:39:38 +0900 Subject: [PATCH 3/6] infuse4g: our sdcards are hot-pluggable Change-Id: I608599fe7b7bc6ea305223bd03197e31fb7d7dfe Conflicts: overlay/frameworks/base/core/res/res/values/config.xml --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index def094c..7196dc2 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -222,4 +222,7 @@ in the kernel. Default is 3 full-screen 32 bpp buffers, i.e. 4500KB on Nexus S. Let's double this value. --> 9000 + + + true From e998463c4c97b754cc3d78c5bcc232ce6681a1ad Mon Sep 17 00:00:00 2001 From: Pawit Pornkitprasan Date: Tue, 19 Aug 2014 19:06:42 +0700 Subject: [PATCH 4/6] aries-common: add 'soft reboot' option Complements http://review.cyanogenmod.org/67837 Change-Id: I97e961e0cc3fee2e60194aaaf9329da2378ce543 --- overlay/frameworks/base/core/res/res/values/arrays.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/arrays.xml b/overlay/frameworks/base/core/res/res/values/arrays.xml index 5b65ae4..e13493a 100644 --- a/overlay/frameworks/base/core/res/res/values/arrays.xml +++ b/overlay/frameworks/base/core/res/res/values/arrays.xml @@ -22,6 +22,7 @@ @string/reboot_reboot + @string/reboot_soft @string/reboot_recovery @@ -29,6 +30,7 @@ The first item should be empty for regular reboot. --> + soft_reboot recovery From 81c0fb20163f0e5979c63974820cb1b14663f7cb Mon Sep 17 00:00:00 2001 From: Vaughn Newman Date: Fri, 19 Sep 2014 19:29:01 -0400 Subject: [PATCH 5/6] Revert "remove low mem flag again.. didnt work to good before, no need to" This reverts commit 02d153afa32e742217d65fb70ce7fbc67830ad24. --- infuse4g.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infuse4g.mk b/infuse4g.mk index ab6bf6a..7b3996d 100644 --- a/infuse4g.mk +++ b/infuse4g.mk @@ -157,6 +157,11 @@ PRODUCT_COPY_FILES += \ PRODUCT_PROPERTY_OVERRIDES := \ ro.opengles.version=131072 +# For applications to determine if they should turn off specific memory-intensive +# features that work poorly on low-memory devices. +PRODUCT_PROPERTY_OVERRIDES += \ + ro.config.low_ram=true + # Support for Browser's saved page feature. This allows # for pages saved on previous versions of the OS to be # viewed on the current OS. From 736bd8f5a9dbc1a0ec1c44840f085e6d54069d59 Mon Sep 17 00:00:00 2001 From: Vaughn Newman Date: Fri, 10 Oct 2014 20:02:26 -0400 Subject: [PATCH 6/6] Remove /datadata Change-Id: I93bbb179ce6599af79cbb46013b44727806b9d98 --- fstab.aries | 1 - infuse4g.mk | 3 +-- init.aries.rc | 7 ------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/fstab.aries b/fstab.aries index 4b06dc5..6c740aa 100644 --- a/fstab.aries +++ b/fstab.aries @@ -7,7 +7,6 @@ recovery /recovery mtd defaults boot /boot mtd defaults recoveryonly radio /radio mtd defaults recoveryonly cache /cache yaffs2 defaults recoveryonly -datadata /datadata yaffs2 defaults recoveryonly # LVM Volumes /dev/lvpool/system /system ext4 ro wait diff --git a/infuse4g.mk b/infuse4g.mk index 7b3996d..985189c 100644 --- a/infuse4g.mk +++ b/infuse4g.mk @@ -54,8 +54,7 @@ PRODUCT_COPY_FILES += \ device/samsung/infuse4g/ueventd.aries.rc:root/ueventd.aries.rc \ device/samsung/infuse4g/fstab.aries:root/fstab.aries \ device/samsung/aries-common/init.recovery.aries.rc:root/init.recovery.aries.rc \ - device/samsung/infuse4g/lpm.rc:root/lpm.rc \ - device/samsung/aries-common/setupdatadata.sh:root/sbin/setupdatadata.sh + device/samsung/infuse4g/lpm.rc:root/lpm.rc # Prebuilt kl keymaps PRODUCT_COPY_FILES += \ diff --git a/init.aries.rc b/init.aries.rc index 6a58895..039139b 100644 --- a/init.aries.rc +++ b/init.aries.rc @@ -19,7 +19,6 @@ on init symlink /storage/sdcard1 /emmc symlink /storage/sdcard1 /mnt/emmc # FIXME: Remove emmc? - mkdir /datadata 0771 system system mkdir /data 0771 system system on boot @@ -47,7 +46,6 @@ on fs mkdir /radio 0775 radio radio mount yaffs2 mtd@radio /radio - mount yaffs2 mtd@datadata /datadata mount yaffs2 mtd@cache /cache mount_all fstab.aries swapon_all fstab.aries @@ -157,9 +155,6 @@ on fs restorecon /sys/devices/virtual/misc/voodoo_sound/stereo_expansion_gain on post-fs - chown system system /datadata - chmod 0771 /datadata - restorecon /datadata #symlinks for samsung RIL symlink /radio/modem.bin /dev/block/bml12 @@ -383,8 +378,6 @@ on post-fs-data # for migrating download provider's cache out of the small /data/data mkdir /data/data2 0771 system system - # setup datadata - exec /sbin/setupdatadata.sh # wi-fi mkdir /data/wifi 0771 wifi wifi