Skip to contentSkip to conversation

PROBLEM: Cross-compiling fails (patch included)

PATCH Christian Bjälevik 2 participants 2 messages Dec 16, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

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

Signature · 21 lines
Christian     .-.    Bjälevik
Eskilstuna    /v\    [SWEDEN]
ICQ UIN      // \\   60036598
Linux User  /(   )\  [344682]
GPG Key ID   ^^-^^   23FE8EB7
        Jabber & Email
   [email protected]

-----------------------------
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
Makefile renamed from Makefile.orig +2 -0
diff -puN Makefile.orig Makefile
@@ -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
 
#1 lore raw
Quoted 7 lines · Christian Bj??levik

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.

Similar versions has been posted before.
But the right fix is to fix module-init-tools - therefore they have not been applied.

Rusty - any progress in this?

Sam