Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
William Roberts | f0e0a94 | 2012-08-27 15:41:15 -0700 | [diff] [blame] | 2 | |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 3 | # PLATFORM_SEPOLICY_VERSION is a number of the form "NN.m" with "NN" mapping to |
| 4 | # PLATFORM_SDK_VERSION and "m" as a minor number which allows for SELinux |
| 5 | # changes independent of PLATFORM_SDK_VERSION. This value will be set to |
| 6 | # 10000.0 to represent tip-of-tree development that is inherently unstable and |
| 7 | # thus designed not to work with any shipping vendor policy. This is similar in |
| 8 | # spirit to how DEFAULT_APP_TARGET_SDK is set. |
| 9 | # The minor version ('m' component) must be updated every time a platform release |
| 10 | # is made which breaks compatibility with the previous platform sepolicy version, |
| 11 | # not just on every increase in PLATFORM_SDK_VERSION. The minor version should |
| 12 | # be reset to 0 on every bump of the PLATFORM_SDK_VERSION. |
| 13 | sepolicy_major_vers := 25 |
| 14 | sepolicy_minor_vers := 0 |
| 15 | |
| 16 | ifneq ($(sepolicy_major_vers), $(PLATFORM_SDK_VERSION)) |
| 17 | $(error sepolicy_major_version does not match PLATFORM_SDK_VERSION, please update.) |
| 18 | endif |
| 19 | ifneq (REL,$(PLATFORM_VERSION_CODENAME)) |
| 20 | sepolicy_major_vers := 10000 |
| 21 | sepolicy_minor_vers := 0 |
| 22 | endif |
| 23 | PLATFORM_SEPOLICY_VERSION := $(join $(addsuffix .,$(sepolicy_major_vers)), $(sepolicy_minor_vers)) |
| 24 | sepolicy_major_vers := |
| 25 | sepolicy_minor_vers := |
| 26 | |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 27 | include $(CLEAR_VARS) |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 28 | # SELinux policy version. |
Stephen Smalley | b4f1706 | 2015-03-13 10:03:52 -0400 | [diff] [blame] | 29 | # Must be <= /sys/fs/selinux/policyvers reported by the Android kernel. |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 30 | # Must be within the compatibility range reported by checkpolicy -V. |
Jeff Vander Stoep | 3a0ce49 | 2015-12-07 08:30:43 -0800 | [diff] [blame] | 31 | POLICYVERS ?= 30 |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 32 | |
| 33 | MLS_SENS=1 |
| 34 | MLS_CATS=1024 |
| 35 | |
Stephen Smalley | b4f1706 | 2015-03-13 10:03:52 -0400 | [diff] [blame] | 36 | ifdef BOARD_SEPOLICY_REPLACE |
| 37 | $(error BOARD_SEPOLICY_REPLACE is no longer supported; please remove from your BoardConfig.mk or other .mk file.) |
| 38 | endif |
| 39 | |
| 40 | ifdef BOARD_SEPOLICY_IGNORE |
| 41 | $(error BOARD_SEPOLICY_IGNORE is no longer supported; please remove from your BoardConfig.mk or other .mk file.) |
| 42 | endif |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 43 | |
Stephen Smalley | 8e0ca88 | 2015-04-01 10:14:56 -0400 | [diff] [blame] | 44 | ifdef BOARD_SEPOLICY_UNION |
| 45 | $(warning BOARD_SEPOLICY_UNION is no longer required - all files found in BOARD_SEPOLICY_DIRS are implicitly unioned; please remove from your BoardConfig.mk or other .mk file.) |
| 46 | endif |
Robert Craig | 6b0ff47 | 2014-01-29 13:10:58 -0500 | [diff] [blame] | 47 | |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 48 | ifdef BOARD_SEPOLICY_M4DEFS |
| 49 | LOCAL_ADDITIONAL_M4DEFS := $(addprefix -D, $(BOARD_SEPOLICY_M4DEFS)) |
| 50 | endif |
| 51 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 52 | # sepolicy is now divided into multiple portions: |
| 53 | # public - policy exported on which non-platform policy developers may write |
| 54 | # additional policy. types and attributes are versioned and included in |
| 55 | # delivered non-platform policy, which is to be combined with platform policy. |
| 56 | # private - platform-only policy required for platform functionality but which |
| 57 | # is not exported to vendor policy developers and as such may not be assumed |
| 58 | # to exist. |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 59 | # vendor - vendor-only policy required for vendor functionality. This policy can |
| 60 | # reference the public policy but cannot reference the private policy. This |
| 61 | # policy is for components which are produced from the core/non-vendor tree and |
| 62 | # placed into a vendor partition. |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 63 | # mapping - This contains policy statements which map the attributes |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 64 | # exposed in the public policy of previous versions to the concrete types used |
| 65 | # in this policy to ensure that policy targeting attributes from public |
| 66 | # policy from an older platform version continues to work. |
| 67 | |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 68 | # build process for device: |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 69 | # 1) convert policies to CIL: |
| 70 | # - private + public platform policy to CIL |
| 71 | # - mapping file to CIL (should already be in CIL form) |
| 72 | # - non-platform public policy to CIL |
| 73 | # - non-platform public + private policy to CIL |
| 74 | # 2) attributize policy |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 75 | # - run script which takes non-platform public and non-platform combined |
| 76 | # private + public policy and produces attributized and versioned |
| 77 | # non-platform policy |
| 78 | # 3) combine policy files |
| 79 | # - combine mapping, platform and non-platform policy. |
| 80 | # - compile output binary policy file |
| 81 | |
| 82 | PLAT_PUBLIC_POLICY := $(LOCAL_PATH)/public |
| 83 | PLAT_PRIVATE_POLICY := $(LOCAL_PATH)/private |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 84 | PLAT_VENDOR_POLICY := $(LOCAL_PATH)/vendor |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 85 | REQD_MASK_POLICY := $(LOCAL_PATH)/reqd_mask |
| 86 | |
| 87 | # TODO: move to README when doing the README update and finalizing versioning. |
Sandeep Patil | 42f9598 | 2017-04-07 14:18:48 -0700 | [diff] [blame] | 88 | # BOARD_SEPOLICY_VERS must take the format "NN.m" and contain the sepolicy |
| 89 | # version identifier corresponding to the sepolicy on which the non-platform |
| 90 | # policy is to be based. If unspecified, this will build against the current |
| 91 | # public platform policy in tree |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 92 | ifndef BOARD_SEPOLICY_VERS |
| 93 | $(warning BOARD_SEPOLICY_VERS not specified, assuming current platform version) |
Sandeep Patil | 42f9598 | 2017-04-07 14:18:48 -0700 | [diff] [blame] | 94 | # The default platform policy version. |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 95 | BOARD_SEPOLICY_VERS := $(PLATFORM_SEPOLICY_VERSION) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 96 | endif |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 97 | |
Dan Cashman | 4d24a77 | 2017-04-12 14:28:34 -0700 | [diff] [blame] | 98 | |
| 99 | platform_mapping_file := $(BOARD_SEPOLICY_VERS).cil |
| 100 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 101 | ########################################################### |
| 102 | # Compute policy files to be used in policy build. |
| 103 | # $(1): files to include |
| 104 | # $(2): directories in which to find files |
| 105 | ########################################################### |
| 106 | |
| 107 | define build_policy |
| 108 | $(foreach type, $(1), $(foreach file, $(addsuffix /$(type), $(2)), $(sort $(wildcard $(file))))) |
| 109 | endef |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 110 | |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 111 | # Builds paths for all policy files found in BOARD_SEPOLICY_DIRS. |
| 112 | # $(1): the set of policy name paths to build |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 113 | build_device_policy = $(call build_policy, $(1), $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS)) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 114 | |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 115 | # Add a file containing only a newline in-between each policy configuration |
| 116 | # 'contexts' file. This will allow OEM policy configuration files without a |
| 117 | # final newline (0x0A) to be built correctly by the m4(1) macro processor. |
| 118 | # $(1): the set of contexts file names. |
| 119 | # $(2): the file containing only 0x0A. |
| 120 | add_nl = $(foreach entry, $(1), $(subst $(entry), $(entry) $(2), $(entry))) |
| 121 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 122 | sepolicy_build_files := security_classes \ |
| 123 | initial_sids \ |
| 124 | access_vectors \ |
| 125 | global_macros \ |
Nick Kralevich | a17a266 | 2014-11-05 15:30:41 -0800 | [diff] [blame] | 126 | neverallow_macros \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 127 | mls_macros \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 128 | mls_decl \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 129 | mls \ |
| 130 | policy_capabilities \ |
| 131 | te_macros \ |
| 132 | attributes \ |
Jeff Vander Stoep | cbaa2b7 | 2015-12-22 10:39:34 -0800 | [diff] [blame] | 133 | ioctl_defines \ |
Jeff Vander Stoep | de9b530 | 2015-06-05 15:28:55 -0700 | [diff] [blame] | 134 | ioctl_macros \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 135 | *.te \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 136 | roles_decl \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 137 | roles \ |
| 138 | users \ |
| 139 | initial_sid_contexts \ |
| 140 | fs_use \ |
| 141 | genfs_contexts \ |
| 142 | port_contexts |
| 143 | |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 144 | # CIL files which contain workarounds for current limitation of human-readable |
| 145 | # module policy language. These files are appended to the CIL files produced |
| 146 | # from module language files. |
| 147 | sepolicy_build_cil_workaround_files := technical_debt.cil |
| 148 | |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 149 | my_target_arch := $(TARGET_ARCH) |
| 150 | ifneq (,$(filter mips mips64,$(TARGET_ARCH))) |
| 151 | my_target_arch := mips |
| 152 | endif |
| 153 | |
Jeff Vander Stoep | d2053bd | 2017-03-15 13:37:35 -0700 | [diff] [blame] | 154 | intermediates := $(TARGET_OUT_INTERMEDIATES)/ETC/sepolicy_intermediates |
| 155 | |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 156 | with_asan := false |
| 157 | ifneq (,$(filter address,$(SANITIZE_TARGET))) |
| 158 | with_asan := true |
| 159 | endif |
| 160 | |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 161 | include $(CLEAR_VARS) |
| 162 | LOCAL_MODULE := selinux_policy |
| 163 | LOCAL_MODULE_TAGS := optional |
| 164 | # Include SELinux policy. We do this here because different modules |
| 165 | # need to be included based on the value of PRODUCT_FULL_TREBLE. This |
| 166 | # type of conditional inclusion cannot be done in top-level files such |
| 167 | # as build/target/product/embedded.mk. |
| 168 | # This conditional inclusion closely mimics the conditional logic |
| 169 | # inside init/init.cpp for loading SELinux policy from files. |
| 170 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 171 | |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 172 | # Use split SELinux policy |
| 173 | LOCAL_REQUIRED_MODULES += \ |
| 174 | $(platform_mapping_file) \ |
| 175 | nonplat_sepolicy.cil \ |
| 176 | plat_sepolicy.cil \ |
| 177 | plat_and_mapping_sepolicy.cil.sha256 \ |
| 178 | secilc \ |
| 179 | nonplat_file_contexts \ |
| 180 | plat_file_contexts \ |
| 181 | plat_sepolicy_vers.txt |
| 182 | |
| 183 | # Include precompiled policy, unless told otherwise |
| 184 | ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false) |
| 185 | LOCAL_REQUIRED_MODULES += precompiled_sepolicy precompiled_sepolicy.plat_and_mapping.sha256 |
| 186 | endif |
| 187 | |
| 188 | else |
| 189 | # Use monolithic SELinux policy |
| 190 | LOCAL_REQUIRED_MODULES += sepolicy \ |
| 191 | file_contexts.bin |
| 192 | endif |
| 193 | include $(BUILD_PHONY_PACKAGE) |
| 194 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 195 | ################################## |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 196 | # reqd_policy_mask - a policy.conf file which contains only the bare minimum |
| 197 | # policy necessary to use checkpolicy. This bare-minimum policy needs to be |
| 198 | # present in all policy.conf files, but should not necessarily be exported as |
| 199 | # part of the public policy. The rules generated by reqd_policy_mask will allow |
| 200 | # the compilation of public policy and subsequent removal of CIL policy that |
| 201 | # should not be exported. |
| 202 | |
| 203 | reqd_policy_mask.conf := $(intermediates)/reqd_policy_mask.conf |
| 204 | $(reqd_policy_mask.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 205 | $(reqd_policy_mask.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 206 | $(reqd_policy_mask.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 207 | $(reqd_policy_mask.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 208 | $(reqd_policy_mask.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 209 | $(reqd_policy_mask.conf): $(call build_policy, $(sepolicy_build_files), $(REQD_MASK_POLICY)) |
| 210 | @mkdir -p $(dir $@) |
| 211 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 212 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 213 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 214 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 215 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 216 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 217 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 218 | -s $^ > $@ |
| 219 | |
| 220 | reqd_policy_mask.cil := $(intermediates)/reqd_policy_mask.cil |
| 221 | $(reqd_policy_mask.cil): $(reqd_policy_mask.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy |
| 222 | @mkdir -p $(dir $@) |
| 223 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -C -M -c $(POLICYVERS) -o $@ $< |
| 224 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 225 | reqd_policy_mask.conf := |
| 226 | |
| 227 | ################################## |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 228 | # plat_pub_policy - policy that will be exported to be a part of non-platform |
| 229 | # policy corresponding to this platform version. This is a limited subset of |
| 230 | # policy that would not compile in checkpolicy on its own. To get around this |
| 231 | # limitation, add only the required files from private policy, which will |
| 232 | # generate CIL policy that will then be filtered out by the reqd_policy_mask. |
| 233 | plat_pub_policy.conf := $(intermediates)/plat_pub_policy.conf |
| 234 | $(plat_pub_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 235 | $(plat_pub_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 236 | $(plat_pub_policy.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 237 | $(plat_pub_policy.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 238 | $(plat_pub_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 239 | $(plat_pub_policy.conf): $(call build_policy, $(sepolicy_build_files), \ |
Dan Cashman | 6bf50e5 | 2017-04-12 11:12:17 -0700 | [diff] [blame] | 240 | $(PLAT_PUBLIC_POLICY) $(REQD_MASK_POLICY)) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 241 | @mkdir -p $(dir $@) |
| 242 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 243 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 244 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 245 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 246 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 247 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 248 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 249 | -s $^ > $@ |
| 250 | |
| 251 | plat_pub_policy.cil := $(intermediates)/plat_pub_policy.cil |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 252 | $(plat_pub_policy.cil): PRIVATE_POL_CONF := $(plat_pub_policy.conf) |
| 253 | $(plat_pub_policy.cil): PRIVATE_REQD_MASK := $(reqd_policy_mask.cil) |
| 254 | $(plat_pub_policy.cil): $(HOST_OUT_EXECUTABLES)/checkpolicy $(plat_pub_policy.conf) $(reqd_policy_mask.cil) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 255 | @mkdir -p $(dir $@) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 256 | $(hide) $< -C -M -c $(POLICYVERS) -o $@.tmp $(PRIVATE_POL_CONF) |
| 257 | $(hide) grep -Fxv -f $(PRIVATE_REQD_MASK) $@.tmp > $@ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 258 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 259 | plat_pub_policy.conf := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 260 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 261 | ################################## |
| 262 | include $(CLEAR_VARS) |
| 263 | |
| 264 | LOCAL_MODULE := sectxfile_nl |
| 265 | LOCAL_MODULE_CLASS := ETC |
| 266 | LOCAL_MODULE_TAGS := optional |
| 267 | |
| 268 | # Create a file containing newline only to add between context config files |
| 269 | include $(BUILD_SYSTEM)/base_rules.mk |
| 270 | $(LOCAL_BUILT_MODULE): |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 271 | @mkdir -p $(dir $@) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 272 | $(hide) echo > $@ |
| 273 | |
| 274 | built_nl := $(LOCAL_BUILT_MODULE) |
| 275 | |
| 276 | ################################# |
| 277 | include $(CLEAR_VARS) |
| 278 | |
| 279 | LOCAL_MODULE := plat_sepolicy.cil |
| 280 | LOCAL_MODULE_CLASS := ETC |
| 281 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 052b0bb | 2017-03-02 12:39:25 -0800 | [diff] [blame] | 282 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 283 | |
| 284 | include $(BUILD_SYSTEM)/base_rules.mk |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 285 | |
| 286 | # plat_policy.conf - A combination of the private and public platform policy |
| 287 | # which will ship with the device. The platform will always reflect the most |
| 288 | # recent platform version and is not currently being attributized. |
| 289 | plat_policy.conf := $(intermediates)/plat_policy.conf |
| 290 | $(plat_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 291 | $(plat_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 292 | $(plat_policy.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 293 | $(plat_policy.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 294 | $(plat_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 295 | $(plat_policy.conf): $(call build_policy, $(sepolicy_build_files), \ |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 296 | $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY)) |
| 297 | @mkdir -p $(dir $@) |
| 298 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 299 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 300 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Jorge Lucangeli Obes | 84db84e | 2016-11-18 08:42:35 -0500 | [diff] [blame] | 301 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 302 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 303 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 304 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 305 | -s $^ > $@ |
| 306 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 307 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 308 | plat_policy_nvr := $(intermediates)/plat_policy_nvr.cil |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 309 | $(plat_policy_nvr): PRIVATE_ADDITIONAL_CIL_FILES := \ |
| 310 | $(call build_policy, $(sepolicy_build_cil_workaround_files), $(PLAT_PRIVATE_POLICY)) |
| 311 | $(plat_policy_nvr): $(plat_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy \ |
| 312 | $(call build_policy, $(sepolicy_build_cil_workaround_files), $(PLAT_PRIVATE_POLICY)) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 313 | @mkdir -p $(dir $@) |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 314 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -C -c $(POLICYVERS) -o $@ $< |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 315 | $(hide) cat $(PRIVATE_ADDITIONAL_CIL_FILES) >> $@ |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 316 | |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 317 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(plat_policy_nvr) |
| 318 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(plat_policy_nvr) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 319 | @mkdir -p $(dir $@) |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 320 | # Strip out neverallow statements. They aren't needed on-device and their presence |
| 321 | # significantly slows down on-device compilation (e.g., from 400 ms to 6,400 ms on |
| 322 | # sailfish-eng). |
| 323 | grep -v '^(neverallow' $(PRIVATE_CIL_FILES) > $@ |
| 324 | # Confirm that the resulting policy compiles |
| 325 | $(hide) $(HOST_OUT_EXECUTABLES)/secilc -M true -c $(POLICYVERS) $@ -o /dev/null -f /dev/null |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 326 | |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 327 | built_plat_cil := $(LOCAL_BUILT_MODULE) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 328 | plat_policy.conf := |
| 329 | |
| 330 | ################################# |
| 331 | include $(CLEAR_VARS) |
| 332 | |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 333 | LOCAL_MODULE := plat_sepolicy_vers.txt |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 334 | LOCAL_MODULE_CLASS := ETC |
| 335 | LOCAL_MODULE_TAGS := optional |
Dan Cashman | 4f9a648 | 2017-04-10 12:27:18 -0700 | [diff] [blame] | 336 | LOCAL_PROPRIETARY_MODULE := true |
| 337 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 338 | |
| 339 | include $(BUILD_SYSTEM)/base_rules.mk |
| 340 | |
| 341 | $(LOCAL_BUILT_MODULE) : PRIVATE_PLAT_SEPOL_VERS := $(BOARD_SEPOLICY_VERS) |
| 342 | $(LOCAL_BUILT_MODULE) : |
| 343 | mkdir -p $(dir $@) |
| 344 | echo $(PRIVATE_PLAT_SEPOL_VERS) > $@ |
| 345 | |
| 346 | ################################# |
| 347 | include $(CLEAR_VARS) |
| 348 | |
| 349 | LOCAL_MODULE := $(platform_mapping_file) |
| 350 | LOCAL_MODULE_CLASS := ETC |
| 351 | LOCAL_MODULE_TAGS := optional |
| 352 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux/mapping |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 353 | |
| 354 | include $(BUILD_SYSTEM)/base_rules.mk |
| 355 | |
| 356 | # auto-generate the mapping file for current platform policy, since it needs to |
| 357 | # track platform policy development |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 358 | current_mapping.cil := $(intermediates)/mapping/$(PLATFORM_SEPOLICY_VERSION).cil |
| 359 | $(current_mapping.cil) : PRIVATE_VERS := $(PLATFORM_SEPOLICY_VERSION) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 360 | $(current_mapping.cil) : $(plat_pub_policy.cil) $(HOST_OUT_EXECUTABLES)/version_policy |
| 361 | @mkdir -p $(dir $@) |
| 362 | $(hide) $(HOST_OUT_EXECUTABLES)/version_policy -b $< -m -n $(PRIVATE_VERS) -o $@ |
| 363 | |
Sandeep Patil | 42f9598 | 2017-04-07 14:18:48 -0700 | [diff] [blame] | 364 | |
Dan Cashman | 6f14f6b | 2017-04-07 16:36:23 -0700 | [diff] [blame] | 365 | ifeq ($(BOARD_SEPOLICY_VERS), $(PLATFORM_SEPOLICY_VERSION)) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 366 | mapping_policy_nvr := $(current_mapping.cil) |
| 367 | else |
| 368 | mapping_policy_nvr := $(addsuffix /$(BOARD_SEPOLICY_VERS).cil, $(PLAT_PRIVATE_POLICY)/mapping) |
| 369 | endif |
| 370 | |
| 371 | $(LOCAL_BUILT_MODULE): $(mapping_policy_nvr) |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 372 | # Strip out neverallow statements. They aren't needed on-device and their presence |
| 373 | # significantly slows down on-device compilation (e.g., from 400 ms to 6,400 ms on |
| 374 | # sailfish-eng). |
| 375 | grep -v '^(neverallow' $< > $@ |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 376 | |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 377 | built_mapping_cil := $(LOCAL_BUILT_MODULE) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 378 | current_mapping.cil := |
| 379 | |
| 380 | ################################# |
| 381 | include $(CLEAR_VARS) |
| 382 | |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 383 | LOCAL_MODULE := plat_and_mapping_sepolicy.cil.sha256 |
| 384 | LOCAL_MODULE_CLASS := ETC |
| 385 | LOCAL_MODULE_TAGS := optional |
| 386 | LOCAL_MODULE_PATH = $(TARGET_OUT)/etc/selinux |
| 387 | |
| 388 | include $(BUILD_SYSTEM)/base_rules.mk |
| 389 | |
| 390 | $(LOCAL_BUILT_MODULE): $(built_plat_cil) $(built_mapping_cil) |
| 391 | cat $^ | sha256sum | cut -d' ' -f1 > $@ |
| 392 | |
| 393 | ################################# |
| 394 | include $(CLEAR_VARS) |
| 395 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 396 | LOCAL_MODULE := nonplat_sepolicy.cil |
| 397 | LOCAL_MODULE_CLASS := ETC |
| 398 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 052b0bb | 2017-03-02 12:39:25 -0800 | [diff] [blame] | 399 | LOCAL_PROPRIETARY_MODULE := true |
| 400 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 401 | |
| 402 | include $(BUILD_SYSTEM)/base_rules.mk |
| 403 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 404 | # nonplat_policy.conf - A combination of the non-platform private, vendor and |
| 405 | # the exported platform policy associated with the version the non-platform |
| 406 | # policy targets. This needs attributization and to be combined with the |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 407 | # platform-provided policy. Like plat_pub_policy.conf, this needs to make use |
| 408 | # of the reqd_policy_mask files from private policy in order to use checkpolicy. |
| 409 | nonplat_policy.conf := $(intermediates)/nonplat_policy.conf |
| 410 | $(nonplat_policy.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 411 | $(nonplat_policy.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 412 | $(nonplat_policy.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 413 | $(nonplat_policy.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 414 | $(nonplat_policy.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 415 | $(nonplat_policy.conf): $(call build_policy, $(sepolicy_build_files), \ |
Dan Cashman | 6bf50e5 | 2017-04-12 11:12:17 -0700 | [diff] [blame] | 416 | $(PLAT_PUBLIC_POLICY) $(REQD_MASK_POLICY) $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS)) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 417 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 418 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 419 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 420 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Jorge Lucangeli Obes | 84db84e | 2016-11-18 08:42:35 -0500 | [diff] [blame] | 421 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 422 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 423 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 424 | -D target_full_treble=$(PRODUCT_FULL_TREBLE) \ |
Nick Kralevich | 623975f | 2014-01-11 01:31:03 -0800 | [diff] [blame] | 425 | -s $^ > $@ |
Robert Craig | 65d4f44 | 2013-03-27 06:30:25 -0400 | [diff] [blame] | 426 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
Stephen Smalley | 2dd4e51 | 2012-01-04 12:33:27 -0500 | [diff] [blame] | 427 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 428 | nonplat_policy_raw := $(intermediates)/nonplat_policy_raw.cil |
| 429 | $(nonplat_policy_raw): PRIVATE_POL_CONF := $(nonplat_policy.conf) |
| 430 | $(nonplat_policy_raw): PRIVATE_REQD_MASK := $(reqd_policy_mask.cil) |
| 431 | $(nonplat_policy_raw): $(HOST_OUT_EXECUTABLES)/checkpolicy $(nonplat_policy.conf) \ |
| 432 | $(reqd_policy_mask.cil) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 433 | @mkdir -p $(dir $@) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 434 | $(hide) $< -C -M -c $(POLICYVERS) -o $@.tmp $(PRIVATE_POL_CONF) |
| 435 | $(hide) grep -Fxv -f $(PRIVATE_REQD_MASK) $@.tmp > $@ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 436 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 437 | nonplat_policy_nvr := $(intermediates)/nonplat_policy_nvr.cil |
| 438 | $(nonplat_policy_nvr) : PRIVATE_VERS := $(BOARD_SEPOLICY_VERS) |
| 439 | $(nonplat_policy_nvr) : PRIVATE_TGT_POL := $(nonplat_policy_raw) |
| 440 | $(nonplat_policy_nvr) : $(plat_pub_policy.cil) $(nonplat_policy_raw) \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 441 | $(HOST_OUT_EXECUTABLES)/version_policy |
| 442 | @mkdir -p $(dir $@) |
| 443 | $(HOST_OUT_EXECUTABLES)/version_policy -b $< -t $(PRIVATE_TGT_POL) -n $(PRIVATE_VERS) -o $@ |
| 444 | |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 445 | $(LOCAL_BUILT_MODULE): PRIVATE_NONPLAT_CIL_FILES := $(nonplat_policy_nvr) |
| 446 | $(LOCAL_BUILT_MODULE): PRIVATE_DEP_CIL_FILES := $(built_plat_cil) $(built_mapping_cil) |
| 447 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(nonplat_policy_nvr) $(built_plat_cil) \ |
| 448 | $(built_mapping_cil) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 449 | @mkdir -p $(dir $@) |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 450 | # Strip out neverallow statements. They aren't needed on-device and their presence |
| 451 | # significantly slows down on-device compilation (e.g., from 400 ms to 6,400 ms on |
| 452 | # sailfish-eng). |
| 453 | grep -v '^(neverallow' $(PRIVATE_NONPLAT_CIL_FILES) > $@ |
| 454 | # Confirm that the resulting policy compiles combined with platform and mapping policies |
| 455 | $(hide) $(HOST_OUT_EXECUTABLES)/secilc -M true -c $(POLICYVERS) \ |
| 456 | $(PRIVATE_DEP_CIL_FILES) $@ -o /dev/null -f /dev/null |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 457 | |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 458 | built_nonplat_cil := $(LOCAL_BUILT_MODULE) |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 459 | nonplat_policy.conf := |
| 460 | nonplat_policy_raw := |
| 461 | |
| 462 | ################################# |
| 463 | include $(CLEAR_VARS) |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 464 | |
| 465 | LOCAL_MODULE := precompiled_sepolicy |
| 466 | LOCAL_MODULE_CLASS := ETC |
| 467 | LOCAL_MODULE_TAGS := optional |
| 468 | LOCAL_PROPRIETARY_MODULE := true |
| 469 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 470 | |
| 471 | include $(BUILD_SYSTEM)/base_rules.mk |
| 472 | |
| 473 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := \ |
| 474 | $(built_plat_cil) $(built_mapping_cil) $(built_nonplat_cil) |
| 475 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc \ |
| 476 | $(built_plat_cil) $(built_mapping_cil) $(built_nonplat_cil) |
Jeff Vander Stoep | ac171b4 | 2017-04-12 17:01:54 -0700 | [diff] [blame] | 477 | $(hide) $(HOST_OUT_EXECUTABLES)/secilc -M true -G -c $(POLICYVERS) \ |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 478 | $(PRIVATE_CIL_FILES) -o $@ -f /dev/null |
| 479 | |
| 480 | built_precompiled_sepolicy := $(LOCAL_BUILT_MODULE) |
| 481 | |
| 482 | ################################# |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 483 | # SHA-256 digest of the plat_sepolicy.cil and mapping_sepolicy.cil files against |
| 484 | # which precompiled_policy was built. |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 485 | ################################# |
| 486 | include $(CLEAR_VARS) |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 487 | LOCAL_MODULE := precompiled_sepolicy.plat_and_mapping.sha256 |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 488 | LOCAL_MODULE_CLASS := ETC |
| 489 | LOCAL_MODULE_TAGS := optional |
| 490 | LOCAL_PROPRIETARY_MODULE := true |
| 491 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 492 | |
| 493 | include $(BUILD_SYSTEM)/base_rules.mk |
| 494 | |
Dan Cashman | 0e9c47c | 2017-04-04 14:27:41 -0700 | [diff] [blame] | 495 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(built_plat_cil) $(built_mapping_cil) |
| 496 | $(LOCAL_BUILT_MODULE): $(built_precompiled_sepolicy) $(built_plat_cil) $(built_mapping_cil) |
| 497 | cat $(PRIVATE_CIL_FILES) | sha256sum | cut -d' ' -f1 > $@ |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 498 | |
| 499 | ################################# |
| 500 | include $(CLEAR_VARS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 501 | # build this target so that we can still perform neverallow checks |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 502 | |
| 503 | LOCAL_MODULE := sepolicy |
| 504 | LOCAL_MODULE_CLASS := ETC |
| 505 | LOCAL_MODULE_TAGS := optional |
Daniel Cashman | 65d0134 | 2016-12-17 00:53:26 +0000 | [diff] [blame] | 506 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 507 | |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 508 | include $(BUILD_SYSTEM)/base_rules.mk |
| 509 | |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 510 | all_cil_files := \ |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 511 | $(plat_policy_nvr) \ |
| 512 | $(mapping_policy_nvr) \ |
| 513 | $(nonplat_policy_nvr) \ |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 514 | |
| 515 | $(LOCAL_BUILT_MODULE): PRIVATE_CIL_FILES := $(all_cil_files) |
| 516 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files) |
| 517 | @mkdir -p $(dir $@) |
William Roberts | 5d0c2e4 | 2017-03-23 11:26:29 -0700 | [diff] [blame] | 518 | $(hide) $< -M true -c $(POLICYVERS) $(PRIVATE_CIL_FILES) -o $@.tmp -f /dev/null |
Nick Kralevich | bca98ef | 2016-02-26 20:06:52 -0800 | [diff] [blame] | 519 | $(hide) $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $@.tmp permissive > $@.permissivedomains |
| 520 | $(hide) if [ "$(TARGET_BUILD_VARIANT)" = "user" -a -s $@.permissivedomains ]; then \ |
| 521 | echo "==========" 1>&2; \ |
| 522 | echo "ERROR: permissive domains not allowed in user builds" 1>&2; \ |
| 523 | echo "List of invalid domains:" 1>&2; \ |
| 524 | cat $@.permissivedomains 1>&2; \ |
| 525 | exit 1; \ |
| 526 | fi |
| 527 | $(hide) mv $@.tmp $@ |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 528 | |
Ying Wang | d8b122c | 2012-10-25 19:01:31 -0700 | [diff] [blame] | 529 | built_sepolicy := $(LOCAL_BUILT_MODULE) |
dcashman | 2e00e63 | 2016-10-12 14:58:09 -0700 | [diff] [blame] | 530 | all_cil_files := |
Stephen Smalley | 01a58af | 2012-10-02 12:46:37 -0400 | [diff] [blame] | 531 | |
Alex Klyubin | 84aa742 | 2017-03-10 09:36:07 -0800 | [diff] [blame] | 532 | ################################# |
| 533 | include $(CLEAR_VARS) |
| 534 | |
| 535 | # keep concrete sepolicy for neverallow checks |
| 536 | |
| 537 | LOCAL_MODULE := sepolicy.recovery |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 538 | LOCAL_MODULE_STEM := sepolicy |
Alex Klyubin | 84aa742 | 2017-03-10 09:36:07 -0800 | [diff] [blame] | 539 | LOCAL_MODULE_CLASS := ETC |
| 540 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 541 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
Alex Klyubin | 84aa742 | 2017-03-10 09:36:07 -0800 | [diff] [blame] | 542 | |
| 543 | include $(BUILD_SYSTEM)/base_rules.mk |
| 544 | |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 545 | sepolicy.recovery.conf := $(intermediates)/sepolicy.recovery.conf |
| 546 | $(sepolicy.recovery.conf): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 547 | $(sepolicy.recovery.conf): PRIVATE_MLS_CATS := $(MLS_CATS) |
| 548 | $(sepolicy.recovery.conf): PRIVATE_TGT_ARCH := $(my_target_arch) |
| 549 | $(sepolicy.recovery.conf): PRIVATE_TGT_WITH_ASAN := $(with_asan) |
| 550 | $(sepolicy.recovery.conf): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 551 | $(sepolicy.recovery.conf): $(call build_policy, $(sepolicy_build_files), \ |
| 552 | $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY) \ |
| 553 | $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS)) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 554 | @mkdir -p $(dir $@) |
| 555 | $(hide) m4 $(PRIVATE_ADDITIONAL_M4DEFS) \ |
| 556 | -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 557 | -D target_build_variant=$(TARGET_BUILD_VARIANT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 558 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 559 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 560 | -D target_with_asan=$(PRIVATE_TGT_WITH_ASAN) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 561 | -D target_recovery=true \ |
| 562 | -s $^ > $@ |
| 563 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 564 | |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 565 | $(LOCAL_BUILT_MODULE): $(sepolicy.recovery.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy \ |
| 566 | $(HOST_OUT_EXECUTABLES)/sepolicy-analyze |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 567 | @mkdir -p $(dir $@) |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 568 | $(hide) $(HOST_OUT_EXECUTABLES)/checkpolicy -M -c $(POLICYVERS) -o $@.tmp $< |
Nick Kralevich | bca98ef | 2016-02-26 20:06:52 -0800 | [diff] [blame] | 569 | $(hide) $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $@.tmp permissive > $@.permissivedomains |
| 570 | $(hide) if [ "$(TARGET_BUILD_VARIANT)" = "user" -a -s $@.permissivedomains ]; then \ |
| 571 | echo "==========" 1>&2; \ |
| 572 | echo "ERROR: permissive domains not allowed in user builds" 1>&2; \ |
| 573 | echo "List of invalid domains:" 1>&2; \ |
| 574 | cat $@.permissivedomains 1>&2; \ |
| 575 | exit 1; \ |
| 576 | fi |
| 577 | $(hide) mv $@.tmp $@ |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 578 | |
Dan Cashman | c8d4535 | 2017-04-11 07:38:48 -0700 | [diff] [blame] | 579 | sepolicy.recovery.conf := |
Stephen Smalley | e60723a | 2014-05-29 16:40:15 -0400 | [diff] [blame] | 580 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 581 | ################################## |
Alex Klyubin | 446279a | 2017-04-06 14:45:50 -0700 | [diff] [blame] | 582 | # SELinux policy embedded into CTS. |
| 583 | # CTS checks neverallow rules of this policy against the policy of the device under test. |
| 584 | ################################## |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 585 | include $(CLEAR_VARS) |
| 586 | |
| 587 | LOCAL_MODULE := general_sepolicy.conf |
| 588 | LOCAL_MODULE_CLASS := ETC |
| 589 | LOCAL_MODULE_TAGS := tests |
| 590 | |
| 591 | include $(BUILD_SYSTEM)/base_rules.mk |
| 592 | |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 593 | $(LOCAL_BUILT_MODULE): PRIVATE_MLS_SENS := $(MLS_SENS) |
| 594 | $(LOCAL_BUILT_MODULE): PRIVATE_MLS_CATS := $(MLS_CATS) |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 595 | $(LOCAL_BUILT_MODULE): PRIVATE_TGT_ARCH := $(my_target_arch) |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 596 | $(LOCAL_BUILT_MODULE): $(call build_policy, $(sepolicy_build_files), \ |
| 597 | $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY)) |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 598 | mkdir -p $(dir $@) |
| 599 | $(hide) m4 -D mls_num_sens=$(PRIVATE_MLS_SENS) -D mls_num_cats=$(PRIVATE_MLS_CATS) \ |
| 600 | -D target_build_variant=user \ |
Jorge Lucangeli Obes | 84db84e | 2016-11-18 08:42:35 -0500 | [diff] [blame] | 601 | -D target_with_dexpreopt=$(WITH_DEXPREOPT) \ |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 602 | -D target_arch=$(PRIVATE_TGT_ARCH) \ |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 603 | -D target_with_asan=false \ |
Alex Klyubin | 446279a | 2017-04-06 14:45:50 -0700 | [diff] [blame] | 604 | -D target_full_treble=cts \ |
dcashman | 704741a | 2014-07-25 19:11:52 -0700 | [diff] [blame] | 605 | -s $^ > $@ |
| 606 | $(hide) sed '/dontaudit/d' $@ > $@.dontaudit |
| 607 | |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 608 | ################################## |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 609 | # TODO - remove this. Keep around until we get the filesystem creation stuff taken care of. |
| 610 | # |
William Roberts | b876993 | 2015-06-29 16:31:23 -0700 | [diff] [blame] | 611 | include $(CLEAR_VARS) |
| 612 | |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 613 | LOCAL_MODULE := file_contexts.bin |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 614 | LOCAL_MODULE_CLASS := ETC |
| 615 | LOCAL_MODULE_TAGS := optional |
| 616 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 617 | |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 618 | include $(BUILD_SYSTEM)/base_rules.mk |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 619 | |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 620 | # The file_contexts.bin is built in the following way: |
| 621 | # 1. Collect all file_contexts files in THIS repository and process them with |
| 622 | # m4 into a tmp file called file_contexts.local.tmp. |
| 623 | # 2. Collect all device specific file_contexts files and process them with m4 |
| 624 | # into a tmp file called file_contexts.device.tmp. |
| 625 | # 3. Run checkfc -e (allow no device fc entries ie empty) and fc_sort on |
| 626 | # file_contexts.device.tmp and output to file_contexts.device.sorted.tmp. |
| 627 | # 4. Concatenate file_contexts.local.tmp and file_contexts.device.tmp into |
| 628 | # file_contexts.concat.tmp. |
| 629 | # 5. Run checkfc and sefcontext_compile on file_contexts.concat.tmp to produce |
| 630 | # file_contexts.bin. |
| 631 | # |
| 632 | # Note: That a newline file is placed between each file_context file found to |
| 633 | # ensure a proper build when an fc file is missing an ending newline. |
William Roberts | 29d1468 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 634 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 635 | local_fc_files := $(PLAT_PRIVATE_POLICY)/file_contexts |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 636 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 637 | local_fc_files := $(local_fc_files) $(PLAT_PRIVATE_POLICY)/file_contexts_asan |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 638 | endif |
| 639 | local_fcfiles_with_nl := $(call add_nl, $(local_fc_files), $(built_nl)) |
| 640 | |
| 641 | file_contexts.local.tmp := $(intermediates)/file_contexts.local.tmp |
| 642 | $(file_contexts.local.tmp): $(local_fcfiles_with_nl) |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 643 | @mkdir -p $(dir $@) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 644 | $(hide) m4 -s $^ > $@ |
| 645 | |
| 646 | device_fc_files := $(call build_device_policy, file_contexts) |
| 647 | device_fcfiles_with_nl := $(call add_nl, $(device_fc_files), $(built_nl)) |
| 648 | |
| 649 | file_contexts.device.tmp := $(intermediates)/file_contexts.device.tmp |
| 650 | $(file_contexts.device.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 651 | $(file_contexts.device.tmp): $(device_fcfiles_with_nl) |
| 652 | @mkdir -p $(dir $@) |
| 653 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
| 654 | |
| 655 | file_contexts.device.sorted.tmp := $(intermediates)/file_contexts.device.sorted.tmp |
| 656 | $(file_contexts.device.sorted.tmp): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 657 | $(file_contexts.device.sorted.tmp): $(file_contexts.device.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/fc_sort $(HOST_OUT_EXECUTABLES)/checkfc |
| 658 | @mkdir -p $(dir $@) |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 659 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e $(PRIVATE_SEPOLICY) $< |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 660 | $(hide) $(HOST_OUT_EXECUTABLES)/fc_sort $< $@ |
| 661 | |
| 662 | file_contexts.concat.tmp := $(intermediates)/file_contexts.concat.tmp |
| 663 | $(file_contexts.concat.tmp): $(file_contexts.local.tmp) $(file_contexts.device.sorted.tmp) |
| 664 | @mkdir -p $(dir $@) |
| 665 | $(hide) m4 -s $^ > $@ |
Stephen Smalley | 5b340be | 2012-03-06 11:12:41 -0500 | [diff] [blame] | 666 | |
William Roberts | 3746a0a | 2015-09-25 10:18:44 -0700 | [diff] [blame] | 667 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 668 | $(LOCAL_BUILT_MODULE): $(file_contexts.concat.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/sefcontext_compile $(HOST_OUT_EXECUTABLES)/checkfc |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 669 | @mkdir -p $(dir $@) |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 670 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc $(PRIVATE_SEPOLICY) $< |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 671 | $(hide) $(HOST_OUT_EXECUTABLES)/sefcontext_compile -o $@ $< |
| 672 | |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 673 | built_fc := $(LOCAL_BUILT_MODULE) |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 674 | local_fc_files := |
| 675 | local_fcfiles_with_nl := |
| 676 | device_fc_files := |
| 677 | device_fcfiles_with_nl := |
| 678 | file_contexts.concat.tmp := |
| 679 | file_contexts.device.sorted.tmp := |
| 680 | file_contexts.device.tmp := |
| 681 | file_contexts.local.tmp := |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 682 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 683 | ################################## |
| 684 | include $(CLEAR_VARS) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 685 | |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 686 | LOCAL_MODULE := file_contexts.bin.recovery |
| 687 | LOCAL_MODULE_STEM := file_contexts.bin |
| 688 | LOCAL_MODULE_CLASS := ETC |
| 689 | LOCAL_MODULE_TAGS := optional |
| 690 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
| 691 | |
| 692 | include $(BUILD_SYSTEM)/base_rules.mk |
| 693 | |
| 694 | $(LOCAL_BUILT_MODULE): $(built_fc) |
| 695 | $(hide) cp -f $< $@ |
| 696 | |
| 697 | ################################## |
| 698 | include $(CLEAR_VARS) |
| 699 | |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 700 | LOCAL_MODULE := plat_file_contexts |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 701 | LOCAL_MODULE_CLASS := ETC |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 702 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 0cb417a | 2017-03-08 14:12:54 -0800 | [diff] [blame] | 703 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 704 | |
| 705 | include $(BUILD_SYSTEM)/base_rules.mk |
| 706 | |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 707 | local_fc_files := $(PLAT_PRIVATE_POLICY)/file_contexts |
| 708 | ifneq ($(filter address,$(SANITIZE_TARGET)),) |
| 709 | local_fc_files += $(PLAT_PRIVATE_POLICY)/file_contexts_asan |
| 710 | endif |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 711 | local_fcfiles_with_nl := $(call add_nl, $(local_fc_files), $(built_nl)) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 712 | |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 713 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_FILES := $(local_fcfiles_with_nl) |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 714 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 715 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_SORT := $(HOST_OUT_EXECUTABLES)/fc_sort |
| 716 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/checkfc $(HOST_OUT_EXECUTABLES)/fc_sort \ |
| 717 | $(local_fcfiles_with_nl) $(built_sepolicy) |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 718 | @mkdir -p $(dir $@) |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 719 | $(hide) m4 -s $(PRIVATE_FC_FILES) > $@.tmp |
| 720 | $(hide) $< $(PRIVATE_SEPOLICY) $@.tmp |
| 721 | $(hide) $(PRIVATE_FC_SORT) $@.tmp $@ |
Richard Haines | c2d0191 | 2015-08-06 17:43:52 +0100 | [diff] [blame] | 722 | |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 723 | built_plat_fc := $(LOCAL_BUILT_MODULE) |
| 724 | local_fc_files := |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 725 | local_fcfiles_with_nl := |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 726 | |
| 727 | ################################## |
| 728 | include $(CLEAR_VARS) |
| 729 | |
| 730 | LOCAL_MODULE := nonplat_file_contexts |
| 731 | LOCAL_MODULE_CLASS := ETC |
| 732 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 0cb417a | 2017-03-08 14:12:54 -0800 | [diff] [blame] | 733 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 734 | |
| 735 | include $(BUILD_SYSTEM)/base_rules.mk |
| 736 | |
| 737 | nonplat_fc_files := $(call build_device_policy, file_contexts) |
| 738 | nonplat_fcfiles_with_nl := $(call add_nl, $(nonplat_fc_files), $(built_nl)) |
| 739 | |
| 740 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_FILES := $(nonplat_fcfiles_with_nl) |
| 741 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 742 | $(LOCAL_BUILT_MODULE): PRIVATE_FC_SORT := $(HOST_OUT_EXECUTABLES)/fc_sort |
| 743 | $(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/checkfc $(HOST_OUT_EXECUTABLES)/fc_sort \ |
Alex Klyubin | e4665d7 | 2017-01-19 19:58:34 -0800 | [diff] [blame] | 744 | $(nonplat_fcfiles_with_nl) $(built_sepolicy) |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 745 | @mkdir -p $(dir $@) |
| 746 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_FC_FILES) > $@.tmp |
| 747 | $(hide) $< $(PRIVATE_SEPOLICY) $@.tmp |
| 748 | $(hide) $(PRIVATE_FC_SORT) $@.tmp $@ |
| 749 | |
| 750 | built_nonplat_fc := $(LOCAL_BUILT_MODULE) |
| 751 | nonplat_fc_files := |
| 752 | nonplat_fcfiles_with_nl := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 753 | |
| 754 | ################################## |
| 755 | include $(CLEAR_VARS) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 756 | LOCAL_MODULE := plat_seapp_contexts |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 757 | LOCAL_MODULE_CLASS := ETC |
| 758 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 759 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 760 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 761 | else |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 762 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 763 | endif |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 764 | |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 765 | include $(BUILD_SYSTEM)/base_rules.mk |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 766 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 767 | plat_sc_files := $(call build_policy, seapp_contexts, $(PLAT_PRIVATE_POLICY)) |
William Roberts | 171a062 | 2012-08-16 10:55:05 -0700 | [diff] [blame] | 768 | |
Ying Wang | d8b122c | 2012-10-25 19:01:31 -0700 | [diff] [blame] | 769 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 770 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_FILES := $(plat_sc_files) |
| 771 | $(LOCAL_BUILT_MODULE): $(built_sepolicy) $(plat_sc_files) $(HOST_OUT_EXECUTABLES)/checkseapp |
William Roberts | f0e0a94 | 2012-08-27 15:41:15 -0700 | [diff] [blame] | 772 | @mkdir -p $(dir $@) |
William Roberts | 99fe8df | 2015-06-30 13:53:51 -0700 | [diff] [blame] | 773 | $(hide) $(HOST_OUT_EXECUTABLES)/checkseapp -p $(PRIVATE_SEPOLICY) -o $@ $(PRIVATE_SC_FILES) |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 774 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 775 | built_plat_sc := $(LOCAL_BUILT_MODULE) |
| 776 | plat_sc_files := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 777 | |
Ying Wang | 02fb5f3 | 2012-01-17 17:51:09 -0800 | [diff] [blame] | 778 | ################################## |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 779 | include $(CLEAR_VARS) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 780 | LOCAL_MODULE := nonplat_seapp_contexts |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 781 | LOCAL_MODULE_CLASS := ETC |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 782 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 783 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 784 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 785 | else |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 786 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 787 | endif |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 788 | |
| 789 | include $(BUILD_SYSTEM)/base_rules.mk |
| 790 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 791 | nonplat_sc_files := $(call build_policy, seapp_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 792 | plat_sc_neverallow_files := $(addprefix $(PLAT_PRIVATE_POLICY)/, seapp_contexts) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 793 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 794 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 795 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_FILES := $(nonplat_sc_files) |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 796 | $(LOCAL_BUILT_MODULE): PRIVATE_SC_NEVERALLOW_FILES := $(plat_sc_neverallow_files) |
| 797 | $(LOCAL_BUILT_MODULE): $(built_sepolicy) $(nonplat_sc_files) $(HOST_OUT_EXECUTABLES)/checkseapp $(plat_sc_neverallow_files) |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 798 | @mkdir -p $(dir $@) |
Xin Li | ec6f393 | 2017-03-14 16:51:13 -0700 | [diff] [blame] | 799 | $(hide) grep -ie '^neverallow' $(PRIVATE_SC_NEVERALLOW_FILES) > $@.tmp |
| 800 | $(hide) $(HOST_OUT_EXECUTABLES)/checkseapp -p $(PRIVATE_SEPOLICY) -o $@ $(PRIVATE_SC_FILES) $@.tmp |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 801 | |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 802 | built_nonplat_sc := $(LOCAL_BUILT_MODULE) |
| 803 | nonplat_sc_files := |
Stephen Smalley | 3771287 | 2015-03-12 15:46:36 -0400 | [diff] [blame] | 804 | |
| 805 | ################################## |
| 806 | include $(CLEAR_VARS) |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 807 | LOCAL_MODULE := plat_seapp_neverallows |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 808 | LOCAL_MODULE_CLASS := ETC |
| 809 | LOCAL_MODULE_TAGS := tests |
| 810 | |
| 811 | include $(BUILD_SYSTEM)/base_rules.mk |
| 812 | |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 813 | $(LOCAL_BUILT_MODULE): $(plat_sc_neverallow_files) |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 814 | @mkdir -p $(dir $@) |
| 815 | - $(hide) grep -ie '^neverallow' $< > $@ |
| 816 | |
Jeff Vander Stoep | 87ae5f7 | 2017-03-06 22:53:09 -0800 | [diff] [blame] | 817 | plat_sc_neverallow_files := |
William Roberts | 4ee7131 | 2015-06-25 11:59:30 -0700 | [diff] [blame] | 818 | |
| 819 | ################################## |
| 820 | include $(CLEAR_VARS) |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 821 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 822 | LOCAL_MODULE := plat_property_contexts |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 823 | LOCAL_MODULE_CLASS := ETC |
| 824 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 825 | |
| 826 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 827 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 828 | else |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 829 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 830 | endif |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 831 | |
| 832 | include $(BUILD_SYSTEM)/base_rules.mk |
| 833 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 834 | plat_pcfiles := $(call build_policy, property_contexts, $(PLAT_PRIVATE_POLICY)) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 835 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 836 | plat_property_contexts.tmp := $(intermediates)/plat_property_contexts.tmp |
| 837 | $(plat_property_contexts.tmp): PRIVATE_PC_FILES := $(plat_pcfiles) |
| 838 | $(plat_property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 839 | $(plat_property_contexts.tmp): $(plat_pcfiles) |
William Roberts | 7f81b33 | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 840 | @mkdir -p $(dir $@) |
Colin Cross | 9eb6c87 | 2015-10-01 21:25:09 +0000 | [diff] [blame] | 841 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 842 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 843 | $(LOCAL_BUILT_MODULE): $(plat_property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 844 | @mkdir -p $(dir $@) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 845 | $(hide) sed -e 's/#.*$$//' -e '/^$$/d' $< | sort -u -o $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 846 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $@ |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 847 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 848 | built_plat_pc := $(LOCAL_BUILT_MODULE) |
| 849 | plat_pcfiles := |
| 850 | plat_property_contexts.tmp := |
Robert Craig | 8b7545b | 2014-03-20 09:35:08 -0400 | [diff] [blame] | 851 | |
Stephen Smalley | 124720a | 2012-04-04 10:11:16 -0400 | [diff] [blame] | 852 | ################################## |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 853 | include $(CLEAR_VARS) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 854 | LOCAL_MODULE := nonplat_property_contexts |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 855 | LOCAL_MODULE_CLASS := ETC |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 856 | LOCAL_MODULE_TAGS := optional |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 857 | |
| 858 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 859 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 860 | else |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 861 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Alex Klyubin | 9d59041 | 2017-03-08 13:10:05 -0800 | [diff] [blame] | 862 | endif |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 863 | |
Stephen Smalley | c936173 | 2015-03-13 09:36:57 -0400 | [diff] [blame] | 864 | include $(BUILD_SYSTEM)/base_rules.mk |
| 865 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 866 | nonplat_pcfiles := $(call build_policy, property_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
Sandeep Patil | 262edc3 | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 867 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 868 | nonplat_property_contexts.tmp := $(intermediates)/nonplat_property_contexts.tmp |
| 869 | $(nonplat_property_contexts.tmp): PRIVATE_PC_FILES := $(nonplat_pcfiles) |
| 870 | $(nonplat_property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 871 | $(nonplat_property_contexts.tmp): $(nonplat_pcfiles) |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 872 | @mkdir -p $(dir $@) |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 873 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ |
| 874 | |
| 875 | |
| 876 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 877 | $(LOCAL_BUILT_MODULE): $(nonplat_property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc |
| 878 | @mkdir -p $(dir $@) |
| 879 | $(hide) sed -e 's/#.*$$//' -e '/^$$/d' $< | sort -u -o $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 880 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $@ |
William Roberts | dcffd2b | 2015-09-29 13:52:37 -0700 | [diff] [blame] | 881 | |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 882 | built_nonplat_pc := $(LOCAL_BUILT_MODULE) |
| 883 | nonplat_pcfiles := |
| 884 | nonplat_property_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 885 | |
| 886 | ################################## |
| 887 | include $(CLEAR_VARS) |
| 888 | |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 889 | LOCAL_MODULE := plat_property_contexts.recovery |
| 890 | LOCAL_MODULE_STEM := plat_property_contexts |
| 891 | LOCAL_MODULE_CLASS := ETC |
| 892 | LOCAL_MODULE_TAGS := optional |
| 893 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
| 894 | |
| 895 | include $(BUILD_SYSTEM)/base_rules.mk |
| 896 | |
| 897 | $(LOCAL_BUILT_MODULE): $(built_plat_pc) |
| 898 | $(hide) cp -f $< $@ |
| 899 | |
| 900 | ################################## |
| 901 | include $(CLEAR_VARS) |
Alex Klyubin | ec78c37 | 2017-03-10 12:44:16 -0800 | [diff] [blame] | 902 | LOCAL_MODULE := nonplat_property_contexts.recovery |
| 903 | LOCAL_MODULE_STEM := nonplat_property_contexts |
| 904 | LOCAL_MODULE_CLASS := ETC |
| 905 | LOCAL_MODULE_TAGS := optional |
| 906 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) |
| 907 | |
| 908 | include $(BUILD_SYSTEM)/base_rules.mk |
| 909 | |
| 910 | $(LOCAL_BUILT_MODULE): $(built_nonplat_pc) |
| 911 | $(hide) cp -f $< $@ |
| 912 | |
| 913 | ################################## |
| 914 | include $(CLEAR_VARS) |
| 915 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 916 | LOCAL_MODULE := plat_service_contexts |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 917 | LOCAL_MODULE_CLASS := ETC |
| 918 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 919 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 920 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 921 | else |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 922 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 923 | endif |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 924 | |
| 925 | include $(BUILD_SYSTEM)/base_rules.mk |
| 926 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 927 | plat_svcfiles := $(call build_policy, service_contexts, $(PLAT_PRIVATE_POLICY)) |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 928 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 929 | plat_service_contexts.tmp := $(intermediates)/plat_service_contexts.tmp |
| 930 | $(plat_service_contexts.tmp): PRIVATE_SVC_FILES := $(plat_svcfiles) |
| 931 | $(plat_service_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 932 | $(plat_service_contexts.tmp): $(plat_svcfiles) |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 933 | @mkdir -p $(dir $@) |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 934 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 935 | |
| 936 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 937 | $(LOCAL_BUILT_MODULE): $(plat_service_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 938 | @mkdir -p $(dir $@) |
William Roberts | c9fce3f | 2016-04-06 11:53:04 -0700 | [diff] [blame] | 939 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 940 | $(HOST_OUT_EXECUTABLES)/checkfc -s $(PRIVATE_SEPOLICY) $@ |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 941 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 942 | built_plat_svc := $(LOCAL_BUILT_MODULE) |
| 943 | plat_svcfiles := |
| 944 | plat_service_contexts.tmp := |
Riley Spahn | f90c41f | 2014-06-05 15:52:02 -0700 | [diff] [blame] | 945 | |
| 946 | ################################## |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 947 | include $(CLEAR_VARS) |
| 948 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 949 | LOCAL_MODULE := nonplat_service_contexts |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 950 | LOCAL_MODULE_CLASS := ETC |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 951 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 952 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 953 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 954 | else |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 955 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
Jeff Vander Stoep | 4e3a4c7 | 2017-03-08 22:28:03 -0800 | [diff] [blame] | 956 | endif |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 957 | |
| 958 | include $(BUILD_SYSTEM)/base_rules.mk |
| 959 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 960 | nonplat_svcfiles := $(call build_policy, service_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 961 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 962 | nonplat_service_contexts.tmp := $(intermediates)/nonplat_service_contexts.tmp |
| 963 | $(nonplat_service_contexts.tmp): PRIVATE_SVC_FILES := $(nonplat_svcfiles) |
| 964 | $(nonplat_service_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 965 | $(nonplat_service_contexts.tmp): $(nonplat_svcfiles) |
| 966 | @mkdir -p $(dir $@) |
| 967 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 968 | |
| 969 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 970 | $(LOCAL_BUILT_MODULE): $(nonplat_service_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 971 | @mkdir -p $(dir $@) |
William Roberts | c9fce3f | 2016-04-06 11:53:04 -0700 | [diff] [blame] | 972 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
dcashman | 0779155 | 2016-12-07 11:27:47 -0800 | [diff] [blame] | 973 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -s $(PRIVATE_SEPOLICY) $@ |
William Roberts | 7fc865a | 2015-09-29 14:17:38 -0700 | [diff] [blame] | 974 | |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 975 | built_nonplat_svc := $(LOCAL_BUILT_MODULE) |
| 976 | nonplat_svcfiles := |
| 977 | nonplat_service_contexts.tmp := |
Stephen Smalley | 2e0cd5a | 2015-03-12 17:45:03 -0400 | [diff] [blame] | 978 | |
| 979 | ################################## |
| 980 | include $(CLEAR_VARS) |
| 981 | |
Martijn Coenen | 3ea47b9 | 2017-04-07 16:14:43 -0700 | [diff] [blame] | 982 | LOCAL_MODULE := plat_hwservice_contexts |
| 983 | LOCAL_MODULE_CLASS := ETC |
| 984 | LOCAL_MODULE_TAGS := optional |
| 985 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 986 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
| 987 | else |
| 988 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 989 | endif |
| 990 | |
| 991 | include $(BUILD_SYSTEM)/base_rules.mk |
| 992 | |
| 993 | plat_hwsvcfiles := $(call build_policy, hwservice_contexts, $(PLAT_PRIVATE_POLICY)) |
| 994 | |
| 995 | plat_hwservice_contexts.tmp := $(intermediates)/plat_hwservice_contexts.tmp |
| 996 | $(plat_hwservice_contexts.tmp): PRIVATE_SVC_FILES := $(plat_hwsvcfiles) |
| 997 | $(plat_hwservice_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 998 | $(plat_hwservice_contexts.tmp): $(plat_hwsvcfiles) |
| 999 | @mkdir -p $(dir $@) |
| 1000 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 1001 | |
| 1002 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 1003 | $(LOCAL_BUILT_MODULE): $(plat_hwservice_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 1004 | @mkdir -p $(dir $@) |
| 1005 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
| 1006 | $(HOST_OUT_EXECUTABLES)/checkfc -e -l $(PRIVATE_SEPOLICY) $@ |
| 1007 | |
| 1008 | plat_hwsvcfiles := |
| 1009 | plat_hwservice_contexts.tmp := |
| 1010 | |
| 1011 | ################################## |
| 1012 | include $(CLEAR_VARS) |
| 1013 | |
| 1014 | LOCAL_MODULE := nonplat_hwservice_contexts |
| 1015 | LOCAL_MODULE_CLASS := ETC |
| 1016 | LOCAL_MODULE_TAGS := optional |
| 1017 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 1018 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 1019 | else |
| 1020 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 1021 | endif |
| 1022 | |
| 1023 | include $(BUILD_SYSTEM)/base_rules.mk |
| 1024 | |
| 1025 | nonplat_hwsvcfiles := $(call build_policy, hwservice_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
| 1026 | |
| 1027 | nonplat_hwservice_contexts.tmp := $(intermediates)/nonplat_hwservice_contexts.tmp |
| 1028 | $(nonplat_hwservice_contexts.tmp): PRIVATE_SVC_FILES := $(nonplat_hwsvcfiles) |
| 1029 | $(nonplat_hwservice_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 1030 | $(nonplat_hwservice_contexts.tmp): $(nonplat_hwsvcfiles) |
| 1031 | @mkdir -p $(dir $@) |
| 1032 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 1033 | |
| 1034 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 1035 | $(LOCAL_BUILT_MODULE): $(nonplat_hwservice_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 1036 | @mkdir -p $(dir $@) |
| 1037 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
| 1038 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e -l $(PRIVATE_SEPOLICY) $@ |
| 1039 | |
| 1040 | nonplat_hwsvcfiles := |
| 1041 | nonplat_hwservice_contexts.tmp := |
| 1042 | |
| 1043 | ################################## |
| 1044 | include $(CLEAR_VARS) |
| 1045 | |
Martijn Coenen | 6676c23 | 2017-03-31 17:29:53 -0700 | [diff] [blame] | 1046 | LOCAL_MODULE := vndservice_contexts |
| 1047 | LOCAL_MODULE_CLASS := ETC |
| 1048 | LOCAL_MODULE_TAGS := optional |
| 1049 | ifeq ($(PRODUCT_FULL_TREBLE),true) |
| 1050 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
| 1051 | else |
| 1052 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) |
| 1053 | endif |
| 1054 | |
| 1055 | include $(BUILD_SYSTEM)/base_rules.mk |
| 1056 | |
| 1057 | vnd_svcfiles := $(call build_policy, vndservice_contexts, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
| 1058 | |
| 1059 | vndservice_contexts.tmp := $(intermediates)/vndservice_contexts.tmp |
| 1060 | $(vndservice_contexts.tmp): PRIVATE_SVC_FILES := $(vnd_svcfiles) |
| 1061 | $(vndservice_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 1062 | $(vndservice_contexts.tmp): $(vnd_svcfiles) |
| 1063 | @mkdir -p $(dir $@) |
| 1064 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_SVC_FILES) > $@ |
| 1065 | |
| 1066 | $(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) |
| 1067 | $(LOCAL_BUILT_MODULE): $(vndservice_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(ACP) |
| 1068 | @mkdir -p $(dir $@) |
| 1069 | sed -e 's/#.*$$//' -e '/^$$/d' $< > $@ |
Martijn Coenen | ee97662 | 2017-04-07 10:08:55 -0700 | [diff] [blame] | 1070 | $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -e -v $(PRIVATE_SEPOLICY) $@ |
Martijn Coenen | 6676c23 | 2017-03-31 17:29:53 -0700 | [diff] [blame] | 1071 | |
| 1072 | vnd_svcfiles := |
| 1073 | vndservice_contexts.tmp := |
| 1074 | ################################## |
| 1075 | include $(CLEAR_VARS) |
| 1076 | |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1077 | LOCAL_MODULE := plat_mac_permissions.xml |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1078 | LOCAL_MODULE_CLASS := ETC |
| 1079 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | bba9e7b | 2017-03-10 15:51:23 -0800 | [diff] [blame] | 1080 | LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1081 | |
William Roberts | 2c8a55d | 2012-11-30 14:59:09 -0800 | [diff] [blame] | 1082 | include $(BUILD_SYSTEM)/base_rules.mk |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1083 | |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1084 | # Build keys.conf |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1085 | plat_mac_perms_keys.tmp := $(intermediates)/plat_keys.tmp |
| 1086 | $(plat_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
| 1087 | $(plat_mac_perms_keys.tmp): $(call build_policy, keys.conf, $(PLAT_PRIVATE_POLICY)) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1088 | @mkdir -p $(dir $@) |
William Roberts | d218558 | 2015-07-16 11:28:02 -0700 | [diff] [blame] | 1089 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1090 | |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1091 | all_plat_mac_perms_files := $(call build_policy, mac_permissions.xml, $(PLAT_PRIVATE_POLICY)) |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1092 | |
Shinichiro Hamaji | ef0c14d | 2016-05-13 16:04:58 +0900 | [diff] [blame] | 1093 | # Should be synced with keys.conf. |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1094 | all_plat_keys := platform media shared testkey |
| 1095 | all_plat_keys := $(all_keys:%=$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))/%.x509.pem) |
Shinichiro Hamaji | ef0c14d | 2016-05-13 16:04:58 +0900 | [diff] [blame] | 1096 | |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1097 | $(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_plat_mac_perms_files) |
| 1098 | $(LOCAL_BUILT_MODULE): $(plat_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys.py \ |
| 1099 | $(all_plat_mac_perms_files) $(all_plat_keys) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1100 | @mkdir -p $(dir $@) |
Nick Kralevich | c3c9052 | 2013-10-25 12:25:36 -0700 | [diff] [blame] | 1101 | $(hide) DEFAULT_SYSTEM_DEV_CERTIFICATE="$(dir $(DEFAULT_SYSTEM_DEV_CERTIFICATE))" \ |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 1102 | $(HOST_OUT_EXECUTABLES)/insertkeys.py -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES) |
Geremy Condra | cd4104e | 2013-03-26 18:19:12 +0000 | [diff] [blame] | 1103 | |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 1104 | all_mac_perms_files := |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1105 | all_plat_keys := |
| 1106 | plat_mac_perms_keys.tmp := |
| 1107 | |
| 1108 | ################################## |
| 1109 | include $(CLEAR_VARS) |
| 1110 | |
| 1111 | LOCAL_MODULE := nonplat_mac_permissions.xml |
| 1112 | LOCAL_MODULE_CLASS := ETC |
| 1113 | LOCAL_MODULE_TAGS := optional |
Jeff Vander Stoep | bba9e7b | 2017-03-10 15:51:23 -0800 | [diff] [blame] | 1114 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1115 | |
| 1116 | include $(BUILD_SYSTEM)/base_rules.mk |
| 1117 | |
| 1118 | # Build keys.conf |
| 1119 | nonplat_mac_perms_keys.tmp := $(intermediates)/nonplat_keys.tmp |
| 1120 | $(nonplat_mac_perms_keys.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M4DEFS) |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 1121 | $(nonplat_mac_perms_keys.tmp): $(call build_policy, keys.conf, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1122 | @mkdir -p $(dir $@) |
| 1123 | $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $^ > $@ |
| 1124 | |
Alex Klyubin | 5596172 | 2017-01-30 18:44:59 -0800 | [diff] [blame] | 1125 | all_nonplat_mac_perms_files := $(call build_policy, mac_permissions.xml, $(PLAT_VENDOR_POLICY) $(BOARD_SEPOLICY_DIRS) $(REQD_MASK_POLICY)) |
dcashman | 90b3b94 | 2016-12-14 13:47:55 -0800 | [diff] [blame] | 1126 | |
| 1127 | $(LOCAL_BUILT_MODULE): PRIVATE_MAC_PERMS_FILES := $(all_nonplat_mac_perms_files) |
| 1128 | $(LOCAL_BUILT_MODULE): $(nonplat_mac_perms_keys.tmp) $(HOST_OUT_EXECUTABLES)/insertkeys.py \ |
| 1129 | $(all_nonplat_mac_perms_files) |
| 1130 | @mkdir -p $(dir $@) |
| 1131 | $(hide) $(HOST_OUT_EXECUTABLES)/insertkeys.py -t $(TARGET_BUILD_VARIANT) -c $(TOP) $< -o $@ $(PRIVATE_MAC_PERMS_FILES) |
| 1132 | |
| 1133 | nonplat_mac_perms_keys.tmp := |
| 1134 | all_nonplat_mac_perms_files := |
William Roberts | 6aabc1c | 2015-07-30 11:44:26 -0700 | [diff] [blame] | 1135 | |
rpcraig | b19665c | 2012-07-30 09:33:03 -0400 | [diff] [blame] | 1136 | ################################## |
rpcraig | 47cd396 | 2012-10-17 21:09:52 -0400 | [diff] [blame] | 1137 | |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1138 | add_nl := |
William Roberts | 49693f1 | 2016-01-04 12:20:57 -0800 | [diff] [blame] | 1139 | build_device_policy := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1140 | build_policy := |
dcashman | d225b69 | 2016-12-12 09:29:04 -0800 | [diff] [blame] | 1141 | built_plat_fc := |
| 1142 | built_nonplat_fc := |
Richard Haines | c8801fe | 2015-12-11 10:39:19 +0000 | [diff] [blame] | 1143 | built_nl := |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 1144 | built_plat_cil := |
Alex Klyubin | 8f7173b | 2017-02-25 14:47:53 -0800 | [diff] [blame] | 1145 | built_mapping_cil := |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 1146 | built_plat_pc := |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 1147 | built_nonplat_cil := |
Sandeep Patil | a86316e | 2016-12-27 16:08:44 -0800 | [diff] [blame] | 1148 | built_nonplat_pc := |
Dan Cashman | 9c03807 | 2016-12-22 07:15:18 -0800 | [diff] [blame] | 1149 | built_nonplat_sc := |
| 1150 | built_plat_sc := |
Alex Klyubin | 193dccd | 2017-03-07 14:05:57 -0800 | [diff] [blame] | 1151 | built_precompiled_sepolicy := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1152 | built_sepolicy := |
Sandeep Patil | a058b56 | 2016-12-27 15:10:48 -0800 | [diff] [blame] | 1153 | built_plat_svc := |
| 1154 | built_nonplat_svc := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1155 | mapping_policy_nvr := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1156 | my_target_arch := |
| 1157 | nonplat_policy_nvr := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1158 | plat_policy_nvr := |
dcashman | 1faa644 | 2016-11-28 07:20:28 -0800 | [diff] [blame] | 1159 | plat_pub_policy.cil := |
| 1160 | reqd_policy_mask.cil := |
Dan Cashman | 1c04027 | 2016-12-15 15:28:44 -0800 | [diff] [blame] | 1161 | sepolicy_build_files := |
Alex Klyubin | 7cda44f | 2017-03-21 14:28:53 -0700 | [diff] [blame] | 1162 | sepolicy_build_cil_workaround_files := |
Jeff Vander Stoep | 7443484 | 2017-03-13 12:22:15 -0700 | [diff] [blame] | 1163 | with_asan := |
Alice Chu | cdfb06f | 2012-11-01 11:33:04 -0700 | [diff] [blame] | 1164 | |
| 1165 | include $(call all-makefiles-under,$(LOCAL_PATH)) |