[PATCH] kbuild: Disable depmod in cross-compile kernel build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
Signed-off-by: Deepak Saxena <[email protected]>

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 - [email protected] - http://www.plexity.net 

"He who sacrifices freedom for security deserves neither" - Ben Franklin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux