From fd0ace8f6ee5b098c400af03bfe31797994476cd Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 11 Oct 2017 20:25:36 -0700 Subject: Move stuff from recovery into librecovery. Move most source files into librecovery so they become testable. Only recovery_main.cpp and logging.cpp are built into recovery module, as they perform one-time setup (e.g. setting up logger). Test: `mmma -j bootable/recovery` with aosp_{angler,bullhead,fugu,dragon,marlin}-userdebug Test: recovery_host_test; recovery_unit_test; recovery_component_test; recovery_manual_test Test: Build and boot into recovery image on angler. Change-Id: Ic4444f87a2f123557c71085f81dc2b2764c05ed8 (cherry picked from commit bf4c006d7bc8a4517c82399bbffd9cb09971c0b4) --- Android.mk | 107 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 52 insertions(+), 55 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 09feba289..efd7462c2 100644 --- a/Android.mk +++ b/Android.mk @@ -97,12 +97,61 @@ endif include $(BUILD_STATIC_LIBRARY) +# Health HAL dependency +health_hal_static_libraries := \ + android.hardware.health@2.0-impl \ + android.hardware.health@2.0 \ + android.hardware.health@1.0 \ + android.hardware.health@1.0-convert \ + libhealthstoragedefault \ + libhidltransport \ + libhidlbase \ + libhwbinder_noltopgo \ + libvndksupport \ + libbatterymonitor + +librecovery_static_libraries := \ + $(TARGET_RECOVERY_UI_LIB) \ + libbootloader_message \ + libfusesideload \ + libminadbd \ + librecovery_ui \ + libminui \ + libverifier \ + libotautil \ + $(health_hal_static_libraries) \ + libasyncio \ + libcrypto_utils \ + libcrypto \ + libext4_utils \ + libfs_mgr \ + libpng \ + libsparse \ + libvintf_recovery \ + libvintf \ + libhidl-gen-utils \ + libtinyxml2 \ + libziparchive \ + libbase \ + libutils \ + libcutils \ + liblog \ + libselinux \ + libz \ + # librecovery (static library) # =============================== include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - install.cpp + adb_install.cpp \ + fuse_sdcard_provider.cpp \ + install.cpp \ + recovery.cpp \ + roots.cpp \ + +LOCAL_C_INCLUDES := \ + system/vold \ LOCAL_CFLAGS := $(recovery_common_cflags) @@ -113,13 +162,7 @@ endif LOCAL_MODULE := librecovery LOCAL_STATIC_LIBRARIES := \ - libminui \ - libotautil \ - libvintf_recovery \ - libcrypto_utils \ - libcrypto \ - libbase \ - libziparchive \ + $(librecovery_static_libraries) include $(BUILD_STATIC_LIBRARY) @@ -128,12 +171,8 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := \ - adb_install.cpp \ - fuse_sdcard_provider.cpp \ logging.cpp \ - recovery.cpp \ recovery_main.cpp \ - roots.cpp \ LOCAL_MODULE := recovery @@ -147,51 +186,9 @@ LOCAL_USE_CLANG_LLD := false LOCAL_CFLAGS := $(recovery_common_cflags) -LOCAL_C_INCLUDES += \ - system/vold \ - -# Health HAL dependency LOCAL_STATIC_LIBRARIES := \ - android.hardware.health@2.0-impl \ - android.hardware.health@2.0 \ - android.hardware.health@1.0 \ - android.hardware.health@1.0-convert \ - libhealthstoragedefault \ - libhidltransport \ - libhidlbase \ - libhwbinder_noltopgo \ - libvndksupport \ - libbatterymonitor - -LOCAL_STATIC_LIBRARIES += \ librecovery \ - $(TARGET_RECOVERY_UI_LIB) \ - libbootloader_message \ - libfusesideload \ - libminadbd \ - librecovery_ui \ - libminui \ - libverifier \ - libotautil \ - libasyncio \ - libbatterymonitor \ - libcrypto_utils \ - libcrypto \ - libext4_utils \ - libfs_mgr \ - libpng \ - libsparse \ - libvintf_recovery \ - libvintf \ - libhidl-gen-utils \ - libtinyxml2 \ - libziparchive \ - libbase \ - libutils \ - libcutils \ - liblog \ - libselinux \ - libz \ + $(librecovery_static_libraries) LOCAL_HAL_STATIC_LIBRARIES := libhealthd -- cgit v1.2.3