PROBLEM: Cross-compiling fails (patch included)

From: Christian BjÃlevik
Date: Thu Dec 16 2004 - 13:34:04 EST


Hi there!

When using kernel-package (Debian specific kernel-management) to cross-compile a kernel in a i386-chroot on my x86_64 laptop modules_install fails when trying to depmod things. Since we should not depmod those things if the arch being built isn't the same as 'uname -m' I wrote a patch for the Makefile to test those conditions.

Sincererly

PS I'm not subscribed to those lists, please CC me on reply. DS
--
Christian .-. BjÃlevik
Eskilstuna /v\ [SWEDEN]
ICQ UIN // \\ 60036598
Linux User /( )\ [344682]
GPG Key ID ^^-^^ 23FE8EB7
Jabber & Email
nafallo@xxxxxxxxxxxxxxxx

-----------------------------
diff -puN Makefile.orig Makefile
--- Makefile.orig 2004-12-09 00:08:43.000000000 +0100
+++ Makefile 2004-12-08 23:59:34.000000000 +0100
@@ -788,7 +788,9 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r
endif
.PHONY: _modinst_post
_modinst_post: _modinst_
+ifeq ([ uname -m ],$(ARCH))
if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $$+endif

else # CONFIG_MODULES

diff -puN Makefile.orig Makefile
--- Makefile.orig 2004-12-09 00:08:43.000000000 +0100
+++ Makefile 2004-12-08 23:59:34.000000000 +0100
@@ -788,7 +788,9 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r
endif
.PHONY: _modinst_post
_modinst_post: _modinst_
+ifeq ([ uname -m ],$(ARCH))
if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
+endif

else # CONFIG_MODULES