diff --git a/Android.mk b/Android.mk index 34c092d..cebd834 100644 --- a/Android.mk +++ b/Android.mk @@ -31,7 +31,7 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE TARGET_RECOVERY_PRE_COMMAND +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ @@ -53,7 +53,7 @@ else LOCAL_SRC_FILES += $(BOARD_CUSTOM_RECOVERY_KEYMAPPING) endif -LOCAL_STATIC_LIBRARIES += libreboot +LOCAL_STATIC_LIBRARIES += librebootrecovery LOCAL_STATIC_LIBRARIES += libext4_utils libz LOCAL_STATIC_LIBRARIES += libminzip libunz libmincrypt diff --git a/extendedcommands.c b/extendedcommands.c index 86d1f4a..06a230f 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -885,10 +885,7 @@ void show_advanced_menu() switch (chosen_item) { case 0: -#ifdef TARGET_RECOVERY_PRE_COMMAND - __system(TARGET_RECOVERY_PRE_COMMAND); -#endif - __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, "recovery"); + reboot_wrapper("recovery"); break; case 1: { diff --git a/libcrecovery/common.h b/libcrecovery/common.h index bf83dd2..59af22e 100644 --- a/libcrecovery/common.h +++ b/libcrecovery/common.h @@ -1,6 +1,8 @@ #ifndef LIBCRECOVERY_COMMON_H #define LIBCRECOVERY_COMMON_H +#include + int __system(const char *command); FILE * __popen(const char *program, const char *type); int __pclose(FILE *iop); diff --git a/mmcutils/Android.mk b/mmcutils/Android.mk index 0046dc9..0b84efc 100644 --- a/mmcutils/Android.mk +++ b/mmcutils/Android.mk @@ -4,8 +4,8 @@ ifeq ($(TARGET_ARCH),arm) LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -ifeq ($(BOARD_HAS_LARGE_FILESYSTEM),true) -LOCAL_CFLAGS += -DBOARD_HAS_LARGE_FILESYSTEM +ifeq ($(BOARD_HAS_SMALL_RECOVERY),true) +LOCAL_CFLAGS += -DBOARD_HAS_SMALL_RECOVERY endif LOCAL_SRC_FILES := \ diff --git a/mmcutils/mmcutils.c b/mmcutils/mmcutils.c index 76b8ff8..b1238ee 100644 --- a/mmcutils/mmcutils.c +++ b/mmcutils/mmcutils.c @@ -340,7 +340,7 @@ run_exec_process ( char **argv) { int format_ext3_device (const char *device) { -#ifdef BOARD_HAS_LARGE_FILESYSTEM +#ifndef BOARD_HAS_SMALL_RECOVERY char *const mke2fs[] = {MKE2FS_BIN, "-j", "-q", device, NULL}; char *const tune2fs[] = {TUNE2FS_BIN, "-C", "1", device, NULL}; #else diff --git a/utilities/Android.mk b/utilities/Android.mk index 79201a3..70ad908 100755 --- a/utilities/Android.mk +++ b/utilities/Android.mk @@ -42,7 +42,7 @@ LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) -ifeq ($(BOARD_HAS_LARGE_FILESYSTEM),true) +ifneq ($(BOARD_HAS_SMALL_RECOVERY),true) include $(CLEAR_VARS) LOCAL_MODULE := mke2fs LOCAL_MODULE_TAGS := eng