From 22dd220a6cb58c4a92fe55d8b575718b334d143a Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 26 Sep 2024 12:18:13 -0700 Subject: [PATCH] lynx: 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: Ife4ea982c73a1e91db075dc4798603fca1ca521f --- conf/init.lynx.rc | 2 +- device-lynx.mk | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index 1a427dc..ee6e30f 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -16,7 +16,7 @@ on early-boot wait_for_prop vendor.common.modules.ready 1 start insmod_sh_lynx -service insmod_sh_lynx /vendor/bin/insmod.sh /vendor/etc/init.insmod.lynx.cfg +service insmod_sh_lynx /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.lynx.cfg class main user root group root system diff --git a/device-lynx.mk b/device-lynx.mk index 00d3437..29ff5b1 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -46,9 +46,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/lynx/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.lynx.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/lynx/init.insmod.lynx.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.lynx.cfg + device/google/lynx/init.insmod.lynx.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.lynx.cfg +endif # Camera PRODUCT_COPY_FILES += \