@@ -143,6 +143,13 @@ config DALVIK_VM_HEAPGROWTHLIMIT
help
Typically this is less than half the heap size.
+config LOWMEM_CONFIG
+ bool "Enable Lowmem Configuration"
+ default false
+ help
+ Enables some of the reccomended low-memory options for devices
+ with 1GB or less RAM.
+
endmenu
menu "Image Configuration"
@@ -1,5 +1,6 @@
CONFIG_PRODUCT_DEVICE="db410c"
CONFIG_DALVIK_VM_HEAPSIZE=32
+CONFIG_LOWMEM_CONFIG=y
CONFIG_BOARD_SYSTEMIMAGE_PARTITION_SIZE=1288491008
CONFIG_BOARD_USERDATAIMAGE_PARTITION_SIZE=5653544960
CONFIG_KERNEL=y
@@ -76,6 +76,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapmaxfree=$(CONFIG_DALVIK_VM_HEAPMAXFREE)m
subdirs-true := lights graphics
+subdirs-$(CONFIG_LOWMEM_CONFIG) += lowmem
subdirs-$(CONFIG_WIFI) += wifi
subdirs-$(CONFIG_ETHERNET) += ethernet
subdirs-$(CONFIG_SENSOR) += sensor
new file mode 100644
@@ -0,0 +1,11 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE:= lowmem.rc
+
+LOCAL_INIT_RC := $(LOCAL_MODULE)
+
+include $(BUILD_PHONY_PACKAGE)
+
+include $(call first-makefiles-under,$(LOCAL_PATH))
new file mode 100644
@@ -0,0 +1,8 @@
+#lowmem items
+PRODUCT_PACKAGES := \
+ lowmem.rc \
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.low_ram=true \
+ dalvik.vm.jit.codecachesize=0 \
+
new file mode 100644
@@ -0,0 +1,5 @@
+on boot
+ write /sys/kernel/mm/ksm/pages_to_scan 100
+ write /sys/kernel/mm/ksm/sleep_millisecs 500
+ write /sys/kernel/mm/ksm/run 1
+ write /proc/sys/vm/page-cluster 0
With the db410c especially, the memory constraints are very tight, so try to eek out a bit more memory by setting some options suggested by Bero. Cc: Rob Herring <rob.herring@linaro.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Vishal Bhoj <vishal.bhoj@linaro.org> Cc: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> --- Kconfig | 7 +++++++ configs/db410c_defconfig | 1 + device.mk | 1 + lowmem/Android.mk | 11 +++++++++++ lowmem/device.mk | 8 ++++++++ lowmem/lowmem.rc | 5 +++++ 6 files changed, 33 insertions(+) create mode 100644 lowmem/Android.mk create mode 100644 lowmem/device.mk create mode 100644 lowmem/lowmem.rc -- 2.7.4