Skip to content

Commit

Permalink
kernel: Detect kernel module usage better
Browse files Browse the repository at this point in the history
* Check for any actual kernel modules, rather than just the presence of
  kernel modules being enabled as a kernel feature.

Change-Id: I6b7e82d5c59dd57621d9f9e2d1fd606997790d1c
  • Loading branch information
intervigilium committed Mar 9, 2019
1 parent a8750b4 commit 0724f78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/tasks/kernel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ TARGET_KERNEL_BINARIES: $(KERNEL_CONFIG)
echo "Building DTBs"; \
$(PATH_OVERRIDE) $(MAKE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) dtbs; \
fi
$(hide) if grep -q '^CONFIG_MODULES=y' $(KERNEL_CONFIG); then \
$(hide) if grep -q '=m' $(KERNEL_CONFIG); then \
echo "Building Kernel Modules"; \
$(PATH_OVERRIDE) $(MAKE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) modules; \
fi
Expand All @@ -227,7 +227,7 @@ INSTALLED_KERNEL_MODULES: depmod-host
$(hide) rm -rf $(KERNEL_MODULES_OUT)
$(hide) mkdir -p $(KERNEL_MODULES_OUT)
$(hide) rm -rf $(KERNEL_DEPMOD_STAGING_DIR)
$(hide) if grep -q '^CONFIG_MODULES=y' $(KERNEL_CONFIG); then \
$(hide) if grep -q '=m' $(KERNEL_CONFIG); then \
echo "Installing Kernel Modules"; \
$(PATH_OVERRIDE) $(MAKE) $(KERNEL_MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) $(KERNEL_CLANG_TRIPLE) $(KERNEL_CC) INSTALL_MOD_PATH=../../$(KERNEL_MODULES_INSTALL) modules_install && \
mofile=$$(find $(KERNEL_MODULES_OUT) -type f -name modules.order) && \
Expand Down

0 comments on commit 0724f78

Please sign in to comment.