Bug 3881 - Cross-compiling fails (patch included)
Summary: Cross-compiling fails (patch included)
Status: CLOSED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Sam Ravnborg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 10:50 UTC by Christian Bj
Modified: 2007-10-19 20:52 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.8 2.6.9 (which I know of)
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
Wraps an ifeq around depmod -ae in the Makefile (409 bytes, patch)
2004-12-09 10:53 UTC, Christian Bj
Details | Diff

Description Christian Bj 2004-12-09 10:50:49 UTC
Distribution: Ubuntu Warty
Hardware Environment: AMD64
Software Environment: Debian sarge chroot
Problem Description:
When cross-compiling modules_install fails because depmod -ae is run from
Makefile. When using tools like for example kernel-package in Debian we need to
install those to make a kernel-package out of it. But that fails cause you can't
depmod i386 modules on x86_64 ;-).

Steps to reproduce:
Just try to make modules_install under a chroot on another architecture.

Patch for wrapping depmod -ae in the makefile in a ifeq:
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
Comment 1 Christian Bj 2004-12-09 10:53:23 UTC
Created attachment 4250 [details]
Wraps an ifeq around depmod -ae in the Makefile

I'll send it as a .patch also :-).
Comment 2 Adrian Bunk 2005-08-01 10:38:33 UTC
The patch itself is wrong (note that e.g. i386 != i686), but I'm reassigning it
to Sam who should be able to comment on the problem.
Comment 3 Adrian Bunk 2006-03-20 02:55:18 UTC
Sam, can you comment on this issue?
Comment 4 Natalie Protasevich 2007-09-19 19:48:56 UTC
Any updates on this issue?
Thanks.

Note You need to log in before you can comment on or make changes to this bug.