aboutsummaryrefslogtreecommitdiff
path: root/linux/linux.mk
diff options
context:
space:
mode:
authorGravatar Carlos Santos <unixmania@gmail.com>2020-03-24 21:21:54 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2020-03-25 07:29:36 +0100
commit43f41a7bf8e92ad88d1e59c48b27718c343ca548 (patch)
treee757353a1027367e95110f55df7803ff5415353a /linux/linux.mk
parentadbab4eab294a9e5c441cd2a9dfcd39e7f7d991e (diff)
downloadbuildroot-43f41a7bf8e92ad88d1e59c48b27718c343ca548.tar.gz
buildroot-43f41a7bf8e92ad88d1e59c48b27718c343ca548.tar.bz2
linux: run depmod only if modules are enabled
If the kernel configuration CONFIG_MODULES disabled, there's no /lib/modules/<version> directory, causing this: depmod: ERROR: could not open directory [...]/target/lib/modules/4.19.8: No such file or directory depmod: FATAL: could not search modules: No such file or directory Makefile:745: recipe for target 'target-finalize' failed Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/483712831 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712817 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712814 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712796 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712729 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712727 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712698 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712691 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712660 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712573 https://gitlab.com/buildroot.org/buildroot/-/jobs/483712574 Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Carlos Santos <unixmania@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'linux/linux.mk')
-rw-r--r--linux/linux.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 2e3ea52053..b2ceeecafb 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -539,7 +539,9 @@ endef
# Run depmod in a target-finalize hook, to encompass modules installed by
# packages.
define LINUX_RUN_DEPMOD
- $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED)
+ if grep -q "CONFIG_MODULES=y" $(LINUX_DIR)/.config; then \
+ $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED); \
+ fi
endef
LINUX_TARGET_FINALIZE_HOOKS += LINUX_RUN_DEPMOD