From e87bccccca2cde47640db2bf27f56bcc67e16b16 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 26 Sep 2024 12:18:13 -0700 Subject: [PATCH] pantah: Pull init.insmod.*.cfg from vendor_dlkm We've started pushing init.insmod.*.cfg into the kernel prebuilts, and installing it to /vendor_dlkm/etc, but it may not be available on all prebuilt variants (e.g., kernel 5.10). Here, we: 1. conditionally install our common init.*cfg to /vendor_dlkm (only if $(TARGET_KERNEL_DIR) doesn't have a copy) 2. point init at /vendor_dlkm/etc When we've cycled completely off of kernel 5.10, we can drop #1. Bug: 369686096 Test: build, boot Flag: EXEMPT refactor Change-Id: Iff56b163d332d6226c05ff56f7838b3ad9806674 --- conf/init.cloudripper.rc | 2 +- conf/init.pantah.rc | 2 +- conf/init.ravenclaw.rc | 2 +- device-cheetah.mk | 10 +++++++--- device-cloudripper.mk | 8 ++++++-- device-panther.mk | 8 ++++++-- device-ravenclaw.mk | 8 ++++++-- 7 files changed, 28 insertions(+), 12 deletions(-) diff --git a/conf/init.cloudripper.rc b/conf/init.cloudripper.rc index 53c7e91..9cf49a2 100644 --- a/conf/init.cloudripper.rc +++ b/conf/init.cloudripper.rc @@ -15,7 +15,7 @@ on early-boot wait_for_prop vendor.common.modules.ready 1 start insmod_sh_cloudripper -service insmod_sh_cloudripper /vendor/bin/insmod.sh /vendor/etc/init.insmod.cloudripper.cfg +service insmod_sh_cloudripper /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.cloudripper.cfg class main user root group root system diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc index 7fe3687..a404bb5 100644 --- a/conf/init.pantah.rc +++ b/conf/init.pantah.rc @@ -13,7 +13,7 @@ on early-boot wait_for_prop vendor.common.modules.ready 1 start insmod_sh_pantah -service insmod_sh_pantah /vendor/bin/insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg +service insmod_sh_pantah /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.${ro.hardware}.cfg class main user root group root system diff --git a/conf/init.ravenclaw.rc b/conf/init.ravenclaw.rc index 0482aa6..5b0c9aa 100644 --- a/conf/init.ravenclaw.rc +++ b/conf/init.ravenclaw.rc @@ -15,7 +15,7 @@ on early-boot wait_for_prop vendor.common.modules.ready 1 start insmod_sh_ravenclaw -service insmod_sh_ravenclaw /vendor/bin/insmod.sh /vendor/etc/init.insmod.ravenclaw.cfg +service insmod_sh_ravenclaw /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.ravenclaw.cfg class main user root group root system diff --git a/device-cheetah.mk b/device-cheetah.mk index 719ccd6..15b8c15 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -72,9 +72,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/pantah/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.cheetah.rc -# insmod files +# insmod files. Kernel 5.10 prebuilts don't provide these yet, so provide our +# own copy if they're not in the prebuilts. +# TODO(b/369686096): drop this when 5.10 is gone. +ifeq ($(wildcard $(TARGET_KERNEL_DIR)/init.insmod.*.cfg),) PRODUCT_COPY_FILES += \ - device/google/pantah/init.insmod.cheetah.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.cheetah.cfg + device/google/pantah/init.insmod.cheetah.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.cheetah.cfg +endif # MIPI Coex Configs PRODUCT_COPY_FILES += \ @@ -477,4 +481,4 @@ ifneq (,$(RELEASE_ETM_IN_USERDEBUG_ENG)) ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) $(call inherit-product-if-exists, device/google/common/etm/device-userdebug-modules.mk) endif -endif \ No newline at end of file +endif diff --git a/device-cloudripper.mk b/device-cloudripper.mk index 527cb14..5c7f213 100644 --- a/device-cloudripper.mk +++ b/device-cloudripper.mk @@ -55,9 +55,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/pantah/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.cloudripper.rc -# insmod files +# insmod files. Kernel 5.10 prebuilts don't provide these yet, so provide our +# own copy if they're not in the prebuilts. +# TODO(b/369686096): drop this when 5.10 is gone. +ifeq ($(wildcard $(TARGET_KERNEL_DIR)/init.insmod.*.cfg),) PRODUCT_COPY_FILES += \ - device/google/pantah/init.insmod.cloudripper.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.cloudripper.cfg + device/google/pantah/init.insmod.cloudripper.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.cloudripper.cfg +endif # Camera PRODUCT_COPY_FILES += \ diff --git a/device-panther.mk b/device-panther.mk index f376135..38d6608 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -63,9 +63,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/pantah/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.panther.rc -# insmod files +# insmod files. Kernel 5.10 prebuilts don't provide these yet, so provide our +# own copy if they're not in the prebuilts. +# TODO(b/369686096): drop this when 5.10 is gone. +ifeq ($(wildcard $(TARGET_KERNEL_DIR)/init.insmod.*.cfg),) PRODUCT_COPY_FILES += \ - device/google/pantah/init.insmod.panther.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.panther.cfg + device/google/pantah/init.insmod.panther.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.panther.cfg +endif # MIPI Coex Configs PRODUCT_COPY_FILES += \ diff --git a/device-ravenclaw.mk b/device-ravenclaw.mk index 86c1858..1c205eb 100644 --- a/device-ravenclaw.mk +++ b/device-ravenclaw.mk @@ -59,9 +59,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/pantah/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.ravenclaw.rc -# insmod files +# insmod files. Kernel 5.10 prebuilts don't provide these yet, so provide our +# own copy if they're not in the prebuilts. +# TODO(b/369686096): drop this when 5.10 is gone. +ifeq ($(wildcard $(TARGET_KERNEL_DIR)/init.insmod.*.cfg),) PRODUCT_COPY_FILES += \ - device/google/pantah/init.insmod.ravenclaw.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.ravenclaw.cfg + device/google/pantah/init.insmod.ravenclaw.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.ravenclaw.cfg +endif # Camera PRODUCT_COPY_FILES += \