[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Compiling kernel (i386) using make-kpkg



I am using Lenny (amd64) on my AMD Athlon(tm) 64 X2 Dual Core Processor "host" machine. Here is the arch info for this machine:
debian64:~# dpkg-architecture 
DEB_BUILD_ARCH=amd64
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_ARCH_CPU=amd64
DEB_BUILD_GNU_CPU=x86_64
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=x86_64-linux-gnu
DEB_HOST_ARCH=amd64
DEB_HOST_ARCH_OS=linux
DEB_HOST_ARCH_CPU=amd64
DEB_HOST_GNU_CPU=x86_64
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=x86_64-linux-gnu
debian:/usr/src/

Now I would like to compile a 32-bit kernel (i386) for my Intel "target" machine on my above 64-bit host machine. Here is the architecture is for my target machine:
debian32:~# dpkg-architecture 
DEB_BUILD_ARCH=i386
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_ARCH_CPU=i386
DEB_BUILD_GNU_CPU=i486
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=i486-linux-gnu
DEB_HOST_ARCH=i386
DEB_HOST_ARCH_OS=linux
DEB_HOST_ARCH_CPU=i386
DEB_HOST_GNU_CPU=i486
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=i486-linux-gnu
debian32:~#

I would like to build kernels using make-kpkg i.e. Debian way. What is the best way to do this?

So far I have tried:
# linux32
# CROSS_COMPILE=i486-linux-gnu
fakeroot make-kpkg --cross-compile - -arch i386 --append-to-version=-32bit kernel_image

but it gives me the following error mesasge:
dpkg-gencontrol: error: current host architecture 'amd64' does not appear in package's architecture list (i386)

Somebody suggested me to use the compile flag "-m32" but I am not sure where to add this and how to tell make-kpkg to see it.

I would like to know if anybody in this list knows how to compile a 32-bit (i386) kernel on a 64-bit (amd64) OS. I am guessing it should not be that hard.

Regards,

Kushal Koolwal

I do blog at http://blogs.koolwal.net/



 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/


Reply to: