summaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2012-01-13 08:23:06 -0500
committerStephen Smalley <sds@tycho.nsa.gov>2012-04-02 11:19:38 -0400
commit84f79e8e767a95ea761f430a12adb13ce687ae7e (patch)
tree6b2b972484aff54a4f12a6339d3604accba43326 /Android.mk
parent6232e2d5ab34a40d710e4b05ab0ec6e3727804e7 (diff)
downloadyaffs2-84f79e8e767a95ea761f430a12adb13ce687ae7e.tar.gz
Extend mkyaffs2image to support setting SELinux security contexts in yaffs2 images.
Modern yaffs2 includes support for extended attributes, and thus can support SELinux security contexts. Extend mkyaffs2image with support for looking up the right security context from the file_contexts configuration and setting it in the generated image. This is similar to the existing support for looking up the UID/GID/mode via android_filesystem_config.h and setting it, but via configuration rather than defined in a header. Change-Id: Ic86358987f39bddbb83ee928bbbc8cb213efb752
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index e31b6ae..e899a77 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,6 +17,12 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH)/yaffs2
LOCAL_MODULE := mkyaffs2image
+ifeq ($(HAVE_SELINUX), true)
+LOCAL_C_INCLUDES += external/libselinux/include
+LOCAL_STATIC_LIBRARIES += libselinux
+LOCAL_CFLAGS += -DHAVE_SELINUX
+endif # HAVE_SELINUX
+
include $(BUILD_HOST_EXECUTABLE)
$(call dist-for-goals, dist_files, $(LOCAL_BUILT_MODULE))