This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
init.hardware.xr.rc
100 lines (88 loc) · 3.98 KB
/
init.hardware.xr.rc
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#
# Copyright (C) 2019 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This file inherits from init.${ro.boot.hardware.platform}.rc plus additional
# configs only used by XR targets.
#
import /vendor/etc/init/hw/init.${ro.hardware}.common.rc
on init
# Setup cpusets used by the VR services.
mkdir /dev/cpuset/kernel 0750 root system
write /dev/cpuset/kernel/cpus 0
write /dev/cpuset/kernel/mems 0
chown system system /dev/cpuset/kernel/tasks
chmod 0660 /dev/cpuset/kernel/tasks
mkdir /dev/cpuset/system 0750 root system
write /dev/cpuset/system/cpus 0
write /dev/cpuset/system/mems 0
chown system system /dev/cpuset/system/tasks
chmod 0660 /dev/cpuset/system/tasks
mkdir /dev/cpuset/system/performance 0750 root system
write /dev/cpuset/system/performance/cpus 0
write /dev/cpuset/system/performance/mems 0
chown system system /dev/cpuset/system/performance/tasks
chmod 0660 /dev/cpuset/system/performance/tasks
mkdir /dev/cpuset/system/background 0750 root system
write /dev/cpuset/system/background/cpus 0
write /dev/cpuset/system/background/mems 0
chown system system /dev/cpuset/system/background/tasks
chmod 0660 /dev/cpuset/system/background/tasks
mkdir /dev/cpuset/application 0750 root system
write /dev/cpuset/application/cpus 0
write /dev/cpuset/application/mems 0
chown system system /dev/cpuset/application/tasks
chmod 0660 /dev/cpuset/application/tasks
mkdir /dev/cpuset/application/performance 0750 root system
write /dev/cpuset/application/performance/cpus 0
write /dev/cpuset/application/performance/mems 0
chown system system /dev/cpuset/application/performance/tasks
chmod 0660 /dev/cpuset/application/performance/tasks
mkdir /dev/cpuset/application/background 0750 root system
write /dev/cpuset/application/background/cpus 0
write /dev/cpuset/application/background/mems 0
chown system system /dev/cpuset/application/background/tasks
chmod 0660 /dev/cpuset/application/background/tasks
# Create UDS structure for base VR services.
mkdir /dev/socket/pdx 0775 system system
mkdir /dev/socket/pdx/system 0775 system system
mkdir /dev/socket/pdx/system/buffer_hub 0775 system system
mkdir /dev/socket/pdx/system/performance 0775 system system
mkdir /dev/socket/pdx/system/vr 0775 system system
mkdir /dev/socket/pdx/system/vr/display 0775 system system
mkdir /dev/socket/pdx/system/vr/pose 0775 system system
mkdir /dev/socket/pdx/system/vr/sensors 0775 system system
on boot
# Update DVR cpusets to boot-time values.
write /dev/cpuset/kernel/cpus 0-7
write /dev/cpuset/system/cpus 0-7
write /dev/cpuset/system/performance/cpus 0-7
write /dev/cpuset/system/background/cpus 0-7
write /dev/cpuset/system/cpus 0-7
write /dev/cpuset/application/cpus 0-7
write /dev/cpuset/application/performance/cpus 0-7
write /dev/cpuset/application/background/cpus 0-7
write /dev/cpuset/application/cpus 0-7
# ftm4 VR mode
chown system system /sys/devices/virtual/input/ftm4_touch/vrmode
on property:sys.boot_completed=1
# Update DVR cpusets to runtime values.
write /dev/cpuset/kernel/cpus 2,3
write /dev/cpuset/system/performance/cpus 6-7
write /dev/cpuset/system/background/cpus 0-1
write /dev/cpuset/system/cpus 0-1,6-7
write /dev/cpuset/application/performance/cpus 4-5
write /dev/cpuset/application/background/cpus 0-1
write /dev/cpuset/application/cpus 0-1,4-5