2004-10-18 18:14:16

by Mark Fortescue

[permalink] [raw]
Subject: PATCH to fix depmod failure for modules-install of a cross compiled kernel. (fwd)

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 <[email protected]>
To: [email protected], [email protected]
Cc: [email protected]
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 ([email protected]) 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

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




2004-10-18 19:07:20

by Sam Ravnborg

[permalink] [raw]
Subject: Re: PATCH to fix depmod failure for modules-install of a cross compiled kernel. (fwd)

On Mon, Oct 18, 2004 at 07:07:07PM +0100, Mark Fortescue wrote:
>
> 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.

I rather keep the present situation in the hope that either depmod is
fixed, or functionality implemented where it blelongs.

Sam

2004-10-19 08:20:10

by Keith Owens

[permalink] [raw]
Subject: Re: PATCH to fix depmod failure for modules-install of a cross compiled kernel. (fwd)

On Mon, 18 Oct 2004 19:07:07 +0100 (BST),
Mark Fortescue <[email protected]> wrote:
># 'depmod' (module-init-tools-3.0) core dumped. The tempory
># solution is to disable 'depmod' when cross compiling.

When cross compiling, specify 'DEPMOD=/bin/true' on the command line to
turn it into a no-op.