Make TWRP compile for arm64
-Remove dosfstools for arm64 until we can make it compile
-Fix TW_USE_TOOLBOX flag to work again
-Fix symlinking and handling of sh when using mksh
-Fix legacy properties to find futex_wake function
-Fix libcrecovery to not use bsd_signal anymore
-Fix rules for building with regards to libcrecovery
-Update toolbox_recovery rules to compile tools in lollipop
-Fix a few compile errors specific to arm64
Testers report that TWRP does not boot on Nexus 9 and we fail to
get a shell for adb shell. At least it compiles without errors.
Change-Id: I286be8628defb60cc527b8a548c0bdfcb0ebb574
diff --git a/Android.mk b/Android.mk
index 13f4c84..2b7d7db 100644
--- a/Android.mk
+++ b/Android.mk
@@ -89,9 +89,9 @@
LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES :=
-LOCAL_STATIC_LIBRARIES += libcrecovery libguitwrp
+LOCAL_STATIC_LIBRARIES += libguitwrp
LOCAL_SHARED_LIBRARIES += libz libc libstlport libcutils libstdc++ libtar libblkid libminuitwrp libminadbd libmtdutils libminzip libaosprecovery
-LOCAL_SHARED_LIBRARIES += libgccdemangle
+LOCAL_SHARED_LIBRARIES += libgccdemangle libcrecovery
ifneq ($(wildcard system/core/libsparse/Android.mk),)
LOCAL_SHARED_LIBRARIES += libsparse
@@ -324,15 +324,10 @@
LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker
LOCAL_ADDITIONAL_DEPENDENCIES := \
- busybox_symlinks \
- dosfsck \
- dosfslabel \
dump_image \
erase_image \
flash_image \
fix_permissions.sh \
- fsck_msdos_symlink \
- mkdosfs \
mke2fs.conf \
mkexfatfs \
pigz \
@@ -342,6 +337,16 @@
unpigz_symlink \
updater
+ifneq ($(TARGET_ARCH), arm64)
+ LOCAL_ADDITIONAL_DEPENDENCIES += \
+ dosfsck \
+ dosfslabel \
+ fsck_msdos_symlink \
+ mkdosfs
+endif
+ifneq ($(TW_USE_TOOLBOX), true)
+ LOCAL_ADDITIONAL_DEPENDENCIES += busybox_symlinks
+endif
ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
LOCAL_ADDITIONAL_DEPENDENCIES += parted
endif
@@ -495,7 +500,6 @@
$(commands_recovery_local_path)/mtdutils/Android.mk \
$(commands_recovery_local_path)/flashutils/Android.mk \
$(commands_recovery_local_path)/pigz/Android.mk \
- $(commands_recovery_local_path)/dosfstools/Android.mk \
$(commands_recovery_local_path)/libtar/Android.mk \
$(commands_recovery_local_path)/crypto/cryptsettings/Android.mk \
$(commands_recovery_local_path)/crypto/cryptfs/Android.mk \
@@ -508,6 +512,10 @@
$(commands_recovery_local_path)/twrpTarMain/Android.mk \
$(commands_recovery_local_path)/mtp/Android.mk
+ifneq ($(TARGET_ARCH), arm64)
+ include $(commands_recovery_local_path)/dosfstools/Android.mk
+endif
+
ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true)
include $(commands_recovery_local_path)/crypto/libcrypt_samsung/Android.mk
endif