[SOLVED] How to build kernel for amd64 variant

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
urbofax
Posts: 11
Joined: 2014-07-24 01:33

[SOLVED] How to build kernel for amd64 variant

#1 Post by urbofax »

Hi,

I want to build an upstream kernel with the Debian image's configuration. My system is normally i386 but I use the -amd64 variant so I want to build that one.

My workflow is like this: I build kernels in a i386 jessie chroot. I use the upstream tarballs, copy the config file of the relevant debian kernel variant and then "make olddefconfig && make deb-pkg ..."

The problem is:

1. I can build pae kernels just fine using the config file of Debian's -686-pae image. It builds the kernel and creates i386 deb packages.

2. When I try to build -amd64 kernel, using the config file of the -amd64 variant of the i386 package (the one I've linked above), make deb-pkg creates deb packages with the amd64 architecture (the resulting deb files end in _amd64.deb, contrary to the packages I've linked above).

3. Instead, if I build with ARCH=i386 make olddefconfig && ARCH=i386 make deb-pkg, using the same config file from the -amd64 variant of the i386 package, the resulting debs are _i386.deb files, but this time they're really i386, not even PAE.

I compared the .config file from the (2) and (3) after the kernels are compiled, and they're same.

So, what is the procedure to follow building the -amd64 kernels but in i386 deb files?
Last edited by urbofax on 2014-10-27 23:16, edited 1 time in total.

urbofax
Posts: 11
Joined: 2014-07-24 01:33

Re: How to build kernel for amd64 variant

#2 Post by urbofax »

I found a highly relevant bug report

I'll stript the ARCH=i386 vars, build with KBUILD_DEBARCH=i386 and will post the result here.

urbofax
Posts: 11
Joined: 2014-07-24 01:33

Re: How to build kernel for amd64 variant

#3 Post by urbofax »

I tested it and the correct invocation is:

Code: Select all

make deb-pkg ARCH=x86_64 KBUILD_DEBARCH=i386
It builds a 64 bit kernel, but packages it for i386 architecture.

Post Reply