build_utils.sh: Ignore MODULES_[RECOVERY|CHARGER]_LIST for system_dlkm

The system_dlkm partition consists of GKI modules, which are not loaded
during first-stage init. However, the MODULES_[RECOVERY|CHARGER]_LIST
arguments specify vendor modules that must be loaded during first
stage init. Therefore, it does not make sense to consider these
lists when building system_dlkm.img, so do not consider them.

Bug: 322408856
Bug: 323710246
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:4daab96c0623f571c0eefbb0a4fe2d955e86fdea)
Merged-In: I50fb42b40a94b0b53d5a2cda676d39b919395538
Change-Id: I50fb42b40a94b0b53d5a2cda676d39b919395538
diff --git a/build_utils.sh b/build_utils.sh
index 3b48cbe..9866a34 100644
--- a/build_utils.sh
+++ b/build_utils.sh
@@ -299,9 +299,12 @@
   echo " Creating system_dlkm image"
 
   rm -rf ${SYSTEM_DLKM_STAGING_DIR}
+  # MODULES_[RECOVERY_LIST|CHARGER]_LIST should not influence system_dlkm, as
+  # GKI modules are not loaded when booting into either recovery or charger
+  # modes, so do not consider them, and pass empty strings instead.
   create_modules_staging "${SYSTEM_DLKM_MODULES_LIST:-${MODULES_LIST}}" "${MODULES_STAGING_DIR}" \
     ${SYSTEM_DLKM_STAGING_DIR} "${SYSTEM_DLKM_MODULES_BLOCKLIST:-${MODULES_BLOCKLIST}}" \
-    "${MODULES_RECOVERY_LIST:-""}" "${MODULES_CHARGER_LIST:-""}" "-e"
+    "" "" "-e"
 
   local system_dlkm_root_dir=$(echo ${SYSTEM_DLKM_STAGING_DIR}/lib/modules/*)
   cp ${system_dlkm_root_dir}/modules.load ${DIST_DIR}/system_dlkm.modules.load