add mkfstab.sh script to create an fstab on any device. clean up dump_image to use libmtdutils

This commit is contained in:
Koushik K. Dutta 2010-02-21 17:52:30 -08:00
parent 7e5a661064
commit 1a7ee5384d
5 changed files with 17 additions and 14 deletions

View File

@ -41,10 +41,10 @@ ifeq ($(TARGET_RECOVERY_UI_LIB),)
else
LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
endif
LOCAL_STATIC_LIBRARIES += libamend
LOCAL_STATIC_LIBRARIES += libminzip libunz libmtdutils libmincrypt
LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils
LOCAL_STATIC_LIBRARIES += libstdc++ libc
LOCAL_STATIC_LIBRARIES += libamend
include $(BUILD_EXECUTABLE)

View File

@ -75,15 +75,6 @@ static int read_data(ZipArchive *zip, const ZipEntry *entry,
int
handle_update_script(ZipArchive *zip, const ZipEntry *update_script_entry)
{
// This is bizarre. The build fails with "undefined reference"
// unless the following two functions are referenced from somewhere to
// force them to be linked. This seems to be a problem with yacc/lex.
if (zip == 1)
{
fwrite(NULL, 0, 0, NULL);
fileno(NULL);
}
/* Read the entire script into a buffer.
*/
int script_len;

View File

@ -21,9 +21,11 @@ LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := dump_image.c mtdutils.c mounts.c
LOCAL_SRC_FILES := dump_image.c
LOCAL_MODULE := dump_image
LOCAL_MODULE_TAGS := eng
LOCAL_STATIC_LIBRARIES := libmtdutils
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
@ -39,11 +41,11 @@ ADDITIONAL_RECOVERY_EXECUTABLES += recovery_flash_image
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := dump_image.c mtdutils.c mounts.c
LOCAL_SRC_FILES := dump_image.c
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE := recovery_dump_image
LOCAL_MODULE_TAGS := eng
LOCAL_STATIC_LIBRARIES := libcutils libc
LOCAL_STATIC_LIBRARIES := libmtdutils libcutils libc
LOCAL_MODULE_STEM := dump_image
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin

View File

@ -10,3 +10,13 @@ ADDITIONAL_RECOVERY_EXECUTABLES += recovery_nandroid
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := recovery_mkfstab
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_SRC_FILES := mkfstab.sh
LOCAL_MODULE_STEM := mkfstab.sh
ADDITIONAL_RECOVERY_EXECUTABLES += recovery_mkfstab
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)

View File

@ -56,7 +56,7 @@ DEVICEID=foo
RECOVERY=foo
echo "nandroid-mobile v2.1"
mkfstab.sh > /etc/fstab
if [ "$1" == "" ]; then
echo "Usage: $0 {backup|restore} [/path/to/nandroid/backup/]"