PATCH to fix depmod failure for modules-install of a cross compiledkernel. (fwd)

From: Mark Fortescue
Date: Mon Oct 18 2004 - 13:18:26 EST


Opps. Sorry, I did not read all of the lists of things to so for
submitting a patch.

---------- Forwarded message ----------
Date: Sun, 17 Oct 2004 21:30:02 +0100 (BST)
From: Mark Fortescue <mark@xxxxxxxxxxxxxxxxxx>
To: kai@xxxxxxxxxxxxxxxxxx, sam@xxxxxxxxxxxx
Cc: trivial@xxxxxxxxxxxxxxx
Subject: depmod failure for modules-install of a cross compiled kernel.

Hi all,

I ran into a small but inconvinient problem today when doing a
modules-install. The tempory solution is do disable depmod
when corss compiling. See the patch below.

Regards
Mark Fortescue.

##############################################################################
#
# Mark Fortescue (mark@xxxxxxxxxxxxxxxxxx) 17th Oct 2004
#
# (from 2.6.8.1 with patch-2.6.9-rc2 and patch-2.6.9-rc2-bk6 applied.)
#
# When cross compiling for sparc on an i586 system,
# 'depmod' (module-init-tools-3.0) core dumped. The tempory
# solution is to disable 'depmod' when cross compiling.
# The correct solution is to fix 'depmod'.
#
##############################################################################
diff -ruNpd linux-2.6.8.1/Makefile linux-2.6.8.1-p02/Makefile
--- linux-2.6.8.1/Makefile Fri Oct 15 20:19:18 2004
+++ linux-2.6.8.1-p02/Makefile Sun Oct 17 02:38:34 2004
@@ -868,7 +868,7 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r
endif
.PHONY: _modinst_post
_modinst_post: _modinst_
- if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
+ if [ -r System.map -a -z "$(CROSS_COMPILE)" ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi

else # CONFIG_MODULES

-----------------------------------------------------------------



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/