Skip to contentSkip to conversation

modules: don't call depmod when overriding external module install path

PATCH In review Jon Masters 4 participants 4 messages Aug 16, 2010 – Aug 17, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modules: don't call depmod when overriding external module install path

Recent kernels include an additional call to depmod during the installation of external kernel modules as a convenience, in order to ensure that those modules are picked up by the module loading tools/initramfs scripts, etc. Although this call is potentially of some value, it should not be made when explicitly setting INSTALL_MOD_PATH to a different location. This avoids creating extraneous modules.* files that will never be used.

---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Makefile +2 -0
index f3bdff8..2b904f2 100644
@@ -1325,7 +1325,9 @@ _emodinst_:
 
 PHONY += _emodinst_post
 _emodinst_post: _emodinst_
+ifeq ($(INSTALL_MOD_PATH),)
 	$(call cmd,depmod)
+endif
 
 clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
 
Signature · 1 line
1.7.2.1
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jon Masters

Recent kernels include an additional call to depmod during the installation of external kernel modules as a convenience, in order to ensure that those modules are picked up by the module loading tools/initramfs scripts, etc. Although this call is potentially of some value, it should not be made when explicitly setting INSTALL_MOD_PATH to a different location. This avoids creating extraneous modules.* files that will never be used.

I leave the Makefile stuff to the kbuild people...

Quoted 9 lines
---
 Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Makefile +0 -0
index f3bdff8..2b904f2 100644

Makefile _emodinst_: · line 1332

Quoted 8 lines
Makefile +2 -0
@@ -1325,7 +1325,9 @@ _emodinst_:
 
 PHONY += _emodinst_post
 _emodinst_post: _emodinst_
+ifeq ($(INSTALL_MOD_PATH),)
 	$(call cmd,depmod)
+endif
 
 clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))

Thanks,
Rusty.

#2 lore raw
Quoted 8 lines · Rusty Russell
Quoted 7 lines · Jon Masters

Recent kernels include an additional call to depmod during the installation of external kernel modules as a convenience, in order to ensure that those modules are picked up by the module loading tools/initramfs scripts, etc. Although this call is potentially of some value, it should not be made when explicitly setting INSTALL_MOD_PATH to a different location. This avoids creating extraneous modules.* files that will never be used.

Quoted 5 lines
Quoted 1 line

I leave the Makefile stuff to the kbuild people...

Hey, thanks for forwarding. I figured I would do that, but I see you already did. And yea, next time I'll ping the Kbuild folks directly.

Jon.

Acked-by
#3 lore raw
In reply to Rusty Russell
Quoted 8 lines · Rusty Russell
Quoted 7 lines · Jon Masters

Recent kernels include an additional call to depmod during the installation of external kernel modules as a convenience, in order to ensure that those modules are picked up by the module loading tools/initramfs scripts, etc. Although this call is potentially of some value, it should not be made when explicitly setting INSTALL_MOD_PATH to a different location. This avoids creating extraneous modules.* files that will never be used.

Quoted 6 lines
Quoted 1 line

I leave the Makefile stuff to the kbuild people...

Looks good for me,