merge busybox and other tools into recovery.

This commit is contained in:
Koushik K. Dutta 2010-03-03 00:42:58 -08:00
parent e81cb750fd
commit 99fb6fef11
4 changed files with 19 additions and 19 deletions

View File

@ -41,6 +41,7 @@ ifeq ($(TARGET_RECOVERY_UI_LIB),)
else
LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif
LOCAL_STATIC_LIBRARIES += libbusybox libclearsilverregex libmkyaffs2image libunyaffs libdump_image libflash_image libmtdutils
LOCAL_STATIC_LIBRARIES += libamend
LOCAL_STATIC_LIBRARIES += libminzip libunz libmtdutils libmincrypt
LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils

View File

@ -52,6 +52,7 @@ void install_zip(const char* packagefilepath)
ui_print("\n-- Installing: %s\n", packagefilepath);
set_sdcard_update_bootloader_message();
int status = install_package(packagefilepath);
ui_reset_progress();
if (status != INSTALL_SUCCESS) {
ui_set_background(BACKGROUND_ICON_ERROR);
ui_print("Installation aborted.\n");
@ -60,8 +61,8 @@ void install_zip(const char* packagefilepath)
if (firmware_update_pending()) {
ui_print("\nReboot via menu to complete\ninstallation.\n");
}
ui_print("\nInstall from sdcard complete.\n");
ui_set_background(BACKGROUND_ICON_NONE);
ui_print("\nInstall from sdcard complete.\n");
}
char* INSTALL_MENU_ITEMS[] = { "apply sdcard:update.zip",

View File

@ -30,28 +30,14 @@ include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := flash_image.c
#LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE := recovery_flash_image
#LOCAL_MODULE_TAGS := eng
#LOCAL_STATIC_LIBRARIES := libmtdutils libcutils libc
#LOCAL_MODULE_STEM := flash_image
#LOCAL_FORCE_STATIC_EXECUTABLE := true
#LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_MODULE := libflash_image
LOCAL_CFLAGS += -Dmain=flash_image_main
#ADDITIONAL_RECOVERY_EXECUTABLES += recovery_flash_image
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := dump_image.c
#LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE := recovery_dump_image
#LOCAL_MODULE_TAGS := eng
#LOCAL_STATIC_LIBRARIES := libmtdutils libcutils libc
#LOCAL_MODULE_STEM := dump_image
#LOCAL_FORCE_STATIC_EXECUTABLE := true
#LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_MODULE := libdump_image
LOCAL_CFLAGS += -Dmain=dump_image_main
#ADDITIONAL_RECOVERY_EXECUTABLES += recovery_dump_image
include $(BUILD_STATIC_LIBRARY)
@ -60,12 +46,12 @@ LOCAL_SRC_FILES := driver.c
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE := recovery_tools
LOCAL_MODULE_TAGS := eng
LOCAL_STATIC_LIBRARIES := recovery_mkyaffs2image recovery_unyaffs recovery_dump_image recovery_flash_image libmtdutils libcutils libc
LOCAL_STATIC_LIBRARIES := libmkyaffs2image libunyaffs libdump_image libflash_image libmtdutils libcutils libc
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_UNSTRIPPED_PATH := $(TARGET_OUT_EXECUTABLES_UNSTRIPPED)
ADDITIONAL_RECOVERY_EXECUTABLES += recovery_tools
include $(BUILD_EXECUTABLE)
#include $(BUILD_EXECUTABLE)
endif # TARGET_ARCH == arm
endif # !TARGET_SIMULATOR

View File

@ -472,6 +472,18 @@ print_property(const char *key, const char *name, void *cookie)
int
main(int argc, char **argv)
{
if (strstr(argv[0], "recovery") == NULL)
{
if (strstr(argv[0], "flash_image") != NULL)
return flash_image_main(argc, argv);
if (strstr(argv[0], "dump_image") != NULL)
return dump_image_main(argc, argv);
if (strstr(argv[0], "mkyaffs2image") != NULL)
return mkyaffs2image_main(argc, argv);
if (strstr(argv[0], "unyaffs") != NULL)
return unyaffs_main(argc, argv);
return busybox_driver(argc, argv);
}
int is_user_initiated_recovery = 0;
time_t start = time(NULL);