raviole: 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: Ibefafbcfe1fdf9b4e65ee3d73126c33f04ee193b
diff --git a/conf/init.raviole.rc b/conf/init.raviole.rc
index a09cbae..f70546d 100644
--- a/conf/init.raviole.rc
+++ b/conf/init.raviole.rc
@@ -32,7 +32,7 @@
            property:persist.vendor.fingerprint.disable.fake.override=100
     setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
 
-service insmod_sh_raviole /vendor/bin/insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg
+service insmod_sh_raviole /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.${ro.hardware}.cfg
     class main
     user root
     group root system
diff --git a/conf/init.slider.rc b/conf/init.slider.rc
index 49c20ea..db78b71 100644
--- a/conf/init.slider.rc
+++ b/conf/init.slider.rc
@@ -16,7 +16,7 @@
     start insmod_sh_slider
 
 
-service insmod_sh_slider /vendor/bin/insmod.sh /vendor/etc/init.insmod.slider.cfg
+service insmod_sh_slider /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.slider.cfg
     class main
     user root
     group root system
diff --git a/conf/init.whitefin.rc b/conf/init.whitefin.rc
index 8894c75..b492fdd 100644
--- a/conf/init.whitefin.rc
+++ b/conf/init.whitefin.rc
@@ -14,7 +14,7 @@
     wait_for_prop vendor.common.modules.ready 1
     start insmod_sh_whitefin
 
-service insmod_sh_whitefin /vendor/bin/insmod.sh /vendor/etc/init.insmod.whitefin.cfg
+service insmod_sh_whitefin /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.whitefin.cfg
     class main
     user root
     group root system
diff --git a/device-oriole.mk b/device-oriole.mk
index 8959feb..a59b2ed 100644
--- a/device-oriole.mk
+++ b/device-oriole.mk
@@ -69,9 +69,13 @@
 PRODUCT_COPY_FILES += \
 	device/google/gs101/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.oriole.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/raviole/init.insmod.oriole.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.oriole.cfg
+	device/google/raviole/init.insmod.oriole.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.oriole.cfg
+endif
 
 # Thermal Config
 PRODUCT_COPY_FILES += \
diff --git a/device-raven.mk b/device-raven.mk
index d43d2cb..0b63ac5 100644
--- a/device-raven.mk
+++ b/device-raven.mk
@@ -77,9 +77,13 @@
 PRODUCT_COPY_FILES += \
 	device/google/gs101/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.raven.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/raviole/init.insmod.raven.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.raven.cfg
+	device/google/raviole/init.insmod.raven.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.raven.cfg
+endif
 
 # Thermal Config
 PRODUCT_COPY_FILES += \
diff --git a/device-slider.mk b/device-slider.mk
index e49b151..5e90e1a 100644
--- a/device-slider.mk
+++ b/device-slider.mk
@@ -48,9 +48,13 @@
 PRODUCT_COPY_FILES += \
 	device/google/gs101/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.slider.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/raviole/init.insmod.slider.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.slider.cfg
+	device/google/raviole/init.insmod.slider.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.slider.cfg
+endif
 
 # Thermal Config
 PRODUCT_COPY_FILES += \
diff --git a/device-whitefin.mk b/device-whitefin.mk
index 7dea345..94938f6 100644
--- a/device-whitefin.mk
+++ b/device-whitefin.mk
@@ -52,9 +52,13 @@
 PRODUCT_COPY_FILES += \
 	device/google/gs101/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.whitefin.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/raviole/init.insmod.whitefin.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.whitefin.cfg
+	device/google/raviole/init.insmod.whitefin.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.whitefin.cfg
+endif
 
 # Thermal Config
 PRODUCT_COPY_FILES += \