Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zRAM only read one page at a time #1

Open
wants to merge 6 commits into
base: cm-11.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion fstab.aries
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions infuse4g.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 += \
Expand Down Expand Up @@ -157,6 +156,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.
Expand Down
10 changes: 3 additions & 7 deletions init.aries.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -375,13 +370,14 @@ 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
mkdir /data/data2 0771 system system

# setup datadata
exec /sbin/setupdatadata.sh

# wi-fi
mkdir /data/wifi 0771 wifi wifi
Expand Down
2 changes: 2 additions & 0 deletions overlay/frameworks/base/core/res/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
<!-- Defines the shutdown options shown in the reboot dialog. -->
<array name="shutdown_reboot_options" translatable="false">
<item>@string/reboot_reboot</item>
<item>@string/reboot_soft</item>
<item>@string/reboot_recovery</item>
</array>

<!-- Do not translate. Defines the shutdown actions passed to the kernel.
The first item should be empty for regular reboot. -->
<string-array name="shutdown_reboot_actions" translatable="false">
<item></item>
<item>soft_reboot</item>
<item>recovery</item>
</string-array>

Expand Down
3 changes: 3 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
<integer name="config_extraFreeKbytesAbsolute">9000</integer>

<!-- SD card is hot-pluggable on this device -->
<bool name="config_batterySdCardAccessibility">true</bool>
</resources>
7 changes: 6 additions & 1 deletion shbootimg.mk
Original file line number Diff line number Diff line change
@@ -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)
Expand Down