diff options
author | Jin Qian <jinqian@google.com> | 2017-06-09 12:37:27 -0700 |
---|---|---|
committer | Jin Qian <jinqian@google.com> | 2017-06-26 17:13:59 -0700 |
commit | 05a31e2c5da51b07b8fdf015792dcf73b6c7b962 (patch) | |
tree | 00ea9144ea5cdfe9fc947a2ed28acf6669b1c853 | |
parent | 43eff9d5fed7e508100812d5fb3b9360589d9967 (diff) | |
download | e2fsprogs-05a31e2c5da51b07b8fdf015792dcf73b6c7b962.tar.gz |
build mke2fs and e2fsdroid as static executables for recovery mode
Bug: 35219933
Change-Id: I84f105cafc57c513d83d9e4d26e9e67ef805e33e
Merged-In: I84f105cafc57c513d83d9e4d26e9e67ef805e33e
-rw-r--r-- | contrib/android/Android.mk | 42 | ||||
-rw-r--r-- | misc/Android.mk | 42 |
2 files changed, 84 insertions, 0 deletions
diff --git a/contrib/android/Android.mk b/contrib/android/Android.mk new file mode 100644 index 00000000..98ce01d8 --- /dev/null +++ b/contrib/android/Android.mk @@ -0,0 +1,42 @@ +LOCAL_PATH := $(call my-dir) + +######################################################################### +# Build statically linked e2fsdroid for recovery +e2fsdroid_src_files := \ + e2fsdroid.c \ + block_range.c \ + fsmap.c \ + block_list.c \ + base_fs.c \ + perms.c \ + basefs_allocator.c \ + hashmap.c \ + +e2fsdroid_cflags := -W -Wall + +e2fsdroid_static_libraries := \ + libext2_com_err \ + libext2_misc \ + libcutils \ + libselinux \ + libcrypto \ + libsparse \ + liblog \ + libz \ + +e2fsdroid_whole_static_libraries := \ + libbase \ + libext2fs \ + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(e2fsdroid_src_files) +LOCAL_CFLAGS := $(e2fsdroid_cflags) +LOCAL_WHOLE_STATIC_LIBRARIES := $(e2fsdroid_whole_static_libraries) +LOCAL_STATIC_LIBRARIES := $(e2fsdroid_static_libraries) +LOCAL_MODULE := e2fsdroid_static +LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +LOCAL_FORCE_STATIC_EXECUTABLE := true + +include $(BUILD_EXECUTABLE) + diff --git a/misc/Android.mk b/misc/Android.mk new file mode 100644 index 00000000..d3bb8207 --- /dev/null +++ b/misc/Android.mk @@ -0,0 +1,42 @@ +LOCAL_PATH := $(call my-dir) + +######################################################################### +# Build statically linked mke2fs for recovery +mke2fs_src_files := \ + mke2fs.c \ + util.c \ + mk_hugefiles.c \ + default_profile.c \ + create_inode.c \ + +mke2fs_c_includes := \ + external/e2fsprogs/e2fsck + +mke2fs_cflags := -W -Wall -Wno-macro-redefined + +mke2fs_static_libraries := \ + libext2_blkid \ + libext2_uuid \ + libext2_quota \ + libext2_com_err \ + libext2_e2p \ + libsparse \ + libz \ + +mke2fs_whole_static_libraries := \ + libbase \ + libext2fs \ + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(mke2fs_src_files) +LOCAL_C_INCLUDES := $(mke2fs_c_includes) +LOCAL_CFLAGS := $(mke2fs_cflags) +LOCAL_WHOLE_STATIC_LIBRARIES := $(mke2fs_whole_static_libraries) +LOCAL_STATIC_LIBRARIES := $(mke2fs_static_libraries) +LOCAL_MODULE := mke2fs_static +LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +LOCAL_FORCE_STATIC_EXECUTABLE := true + +include $(BUILD_EXECUTABLE) + |