Re: make-kpkg doesn't work properly when compiling i386 kernel on amd64 host
In article <xs4all.CAHurxuitAusyBJ9aqo0-Ncegvp4wHXb_dxdSjJQue-FF=_kU0g@mail.gmail.com> you write:
>Hello, I am trying to build a kernel for my i386 PC on a amd64 server.
>
>I follow a old instrusion at
>http://lists.debian.org/debian-user/2008/07/msg00926.html . It can build
>the kernel itself correctly, but the problem is script tools such as
>genksyms are build as amd64 format.
>I notice that Linux Makefile mentions an environment variable named HOSTCC.
>I tried to set the variable, but it still failed because of linker issue.
>
>Can make-kpkg do this job correctly? What extra parameter I should add?
Yes, you can do this.
1. add "ARCH=i386" to "make config" and similar commands, for example:
cd linux-<version>
cp .../where/ever/your/dotconfig/file/is/dotconfig .config
make oldconfig ARCH=i386
2. Run make-kpkg with an i386 specific environment and flags, like:
CONCURRENCY_LEVEL=3 DEB_HOST_ARCH=i386 make-kpkg \
--cross-compile - --arch i386 --rootcmd fakeroot \
--revision <REVISION_YOU_USE> --append-to-version <APPEND_YOU_USE> \
--initrd kernel_image
The important thing is to set DEB_HOST_ARCH=i386 in the environment
of make-kpkg and add the flags "--cross-compile - --arch i386"
Mike.
Reply to: