aboutsummaryrefslogtreecommitdiffstats
path: root/init/Android.mk
diff options
context:
space:
mode:
authorPrashant Somashekar <prashsomash@gmail.com>2011-12-17 17:26:54 -0500
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-07-10 22:58:57 +0100
commit87e87fc7bfa2a033aabd5b339526f35e85fa6bee (patch)
tree855af21e9e285c5176712aff3a1af5fa248b9e3a /init/Android.mk
parent7a82bfb79c5d7e376308af08bb2541c2ed09785e (diff)
downloadsystem_core-87e87fc7bfa2a033aabd5b339526f35e85fa6bee.tar.gz
system_core-87e87fc7bfa2a033aabd5b339526f35e85fa6bee.tar.bz2
system_core-87e87fc7bfa2a033aabd5b339526f35e85fa6bee.zip
init: add detection of charging mode
-when BOARD_CHARGING_MODE_BOOTING_LPM is set to a path_to_sysfs_attribute then it and lpm.rc will be read accordingly. -adapted from techomancer's original change: (add detection of charging mode, remove the code for parsing param.lfs, since it is not needed) http://goo.gl/I19GG Change-Id: I64c2379225e00afaaf17ee03eab67546781668f8
Diffstat (limited to 'init/Android.mk')
-rw-r--r--init/Android.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/init/Android.mk b/init/Android.mk
index 7dae9df8..0e2291ef 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -26,6 +26,14 @@ ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
LOCAL_CFLAGS += -DALLOW_LOCAL_PROP_OVERRIDE=1
endif
+SYSTEM_CORE_INIT_DEFINES := BOARD_CHARGING_MODE_BOOTING_LPM
+
+$(foreach system_core_init_define,$(SYSTEM_CORE_INIT_DEFINES), \
+ $(if $($(system_core_init_define)), \
+ $(eval LOCAL_CFLAGS += -D$(system_core_init_define)=\"$($(system_core_init_define))\") \
+ ) \
+ )
+
LOCAL_MODULE:= init
LOCAL_FORCE_STATIC_EXECUTABLE := true