aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-19 18:04:21 +0000
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2012-11-19 18:04:21 +0000
commitf299ff586e2d02be88285d97a58a17e9a44be9c2 (patch)
tree81fd6a874dc63deacd7142fe9f4fe095f8c97a2e /init
parent5056eab7c686fb3bfb67b81225adfc1938ceb0b1 (diff)
downloadsystem_core-f299ff586e2d02be88285d97a58a17e9a44be9c2.zip
system_core-f299ff586e2d02be88285d97a58a17e9a44be9c2.tar.gz
system_core-f299ff586e2d02be88285d97a58a17e9a44be9c2.tar.bz2
Deprecate distinct boot paths for androidboot.emmc
Qualcomm used to require a "on emmc-fs" to distinguish multi-boot devices, in replacement of the usual "on fs". This distinction has been deprecated in jb, and it's breaking mako Change-Id: I8ef5c932efcd5e7f8d6f6fce0915683d84c3ee11
Diffstat (limited to 'init')
-rw-r--r--init/Android.mk4
-rwxr-xr-xinit/init.c27
2 files changed, 11 insertions, 20 deletions
diff --git a/init/Android.mk b/init/Android.mk
index 5c4706c..a665b9c 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -35,6 +35,10 @@ ifneq ($(TARGET_NR_SVC_SUPP_GIDS),)
LOCAL_CFLAGS += -DNR_SVC_SUPP_GIDS=$(TARGET_NR_SVC_SUPP_GIDS)
endif
+ifeq ($(BOARD_WANTS_EMMC_BOOT),true)
+LOCAL_CFLAGS += -DWANTS_EMMC_BOOT
+endif
+
SYSTEM_CORE_INIT_DEFINES := BOARD_CHARGING_MODE_BOOTING_LPM
$(foreach system_core_init_define,$(SYSTEM_CORE_INIT_DEFINES), \
diff --git a/init/init.c b/init/init.c
index 706a83e..02eb4f4 100755
--- a/init/init.c
+++ b/init/init.c
@@ -72,17 +72,11 @@ static int property_triggers_enabled = 0;
static int bootchart_count;
#endif
-#ifndef BOARD_CHARGING_CMDLINE_NAME
-#define BOARD_CHARGING_CMDLINE_NAME "androidboot.battchg_pause"
-#define BOARD_CHARGING_CMDLINE_VALUE "true"
-#endif
-
static char console[32];
static char bootmode[32];
static char hardware[32];
static unsigned revision = 0;
static char qemu[32];
-static char battchg_pause[32];
#ifdef HAVE_SELINUX
static int selinux_enabled = 1;
@@ -110,8 +104,6 @@ static const char *ENV[32];
static unsigned emmc_boot = 0;
-static unsigned charging_mode = 0;
-
/* add_environment - add "key=value" to the current environment */
int add_environment(const char *key, const char *val)
{
@@ -669,12 +661,12 @@ static void import_kernel_nv(char *name, int for_emulator)
if (!strcmp(name,"qemu")) {
strlcpy(qemu, value, sizeof(qemu));
+#ifdef WANTS_EMMC_BOOT
} else if (!strcmp(name,"androidboot.emmc")) {
if (!strcmp(value,"true")) {
emmc_boot = 1;
}
- } else if (!strcmp(name,BOARD_CHARGING_CMDLINE_NAME)) {
- strlcpy(battchg_pause, value, sizeof(battchg_pause));
+#endif
} else if (!strncmp(name, "androidboot.", 12) && name_len > 12) {
const char *boot_prop_name = name + 12;
char prop[PROP_NAME_MAX];
@@ -1007,11 +999,11 @@ int main(int argc, char **argv)
/* skip mounting filesystems in charger mode */
if (!is_charger) {
action_for_each_trigger("early-fs", action_add_queue_tail);
- if(emmc_boot) {
- action_for_each_trigger("emmc-fs", action_add_queue_tail);
- } else {
- action_for_each_trigger("fs", action_add_queue_tail);
- }
+ if(emmc_boot) {
+ action_for_each_trigger("emmc-fs", action_add_queue_tail);
+ } else {
+ action_for_each_trigger("fs", action_add_queue_tail);
+ }
action_for_each_trigger("post-fs", action_add_queue_tail);
action_for_each_trigger("post-fs-data", action_add_queue_tail);
}
@@ -1020,11 +1012,6 @@ int main(int argc, char **argv)
queue_builtin_action(signal_init_action, "signal_init");
queue_builtin_action(check_startup_action, "check_startup");
- /* Older bootloaders use non-standard charging modes. Check for
- * those now, after mounting the filesystems */
- if (strcmp(battchg_pause, BOARD_CHARGING_CMDLINE_VALUE) == 0)
- is_charger = 1;
-
if (is_charger) {
action_for_each_trigger("charger", action_add_queue_tail);
} else {