summaryrefslogtreecommitdiffstats
path: root/toolbox/Android.mk
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-09 18:15:26 +0200
committerEthan Yonker <dees_troy@teamw.in>2015-10-09 18:15:29 +0200
commitc798c9cd2486e0ff83776002c74f113677b10a84 (patch)
treed128a80cbc58e63a622fda2774e727611f9d2cd4 /toolbox/Android.mk
parentAdd TW_IGNORE_ABS_MT_TRACKING_ID (diff)
parentmerge in mnc-release history after reset to mnc-dev (diff)
downloadandroid_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.gz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.bz2
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.lz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.xz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.zst
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.zip
Diffstat (limited to 'toolbox/Android.mk')
-rw-r--r--toolbox/Android.mk220
1 files changed, 130 insertions, 90 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index e58b755e5..d54bfa440 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -4,110 +4,150 @@ include $(CLEAR_VARS)
OUR_TOOLS := \
start \
stop \
- getprop \
- setprop
+
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ OUR_TOOLS += \
+ getprop \
+ setprop
+endif
# If busybox does not have SELinux support, provide these tools with toolbox.
# Note that RECOVERY_BUSYBOX_TOOLS will be empty if TW_USE_TOOLBOX == true.
ifeq ($(TWHAVE_SELINUX), true)
TOOLS_FOR_SELINUX := \
- ls \
- getenforce \
- chcon \
- restorecon \
- runcon \
- getsebool \
- setsebool \
- load_policy
+ ls
+
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ TOOLS_FOR_SELINUX += \
+ load_policy \
+ getenforce \
+ chcon \
+ restorecon \
+ runcon \
+ getsebool \
+ setsebool
+ endif
+
OUR_TOOLS += $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(TOOLS_FOR_SELINUX))
# toolbox setenforce is used during init, so it needs to be included here
# symlink is omitted at the very end if busybox already provides this
- OUR_TOOLS += setenforce
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
+ OUR_TOOLS += setenforce
+ endif
endif
ifeq ($(TW_USE_TOOLBOX), true)
- ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
- OUR_TOOLS += \
- mknod \
- nohup
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
+ # These are the only toolbox tools in M. The rest are now in toybox.
BSD_TOOLS := \
- cat \
- chown \
- cp \
dd \
du \
- grep \
- kill \
- ln \
- mv \
- printenv \
- rm \
- rmdir \
- sleep \
- sync
+
+ OUR_TOOLS := \
+ df \
+ iftop \
+ ioctl \
+ ionice \
+ log \
+ ls \
+ lsof \
+ mount \
+ nandread \
+ newfs_msdos \
+ ps \
+ prlimit \
+ renice \
+ sendevent \
+ start \
+ stop \
+ top \
+ uptime \
+ watchprops \
+
else
- OUR_TOOLS += \
- cat \
- chown \
- dd \
- du \
- kill \
- ln \
- mv \
- printenv \
- rm \
- rmdir \
- setconsole \
- sleep \
- sync
- endif
+ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
+ OUR_TOOLS += \
+ mknod \
+ nohup
+ BSD_TOOLS := \
+ cat \
+ chown \
+ cp \
+ dd \
+ du \
+ grep \
+ kill \
+ ln \
+ mv \
+ printenv \
+ rm \
+ rmdir \
+ sleep \
+ sync
+ else
+ OUR_TOOLS += \
+ cat \
+ chown \
+ dd \
+ du \
+ kill \
+ ln \
+ mv \
+ printenv \
+ rm \
+ rmdir \
+ setconsole \
+ sleep \
+ sync
+ endif
- OUR_TOOLS += \
- chmod \
- clear \
- cmp \
- date \
- df \
- dmesg \
- getevent \
- hd \
- id \
- ifconfig \
- iftop \
- insmod \
- ioctl \
- ionice \
- log \
- lsmod \
- lsof \
- md5 \
- mkdir \
- mkswap \
- mount \
- nandread \
- netstat \
- newfs_msdos \
- notify \
- ps \
- readlink \
- renice \
- rmmod \
- route \
- schedtop \
- sendevent \
- smd \
- swapoff \
- swapon \
- top \
- touch \
- umount \
- uptime \
- vmstat \
- watchprops \
- wipe
- ifneq ($(TWHAVE_SELINUX), true)
- OUR_TOOLS += ls
+ OUR_TOOLS += \
+ chmod \
+ clear \
+ cmp \
+ date \
+ df \
+ dmesg \
+ getevent \
+ hd \
+ id \
+ ifconfig \
+ iftop \
+ insmod \
+ ioctl \
+ ionice \
+ log \
+ lsmod \
+ lsof \
+ md5 \
+ mkdir \
+ mkswap \
+ mount \
+ nandread \
+ netstat \
+ newfs_msdos \
+ notify \
+ ps \
+ readlink \
+ renice \
+ rmmod \
+ route \
+ schedtop \
+ sendevent \
+ smd \
+ swapoff \
+ swapon \
+ top \
+ touch \
+ umount \
+ uptime \
+ vmstat \
+ watchprops \
+ wipe
+ ifneq ($(TWHAVE_SELINUX), true)
+ OUR_TOOLS += ls
+ endif
endif
endif
@@ -135,7 +175,7 @@ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
upstream-netbsd/lib/libutil/raise_default_signal.c
endif
-ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
+ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23))
LOCAL_CFLAGS += \
-std=gnu99 \
-Werror -Wno-unused-parameter \
@@ -165,7 +205,7 @@ ifeq ($(TWHAVE_SELINUX), true)
LOCAL_SHARED_LIBRARIES += libselinux
endif
-ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
+ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23))
# libusbhost is only used by lsusb, and that isn't usually included in toolbox.
# The linker strips out all the unused library code in the normal case.
LOCAL_STATIC_LIBRARIES := libusbhost
@@ -182,7 +222,7 @@ include $(BUILD_EXECUTABLE)
$(LOCAL_PATH)/toolbox.c: $(intermediates)/tools.h
-ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
+ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23))
ALL_TOOLS := $(BSD_TOOLS) $(OUR_TOOLS)
else
ALL_TOOLS := $(OUR_TOOLS)