From 2e49ccaf281b5a70490314e3257d0639a7543d17 Mon Sep 17 00:00:00 2001 From: Juhyung Park Date: Sun, 13 Feb 2022 16:36:43 +0900 Subject: [PATCH] common: vendor: allow device to use customized post-boot script Some devices may want to override these default settings and use its own customized post-boot script. Set vendor.post_boot.custom to "true" from the device tree to override. Change-Id: If1a71b489710be39df250eda65450d7e4c3a9a13 Signed-off-by: Juhyung Park --- vendor/init/holi/bin/init.kernel.post_boot.sh | 5 +++++ vendor/init/init.qcom.post_boot.sh | 5 +++++ vendor/init/lahaina/bin/init.kernel.post_boot.sh | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/vendor/init/holi/bin/init.kernel.post_boot.sh b/vendor/init/holi/bin/init.kernel.post_boot.sh index 3940441d..805bec06 100755 --- a/vendor/init/holi/bin/init.kernel.post_boot.sh +++ b/vendor/init/holi/bin/init.kernel.post_boot.sh @@ -31,6 +31,11 @@ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= +if [[ "$(getprop vendor.post_boot.custom)" == "true" ]]; then + echo "Device overrides post_boot, skipping $0" + exit 0 +fi + if [ -f /sys/devices/soc0/chip_family ]; then chipfamily=`cat /sys/devices/soc0/chip_family` fi diff --git a/vendor/init/init.qcom.post_boot.sh b/vendor/init/init.qcom.post_boot.sh index e4eef295..30ffbc1a 100755 --- a/vendor/init/init.qcom.post_boot.sh +++ b/vendor/init/init.qcom.post_boot.sh @@ -27,6 +27,11 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +if [[ "$(getprop vendor.post_boot.custom)" == "true" ]]; then + echo "Device overrides post_boot, skipping $0" + exit 0 +fi + function 8953_sched_dcvs_eas() { if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 19 ]; then diff --git a/vendor/init/lahaina/bin/init.kernel.post_boot.sh b/vendor/init/lahaina/bin/init.kernel.post_boot.sh index b855bfed..a0326ab0 100755 --- a/vendor/init/lahaina/bin/init.kernel.post_boot.sh +++ b/vendor/init/lahaina/bin/init.kernel.post_boot.sh @@ -30,6 +30,11 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= +if [[ "$(getprop vendor.post_boot.custom)" == "true" ]]; then + echo "Device overrides post_boot, skipping $0" + exit 0 +fi + if [ -f /sys/devices/soc0/soc_id ]; then platformid=`cat /sys/devices/soc0/soc_id` fi