mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-27 18:19:03 +00:00
Pixel 2017: Move XR-related init.rc entries to a dedicated file
Origin CLs that introduced these init.rc entries: ag/2066998: wahoo: Create PDX socket dirs and cpusets for VR services ag/2485419: Fix DVR cpusets for wahoo ag/2645621: wahoo: toggle special touch mode when VR mode is active Bug: 129787612 Test: Build walleye, taimen, walleye_xr, taimen_xr Change-Id: I358689e73d2a214a9f3e90e106739dfe0fc2b6b6
This commit is contained in:
13
device.mk
13
device.mk
@@ -80,7 +80,6 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_KERNEL):kernel \
|
||||
$(LOCAL_PATH)/init.recovery.hardware.rc:recovery/root/init.recovery.$(PRODUCT_HARDWARE).rc \
|
||||
$(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).rc \
|
||||
$(LOCAL_PATH)/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.wahoo.usb.rc \
|
||||
$(LOCAL_PATH)/ueventd.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
|
||||
$(LOCAL_PATH)/init.elabel.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/init.elabel.sh \
|
||||
@@ -96,6 +95,18 @@ PRODUCT_COPY_FILES += \
|
||||
frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-0.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-0.idc \
|
||||
frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-1.idc
|
||||
|
||||
ifeq (,$(filter %_xr,$(TARGET_PRODUCT)))
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).rc
|
||||
else
|
||||
# XR variants for Pixel devices (e.g. walleye_xr and taimen_xr). Note that
|
||||
# this is a nonintrusive way to add XR-specific init.rc entries, as the
|
||||
# init.hardware.xr.rc file imports the original init.hardware.rc file.
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).common.rc \
|
||||
$(LOCAL_PATH)/init.hardware.xr.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).rc
|
||||
endif
|
||||
|
||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.hardware.diag.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_HARDWARE).diag.rc
|
||||
|
||||
@@ -85,59 +85,6 @@ on init
|
||||
write /dev/stune/top-app/schedtune.boost 10
|
||||
write /dev/stune/top-app/schedtune.prefer_idle 1
|
||||
|
||||
# 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
|
||||
|
||||
# Disable retention
|
||||
write /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled N
|
||||
write /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled N
|
||||
@@ -443,17 +390,6 @@ on boot
|
||||
write /proc/sys/net/core/rmem_max 8388608
|
||||
write /proc/sys/net/core/wmem_max 8388608
|
||||
|
||||
# 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
|
||||
|
||||
# Bluetooth
|
||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
||||
@@ -470,9 +406,6 @@ on boot
|
||||
# Make the ftm4 command node writeable from dumpstate
|
||||
chown system system /sys/devices/virtual/input/ftm4_touch/cmd
|
||||
|
||||
# ftm4 VR mode
|
||||
chown system system /sys/devices/virtual/input/ftm4_touch/vrmode
|
||||
|
||||
# WLAN debug access
|
||||
chown system system /d/icnss/stats
|
||||
|
||||
@@ -561,15 +494,6 @@ on property:sys.boot_completed=1
|
||||
write /dev/cpuset/system-background/cpus 0-3
|
||||
write /dev/cpuset/restricted/cpus 0-3
|
||||
|
||||
# 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
|
||||
|
||||
# UFS health
|
||||
chmod 755 /sys/kernel/debug/ufshcd0
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/err_state
|
||||
|
||||
100
init.hardware.xr.rc
Normal file
100
init.hardware.xr.rc
Normal file
@@ -0,0 +1,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
|
||||
Reference in New Issue
Block a user