All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linux: run depmod only if modules are enabled
@ 2020-03-25  0:21 unixmania at gmail.com
  2020-03-25  6:35 ` Thomas Petazzoni
  2020-04-07  7:06 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: unixmania at gmail.com @ 2020-03-25  0:21 UTC (permalink / raw)
  To: buildroot

From: Carlos Santos <unixmania@gmail.com>

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

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
CC: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 linux/linux.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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
 
-- 
2.18.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] linux: run depmod only if modules are enabled
  2020-03-25  0:21 [Buildroot] [PATCH] linux: run depmod only if modules are enabled unixmania at gmail.com
@ 2020-03-25  6:35 ` Thomas Petazzoni
  2020-04-07  7:06 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-03-25  6:35 UTC (permalink / raw)
  To: buildroot

On Tue, 24 Mar 2020 21:21:54 -0300
unixmania at gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
> 
> 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
> 
> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
> CC: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
>  linux/linux.mk | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Thanks, applied after adding a number of references to defconfig build
failures that are fixed by this patch. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] linux: run depmod only if modules are enabled
  2020-03-25  0:21 [Buildroot] [PATCH] linux: run depmod only if modules are enabled unixmania at gmail.com
  2020-03-25  6:35 ` Thomas Petazzoni
@ 2020-04-07  7:06 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-04-07  7:06 UTC (permalink / raw)
  To: buildroot

>>>>> "unixmania" == unixmania  <unixmania@gmail.com> writes:

 > From: Carlos Santos <unixmania@gmail.com>
 > 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

 > Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Signed-off-by: Carlos Santos <unixmania@gmail.com>

Committed to 2020.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-07  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  0:21 [Buildroot] [PATCH] linux: run depmod only if modules are enabled unixmania at gmail.com
2020-03-25  6:35 ` Thomas Petazzoni
2020-04-07  7:06 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.