Skip to contentSkip to conversation

kbuild: Allow to use depmod from a non default install

PATCH New Carmelo Amoroso 1 participant 1 message Nov 8, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Allow to use depmod from a non default install

This patch allow to specify the directory where to find the depmod tool other than being forced to use the module-init-tools installed on the host. The reason for this is explained below. When doing cross-compilation, it not guaranteed that the module-init-tools installed on the host (and used during kernel build) are exactly the same and compatible with those used on the target at runtime. For example, recent changes in how depmod writes modules.dep using root-less path, make older modprobe unusable on the target.
User in ths case could install in a different path the module-init-tools compatible with the version used on the target and specify the path on the command line.

---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Makefile +2 -1
index b4c04f7..f5286c4 100644
@@ -316,7 +316,8 @@ OBJDUMP             = $(CROSS_COMPILE)objdump
 AWK            = awk
 GENKSYMS       = scripts/genksyms/genksyms
 INSTALLKERNEL  := installkernel
-DEPMOD         = /sbin/depmod
+DEPMOD_PATH    ?= /sbin
+DEPMOD         = $(DEPMOD_PATH)/depmod
 KALLSYMS       = scripts/kallsyms
 PERL           = perl
 CHECK          = sparse
Signature · 1 line
1.6.3.3