Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdefab48 authored by Yumi Yukimura's avatar Yumi Yukimura Committed by Nolen Johnson
Browse files

kernel: Pass `$$kernel_modules_dir` to kernel modules finder instead

If we rerun a dirty build with some kernel modules removed,
`$(KERNEL_OUT)` still contains the obsolete kernel modules.

`$$kernel_modules_dir` is regenerated on every kernel builds,
and is where we finally get the kernel modules from.

Change-Id: I2c082109760a96f52f9d34babb61548893697212
parent eadec453
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -562,7 +562,7 @@ $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_CONFIG) $(DEPMOD) $(DTC) $(KERNEL_MODULE
			filtered_modules=""; \
			$(if $(SYSTEM_KERNEL_MODULES),\
				$(if $(filter true,$(TARGET_AUTO_COLLECT_KERNEL_MODULE_DEPS)), \
					gki_kernel_modules_deps=$$($(COLLECT_MODULE_DEPS_CMD) $(KERNEL_OUT) $(SYSTEM_KERNEL_MODULES) | tr '\n' ' '); \
					gki_kernel_modules_deps=$$($(COLLECT_MODULE_DEPS_CMD) $$kernel_modules_dir $(SYSTEM_KERNEL_MODULES) | tr '\n' ' '); \
				) \
				gki_modules=$$(for m in $(SYSTEM_KERNEL_MODULES) $$gki_kernel_modules_deps; do \
					p=$$(echo $$all_modules | tr ' ' '\n' | grep /$$m); \
@@ -587,10 +587,10 @@ $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_CONFIG) $(DEPMOD) $(DTC) $(KERNEL_MODULE
			) \
			$(if $(BOOT_KERNEL_MODULES)$(BOOT_KERNEL_MODULES_FINDER),\
				$(if $(BOOT_KERNEL_MODULES_FINDER), \
					boot_kernel_modules_finder_output=$$($(BOOT_KERNEL_MODULES_FINDER) $(KERNEL_OUT) | tr '\n' ' '); \
					boot_kernel_modules_finder_output=$$($(BOOT_KERNEL_MODULES_FINDER) $$kernel_modules_dir | tr '\n' ' '); \
				) \
				$(if $(filter true,$(TARGET_AUTO_COLLECT_KERNEL_MODULE_DEPS)), \
					boot_kernel_modules_deps=$$($(COLLECT_MODULE_DEPS_CMD) $(KERNEL_OUT) $(BOOT_KERNEL_MODULES) $$boot_kernel_modules_finder_output | tr '\n' ' '); \
					boot_kernel_modules_deps=$$($(COLLECT_MODULE_DEPS_CMD) $$kernel_modules_dir $(BOOT_KERNEL_MODULES) $$boot_kernel_modules_finder_output | tr '\n' ' '); \
				) \
				vendor_boot_modules=$$(for m in $(BOOT_KERNEL_MODULES) $$boot_kernel_modules_deps $$boot_kernel_modules_finder_output; do \
					p=$$(echo $$all_modules | tr ' ' '\n' | grep /$$m); \
@@ -601,10 +601,10 @@ $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_CONFIG) $(DEPMOD) $(DTC) $(KERNEL_MODULE
			) \
			$(if $(RECOVERY_KERNEL_MODULES)$(RECOVERY_KERNEL_MODULES_FINDER),\
				$(if $(RECOVERY_KERNEL_MODULES_FINDER), \
					recovery_kernel_modules_finder_output=$$($(RECOVERY_KERNEL_MODULES_FINDER) $(KERNEL_OUT) | tr '\n' ' '); \
					recovery_kernel_modules_finder_output=$$($(RECOVERY_KERNEL_MODULES_FINDER) $$kernel_modules_dir | tr '\n' ' '); \
				) \
				$(if $(filter true,$(TARGET_AUTO_COLLECT_KERNEL_MODULE_DEPS)), \
					recovery_kernel_modules_deps=$$($(COLLECT_MODULE_DEPS_CMD) $(KERNEL_OUT) $(RECOVERY_KERNEL_MODULES) $$recovery_kernel_modules_finder_output | tr '\n' ' '); \
					recovery_kernel_modules_deps=$$($(COLLECT_MODULE_DEPS_CMD) $$kernel_modules_dir $(RECOVERY_KERNEL_MODULES) $$recovery_kernel_modules_finder_output | tr '\n' ' '); \
				) \
				recovery_modules=$$(for m in $(RECOVERY_KERNEL_MODULES) $$recovery_kernel_modules_finder_output $$recovery_kernel_modules_deps; do \
					p=$$(echo $$all_modules | tr ' ' '\n' | grep /$$m); \