linux: run depmod only if modules are enabled
PATCH 1/1 linux: run depmod only if modules are enabled
From: Carlos Santos <[email protected]>
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
---
CC: "Yann E. MORIN" <[email protected]>
--- linux/linux.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
linux/linux.mk +3 -1
@@ -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
Signature · 1 line
2.18.2
PATCH 1/1 linux: run depmod only if modules are enabled
Quoted 9 lines · On Tue, 24 Mar 2020 21:21:54 -0300 unixmania at gmail.com wrote:
From: Carlos Santos <[email protected]>
If the kernel configuration
CONFIG_MODULESdisabled, 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
Quoted 7 lines
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by Carlos Santos <[email protected]>---
CC: "Yann E. MORIN" <[email protected]>--- 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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 linux: run depmod only if modules are enabled
In reply to unixmania at gmail.comQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"unixmania" == unixmania <[email protected]> writes:
From: Carlos Santos <[email protected]>
If the kernel configurationCONFIG_MODULESdisabled, there's no /lib/modules/<version> directory, causing this:
Quoted 6 lines
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' failedReported-by Thomas Petazzoni <[email protected]>Signed-off-by Carlos Santos <[email protected]>
Committed to 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard