Skip to content

Commit

Permalink
Revert "kernel: Ensure that module load lists are properly formed"
Browse files Browse the repository at this point in the history
Revert submission 120361

Reason for revert: not meant for T
Reverted changes: /q/submissionid:120361

Change-Id: I6c20a8503951a8ece845d8866138a13dcccac2a1
  • Loading branch information
Claymore1297 authored and Gerrit Code Review committed Aug 11, 2024
1 parent 1a49339 commit ad80cc1
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions build/tasks/kernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,7 @@ define build-image-kernel-modules-lineage
cp $(4)/lib/modules/0.0/modules.alias $(2)/lib/modules$(6)
rm -f $(2)/lib/modules$(6)/modules.load
for MODULE in $(5); do \
NAME=$$(basename $$MODULE .ko); \
if [ -n "$$(find $(2)/lib/modules$(6) -type f -name $$NAME'.ko')" ]; then \
echo "$$NAME" >> $(2)/lib/modules$(6)/modules.load; \
else \
echo "ERROR: $$NAME.ko was not found in the kernel modules intermediates dir, module load list must be corrected" 1>&2 && exit 1; \
fi; \
basename $$MODULE >> $(2)/lib/modules$(6)/modules.load; \
done
endef

Expand Down Expand Up @@ -483,30 +478,30 @@ $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_CONFIG) $(DEPMOD) $(DTC)
if [ -n "$$p" ]; then echo $$p; else echo "ERROR: $$m from BOARD_SYSTEM_KERNEL_MODULES was not found" 1>&2 && exit 1; fi; \
done); \
[ $$? -ne 0 ] && exit 1; \
($(call build-image-kernel-modules-lineage,$$gki_modules,$(SYSTEM_KERNEL_MODULES_OUT),$(SYSTEM_KERNEL_MODULE_MOUNTPOINT)/,$(SYSTEM_KERNEL_DEPMOD_STAGING_DIR),$(BOARD_SYSTEM_KERNEL_MODULES_LOAD),/$(GKI_SUFFIX))) || exit "$$?"; \
($(call build-image-kernel-modules-lineage,$$gki_modules,$(SYSTEM_KERNEL_MODULES_OUT),$(SYSTEM_KERNEL_MODULE_MOUNTPOINT)/,$(SYSTEM_KERNEL_DEPMOD_STAGING_DIR),$(BOARD_SYSTEM_KERNEL_MODULES_LOAD),/$(GKI_SUFFIX))); \
filtered_modules=$$(for n in $$all_modules; do \
module_name=$$(basename $$n); \
if [[ ! "$(BOARD_SYSTEM_KERNEL_MODULES)" =~ "$$module_name" ]]; then echo $$n; fi; \
done); \
($(call build-image-kernel-modules-lineage,$$filtered_modules,$(KERNEL_MODULES_OUT),$(KERNEL_MODULE_MOUNTPOINT)/,$(KERNEL_DEPMOD_STAGING_DIR),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),/)) || exit "$$?"; \
($(call build-image-kernel-modules-lineage,$$filtered_modules,$(KERNEL_MODULES_OUT),$(KERNEL_MODULE_MOUNTPOINT)/,$(KERNEL_DEPMOD_STAGING_DIR),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),/)); \
,\
($(call build-image-kernel-modules-lineage,$$all_modules,$(KERNEL_MODULES_OUT),$(KERNEL_MODULE_MOUNTPOINT)/,$(KERNEL_DEPMOD_STAGING_DIR),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),/)) || exit "$$?"; \
($(call build-image-kernel-modules-lineage,$$all_modules,$(KERNEL_MODULES_OUT),$(KERNEL_MODULE_MOUNTPOINT)/,$(KERNEL_DEPMOD_STAGING_DIR),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),/)); \
) \
$(if $(BOOT_KERNEL_MODULES),\
vendor_boot_modules=$$(for m in $(BOOT_KERNEL_MODULES); do \
p=$$(find $$kernel_modules_dir -type f -name $$m); \
if [ -n "$$p" ]; then echo $$p; else echo "ERROR: $$m from BOOT_KERNEL_MODULES was not found" 1>&2 && exit 1; fi; \
done); \
[ $$? -ne 0 ] && exit 1; \
($(call build-image-kernel-modules-lineage,$$vendor_boot_modules,$(KERNEL_VENDOR_RAMDISK_MODULES_OUT),/,$(KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR),$(KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),/)) || exit "$$?"; \
($(call build-image-kernel-modules-lineage,$$vendor_boot_modules,$(KERNEL_VENDOR_RAMDISK_MODULES_OUT),/,$(KERNEL_VENDOR_RAMDISK_DEPMOD_STAGING_DIR),$(KERNEL_VENDOR_RAMDISK_KERNEL_MODULES_LOAD),/)); \
) \
$(if $(RECOVERY_KERNEL_MODULES),\
recovery_modules=$$(for m in $(RECOVERY_KERNEL_MODULES); do \
p=$$(find $$kernel_modules_dir -type f -name $$m); \
if [ -n "$$p" ]; then echo $$p; else echo "ERROR: $$m from RECOVERY_KERNEL_MODULES was not found" 1>&2 && exit 1; fi; \
done); \
[ $$? -ne 0 ] && exit 1; \
($(call build-image-kernel-modules-lineage,$$recovery_modules,$(KERNEL_RECOVERY_MODULES_OUT),/,$(KERNEL_RECOVERY_DEPMOD_STAGING_DIR),$(BOARD_RECOVERY_RAMDISK_KERNEL_MODULES_LOAD),/)) || exit "$$?"; \
($(call build-image-kernel-modules-lineage,$$recovery_modules,$(KERNEL_RECOVERY_MODULES_OUT),/,$(KERNEL_RECOVERY_DEPMOD_STAGING_DIR),$(BOARD_RECOVERY_RAMDISK_KERNEL_MODULES_LOAD),/)); \
) \
fi

Expand Down

0 comments on commit ad80cc1

Please sign in to comment.