diff --git a/Android.mk b/Android.mk index d5ec12f..2a4087a 100644 --- a/Android.mk +++ b/Android.mk @@ -204,6 +204,7 @@ include $(BUILD_EXECUTABLE) include $(commands_recovery_local_path)/amend/Android.mk +include $(commands_recovery_local_path)/bmlutils/Android.mk include $(commands_recovery_local_path)/minui/Android.mk include $(commands_recovery_local_path)/minzip/Android.mk include $(commands_recovery_local_path)/mtdutils/Android.mk diff --git a/bmlutils/Android.mk b/bmlutils/Android.mk new file mode 100644 index 0000000..f1a8525 --- /dev/null +++ b/bmlutils/Android.mk @@ -0,0 +1,17 @@ +ifeq ($(BOARD_USES_BMLUTILS),true) + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := bmlutils.c +LOCAL_MODULE := libbmlutils +include $(BUILD_STATIC_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := redbend_ua +LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES +LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +LOCAL_SRC_FILES := $(LOCAL_MODULE) +include $(BUILD_PREBUILT) + +endif \ No newline at end of file diff --git a/bmlutils/redbend_ua b/bmlutils/redbend_ua new file mode 100644 index 0000000..61040c6 Binary files /dev/null and b/bmlutils/redbend_ua differ diff --git a/updater/Android.mk b/updater/Android.mk index f7c0502..b0e5811 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -18,17 +18,17 @@ LOCAL_MODULE_TAGS := eng LOCAL_SRC_FILES := $(updater_src_files) -LOCAL_STATIC_LIBRARIES += $(BOARD_UPDATER_LIBS) +ifdef BOARD_USES_BMLUTILS + LOCAL_CFLAGS += -DBOARD_USES_BMLUTILS + LOCAL_STATIC_LIBRARIES += libbmlutils +endif + LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS) LOCAL_STATIC_LIBRARIES += libapplypatch libedify libmtdutils libminzip libz LOCAL_STATIC_LIBRARIES += libmincrypt libbz LOCAL_STATIC_LIBRARIES += libcutils libstdc++ libc LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. -ifdef BOARD_HAS_CUSTOM_WRITE_RAW_IMAGE - LOCAL_CFLAGS += -DBOARD_HAS_CUSTOM_WRITE_RAW_IMAGE -endif - # Each library in TARGET_RECOVERY_UPDATER_LIBS should have a function # named "Register_()". Here we emit a little C function that # gets #included by updater.c. It calls all those registration diff --git a/updater/install.c b/updater/install.c index 759b688..5117706 100644 --- a/updater/install.c +++ b/updater/install.c @@ -649,7 +649,7 @@ Value* WriteRawImageFn(const char* name, State* state, int argc, Expr* argv[]) { goto done; } -#ifdef BOARD_HAS_CUSTOM_WRITE_RAW_IMAGE +#ifdef BOARD_USES_BMLUTILS if (0 == write_raw_image(name, filename)) { result = partition; }