diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2014-04-04 18:26:32 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2014-04-04 18:28:14 +0200 |
commit | 5c9336924f33408cf30747298968be6b0123213f (patch) | |
tree | e84af69b6dbf967c9a4122c6d855f956f6678533 | |
parent | Allow building of an OEM friendly TWRP (diff) | |
download | android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.tar android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.tar.gz android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.tar.bz2 android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.tar.lz android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.tar.xz android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.tar.zst android_bootable_recovery-5c9336924f33408cf30747298968be6b0123213f.zip |
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | gui/Android.mk | 11 | ||||
-rw-r--r-- | prebuilt/Android.mk | 6 | ||||
-rw-r--r-- | toolbox/Android.mk | 62 |
4 files changed, 80 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk index c54f8c058..2f1f6fcee 100644 --- a/Android.mk +++ b/Android.mk @@ -284,6 +284,7 @@ endif include $(BUILD_EXECUTABLE) +ifneq ($(TW_USE_TOOLBOX), true) include $(CLEAR_VARS) # Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links) @@ -301,6 +302,7 @@ $(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(hide) ln -sf $(BUSYBOX_BINARY) $@ ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS) +endif include $(CLEAR_VARS) LOCAL_MODULE := verifier_test diff --git a/gui/Android.mk b/gui/Android.mk index 19bb0bcf0..6134e3b57 100644 --- a/gui/Android.mk +++ b/gui/Android.mk @@ -102,6 +102,7 @@ LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res TWRP_RES_LOC := $(commands_recovery_local_path)/gui/devices TWRP_RES_GEN := $(intermediates)/twrp +ifneq ($(TW_USE_TOOLBOX), true) $(TWRP_RES_GEN): mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res/ cp -fr $(TWRP_RES_LOC)/common/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/ @@ -110,6 +111,16 @@ $(TWRP_RES_GEN): ln -sf /sbin/busybox $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip +else +$(TWRP_RES_GEN): + mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res/ + cp -fr $(TWRP_RES_LOC)/common/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/ + cp -fr $(TWRP_RES_LOC)/$(DEVICE_RESOLUTION)/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/ + mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/ + ln -sf /sbin/mksh $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh + ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip + ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip +endif LOCAL_GENERATED_SOURCES := $(TWRP_RES_GEN) LOCAL_SRC_FILES := twrp $(TWRP_RES_GEN) diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index b5da5a903..1f784d359 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -13,7 +13,11 @@ LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dump_image RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/flash_image RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image -RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox +ifneq ($(TW_USE_TOOLBOX), true) + RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox +else + RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mksh +endif RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel diff --git a/toolbox/Android.mk b/toolbox/Android.mk index afe66a3a8..73868976a 100644 --- a/toolbox/Android.mk +++ b/toolbox/Android.mk @@ -20,6 +20,68 @@ ifeq ($(TWHAVE_SELINUX), true) load_policy endif +ifeq ($(TW_USE_TOOLBOX), true) + TOOLS += \ + mount \ + cat \ + ps \ + kill \ + ln \ + insmod \ + rmmod \ + lsmod \ + ifconfig \ + setconsole \ + rm \ + mkdir \ + rmdir \ + getevent \ + sendevent \ + date \ + wipe \ + sync \ + umount \ + notify \ + cmp \ + dmesg \ + route \ + hd \ + dd \ + df \ + watchprops \ + log \ + sleep \ + renice \ + printenv \ + smd \ + chmod \ + chown \ + newfs_msdos \ + netstat \ + ioctl \ + mv \ + schedtop \ + top \ + iftop \ + id \ + uptime \ + vmstat \ + nandread \ + ionice \ + touch \ + lsof \ + du \ + md5 \ + clear \ + swapon \ + swapoff \ + mkswap \ + readlink + ifneq ($(TWHAVE_SELINUX), true) + TOOLS += ls + endif +endif + LOCAL_SRC_FILES := \ toolbox.c \ $(patsubst %,%.c,$(TOOLS)) |