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
This commit is contained in:
Brian Norris 2024-09-26 12:18:13 -07:00 committed by Treehugger Robot
parent cedffc0b92
commit e87bccccca
7 changed files with 28 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
endif

View file

@ -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 += \

View file

@ -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 += \

View file

@ -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 += \