blob: 4068dc31aa76cdc123da1181dac4debf43443e72 [file] [log] [blame]
Suresh Reddy Yellala1ca2d272019-08-28 11:44:24 -07001# Board specific SELinux policy variable definitions
2ifeq ($(call is-vendor-board-platform,QCOM),true)
3SEPOLICY_PATH:= device/qcom/sepolicy
4BOARD_PLAT_PUBLIC_SEPOLICY_DIR := \
5 $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR) \
6 $(SEPOLICY_PATH)/generic/public
7
8BOARD_PLAT_PRIVATE_SEPOLICY_DIR := \
9 $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR) \
10 $(SEPOLICY_PATH)/generic/private
11
12BOARD_PLAT_PUBLIC_SEPOLICY_DIR := \
13 $(BOARD_PLAT_PUBLIC_SEPOLICY_DIR) \
14 $(SEPOLICY_PATH)/qva/public
15
16BOARD_PLAT_PRIVATE_SEPOLICY_DIR := \
17 $(BOARD_PLAT_PRIVATE_SEPOLICY_DIR) \
18 $(SEPOLICY_PATH)/qva/private
19
Jaihind Yadava88beb12019-09-13 15:15:44 +053020#once all the services are moved to Product /ODM above lines will be removed.
21# sepolicy rules for product images
22PRODUCT_PUBLIC_SEPOLICY_DIRS := \
23 $(PRODUCT_PUBLIC_SEPOLICY_DIRS) \
24 $(SEPOLICY_PATH)/product/public
25
26PRODUCT_PRIVATE_SEPOLICY_DIRS := \
27 $(PRODUCT_PRIVATE_SEPOLICY_DIRS) \
28 $(SEPOLICY_PATH)/product/private
29
Suresh Reddy Yellala1ca2d272019-08-28 11:44:24 -070030ifeq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM)))
31 BOARD_SEPOLICY_DIRS := \
32 $(BOARD_SEPOLICY_DIRS) \
33 $(SEPOLICY_PATH) \
34 $(SEPOLICY_PATH)/generic/vendor/common \
35 $(SEPOLICY_PATH)/qva/vendor/common/sysmonapp \
36 $(SEPOLICY_PATH)/qva/vendor/ssg \
Mohit Aggarwal6886e362019-07-26 19:35:23 +053037 $(SEPOLICY_PATH)/timeservice \
Suresh Reddy Yellala1ca2d272019-08-28 11:44:24 -070038 $(SEPOLICY_PATH)/qva/vendor/common
39
40 ifeq ($(TARGET_SEPOLICY_DIR),)
41 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/generic/vendor/$(TARGET_BOARD_PLATFORM)
42 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/qva/vendor/$(TARGET_BOARD_PLATFORM)
43 else
44 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/generic/vendor/$(TARGET_SEPOLICY_DIR)
45 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/qva/vendor/$(TARGET_SEPOLICY_DIR)
46 endif
47
48 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
49 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/generic/vendor/test
50 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/qva/vendor/test
51 endif
52endif
53
54ifneq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM)))
55 BOARD_SEPOLICY_DIRS := \
56 $(BOARD_SEPOLICY_DIRS) \
57 $(SEPOLICY_PATH) \
58 $(SEPOLICY_PATH)/legacy/vendor/common/sysmonapp \
59 $(SEPOLICY_PATH)/legacy/vendor/ssg \
Mohit Aggarwal6886e362019-07-26 19:35:23 +053060 $(SEPOLICY_PATH)/timeservice \
Suresh Reddy Yellala1ca2d272019-08-28 11:44:24 -070061 $(SEPOLICY_PATH)/legacy/vendor/common
62
63 ifeq ($(TARGET_SEPOLICY_DIR),)
64 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/legacy/vendor/$(TARGET_BOARD_PLATFORM)
65 else
66 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/legacy/vendor/$(TARGET_SEPOLICY_DIR)
67 endif
68 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
69 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/legacy/vendor/test
70 endif
71endif
72endif