Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f299ff58 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

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
parent 5056eab7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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), \
+7 −20
Original line number Diff line number Diff line
@@ -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];
@@ -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 {