blob: 7107f6524b44d6ffe4628855ba66c2d0a5671410 [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) \
Jaihind Yadav9a10acb2020-01-29 17:14:10 +053024 $(SEPOLICY_PATH)/generic/product/public \
25 $(SEPOLICY_PATH)/qva/product/public
Jaihind Yadava88beb12019-09-13 15:15:44 +053026
27PRODUCT_PRIVATE_SEPOLICY_DIRS := \
28 $(PRODUCT_PRIVATE_SEPOLICY_DIRS) \
Jaihind Yadav9a10acb2020-01-29 17:14:10 +053029 $(SEPOLICY_PATH)/generic/product/private \
30 $(SEPOLICY_PATH)/qva/product/private
Jaihind Yadava88beb12019-09-13 15:15:44 +053031
Suresh Reddy Yellala1ca2d272019-08-28 11:44:24 -070032ifeq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM)))
33 BOARD_SEPOLICY_DIRS := \
34 $(BOARD_SEPOLICY_DIRS) \
35 $(SEPOLICY_PATH) \
36 $(SEPOLICY_PATH)/generic/vendor/common \
37 $(SEPOLICY_PATH)/qva/vendor/common/sysmonapp \
38 $(SEPOLICY_PATH)/qva/vendor/ssg \
Suresh Reddy Yellala1ca2d272019-08-28 11:44:24 -070039 $(SEPOLICY_PATH)/qva/vendor/common
40
41 ifeq ($(TARGET_SEPOLICY_DIR),)
42 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/generic/vendor/$(TARGET_BOARD_PLATFORM)
43 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/qva/vendor/$(TARGET_BOARD_PLATFORM)
44 else
45 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/generic/vendor/$(TARGET_SEPOLICY_DIR)
46 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/qva/vendor/$(TARGET_SEPOLICY_DIR)
47 endif
48
49 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
50 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/generic/vendor/test
51 BOARD_SEPOLICY_DIRS += $(SEPOLICY_PATH)/qva/vendor/test
52 endif
53endif
54
55ifneq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM)))
56 BOARD_SEPOLICY_DIRS := \
57 $(BOARD_SEPOLICY_DIRS) \
58 $(SEPOLICY_PATH) \
59 $(SEPOLICY_PATH)/legacy/vendor/common/sysmonapp \
60 $(SEPOLICY_PATH)/legacy/vendor/ssg \
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