-
Notifications
You must be signed in to change notification settings - Fork 0
/
sepolicy.mk
36 lines (29 loc) · 1.14 KB
/
sepolicy.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# This policy configuration will be used by samsung products
#
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/common/public
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/common/private
BOARD_VENDOR_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/common/vendor
ifeq ($(BOARD_SEPOLICY_TEE_FLAVOR),teegris)
SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/tee/teegris/public
BOARD_VENDOR_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/tee/teegris/vendor
else ifeq ($(BOARD_SEPOLICY_TEE_FLAVOR),mobicore)
POLICY_TYPE := legacy
# a device might not set the shipping api level
# check if its empty to avoid erroring out in the next if
ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
$(warning no product shipping level defined, defaulting to legacy policy)
# devices launched with oreo or later should be treble
else ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),)
POLICY_TYPE := treble
endif
BOARD_VENDOR_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/tee/mobicore/$(POLICY_TYPE)
BOARD_VENDOR_SEPOLICY_DIRS += \
device/samsung_slsi/sepolicy/tee/mobicore/common
endif