Re: Compiling an i386 kernel on an amd64 host with make-kpkg



At Christmas I wrote:

I could save a lot of time compiling kernels for my PVR by compiling
them on my desktop PC which is much faster. However, the former is i386
(DEB_HOST_ARCH_CPU) and the latter is amd64 (actually it's Intel C2D,
but never mind, AMD deserve the credit).

I can't quite work out how to do this from man make-kpkg though. I guess
this counts as cross-compiling so I'll need to use '--arch i386', but I
can't work out what --cross-compile is for. It looks like I should use
'--cross-compile -'.

For the record, after trying out a number of different things, it seems
you do have to use '--cross-compile -' rather than i386 otherwise the
build process wants to use a proper cross-compiling environment. I tried
these options and ended up with a kernel which works OK on the 32-bit
machine.

CC="gcc -m32" AS="as --32" --arch i386 --cross-compile -

It isn't perfect because it produces an amd64 .deb, but it does work
when installed with --force-architecture.

--
TH * http://www.realh.co.uk

.