public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: Disable depmod in cross-compile kernel build
@ 2007-10-18 18:01 Deepak Saxena
  2007-10-18 19:26 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Deepak Saxena @ 2007-10-18 18:01 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel, Armin Kuster


When building embedded systems in a cross-compile environment and
populating a target's file system image, we don't want to run the 
depmod on the host as we may be building for a completely different
architecture. Since there's no such thing as a cross-depmod, we
just disable running depmod in the cross-compile case and we just
run depmod on the target at bootup.

Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Deepak Saxena <dsaxena@mvista.com>

diff --git a/Makefile b/Makefile
index 529b904..1705a91 100644
--- a/Makefile
+++ b/Makefile
@@ -1032,7 +1032,11 @@ depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
 endif
 PHONY += _modinst_post
 _modinst_post: _modinst_
-	if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
+	@if [ "$(CROSS_COMPILE)" = "" ]; then \
+		if [ -r System.map -a -x $(DEPMOD) ]; then \
+			$(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); \
+		fi \
+	fi
 
 else # CONFIG_MODULES
 

-- 
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net 

"He who sacrifices freedom for security deserves neither" - Ben Franklin

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

end of thread, other threads:[~2007-10-18 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 18:01 [PATCH] kbuild: Disable depmod in cross-compile kernel build Deepak Saxena
2007-10-18 19:26 ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox