summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-09-01 21:40:52 +0200
committerDees Troy <dees_troy@teamw.in>2014-09-03 18:23:04 +0200
commit81742fbcbcfa4a9c23e13344e34418d0b72ea71f (patch)
tree1c9831fe7897a9b0f17429fd4ffeb256cf2a1ccc /Android.mk
parentBuild block TWRP with RECOVERY_VARIANT (diff)
downloadandroid_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.tar
android_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.tar.gz
android_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.tar.bz2
android_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.tar.lz
android_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.tar.xz
android_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.tar.zst
android_bootable_recovery-81742fbcbcfa4a9c23e13344e34418d0b72ea71f.zip
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk12
1 files changed, 9 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index 089485a15..3d95c840c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -310,11 +310,17 @@ 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)
exclude := tune2fs mke2fs mkdosfs gzip gunzip
+
+# If busybox does not have restorecon, assume it does not have SELinux support.
+# Then, let toolbox provide 'ls' so -Z is available to list SELinux contexts.
ifeq ($(TWHAVE_SELINUX), true)
- exclude += ls
- # toolbox will provide ls support with ls -Z capability for listing SELinux contexts
+ ifeq ($(filter restorecon, $(notdir $(BUSYBOX_LINKS))),)
+ exclude += ls
+ endif
endif
-RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS))))
+
+RECOVERY_BUSYBOX_TOOLS := $(filter-out $(exclude), $(notdir $(BUSYBOX_LINKS)))
+RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/, $(RECOVERY_BUSYBOX_TOOLS))
$(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox
$(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Symlink: $@ -> $(BUSYBOX_BINARY)"