From 038d9e8853f0134e610e20a3079b633fdee2d77c Mon Sep 17 00:00:00 2001 From: Vaisakh Murali Date: Sun, 21 Jul 2024 20:16:00 +0530 Subject: [PATCH] sm6375-common: Introduce a stub blair-post-boot script This will be used to tune some parameters in the device. Only run this script after proprietary kernel post-boot has run, so that these changes are not overriden by the same. Change-Id: Ibcef27a2813870c62d54c9d762eae9e03da677ad Signed-off-by: Vaisakh Murali --- rootdir/bin/init.blair.post_boot.sh | 7 +++++++ rootdir/etc/init/hw/init.target.rc | 10 ++++++++++ sepolicy/vendor/file_contexts | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 rootdir/bin/init.blair.post_boot.sh diff --git a/rootdir/bin/init.blair.post_boot.sh b/rootdir/bin/init.blair.post_boot.sh new file mode 100644 index 0000000..3b313ab --- /dev/null +++ b/rootdir/bin/init.blair.post_boot.sh @@ -0,0 +1,7 @@ +# +# Copyright (C) 2023 StatiXOS +# SPDX-License-Identifier: Apache-2.0 +# + +# Custom tuning for Blair SoC + diff --git a/rootdir/etc/init/hw/init.target.rc b/rootdir/etc/init/hw/init.target.rc index a7c8e9b..d0f6367 100644 --- a/rootdir/etc/init/hw/init.target.rc +++ b/rootdir/etc/init/hw/init.target.rc @@ -162,3 +162,13 @@ on property:init.svc.vendor.per_mgr=running on property:sys.shutdown.requested=* stop vendor.per_proxy + +service blair-post-boot /vendor/bin/sh /vendor/bin/init.blair.post_boot.sh + class late_start + user root + group root system wakelock graphics + disabled + oneshot + +on property:vendor.post_boot.parsed=1 + start blair-post-boot diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 718881a..d187350 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -61,6 +61,9 @@ # IFAA /(vendor|system/vendor)/bin/hw/vendor\.zui\.hardware\.ifaa@1\.0-service u:object_r:hal_ifaa_default_exec:s0 +# Init +/vendor/bin/init.blair.post_boot.sh u:object_r:vendor_qti_init_shell_exec:s0 + # Label read_ahead_kb in /data partition /sys/devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:0/block/sda/queue/read_ahead_kb u:object_r:vendor_sysfs_scsi_host:s0