From: Sven Joachim on
On 2009-12-23 11:07 +0100, Daniel Bareiro wrote:

> Reading [1] and [2], I already found the cause of this problem. The
> configuration in "Executable file formats / Emulations" must be the
> following one in order to use a kernel x86_64 in userland 32.
>
> [*] Kernel support for ELF binaries
> [ ] Write ELF core dumps with partial segments
> <M> Kernel support for MISC binaries
> [*] IA32 Emulation

Now that you mention it, I recall that this isn't set up automatically
when you come from a 32-bit configuration.

> b) Debian way compilation:
>
> b.1) Having booted an i386 kernel and userland 32:
>
> # cp /boot/config-`uname -r` ./.config
>
> # make ARCH=x86_64 menuconfig
>
> # fakeroot make-kpkg clean --cross-compile - -arch amd64
>
> # fakeroot make-kpkg --initrd --cross-compile - -arch amd64 \
> --append-to-version=-dgb kernel_image kernel_headers
>
>
> It does not present questions during "make" and it boots ok enabling the
> options mentioned above.
>
> Another thing that I have noticed is that the packages are generated
> with a suffix i386, although after boot the kernel is x86_64:
>
> linux-headers-2.6.32-dgb_2.6.32-dgb-10.00.Custom_i386.deb
> linux-image-2.6.32-dgb_2.6.32-dgb-10.00.Custom_i386.deb

Yes, because you are building on i386 (as in
"dpkg --print-architecture"). This is what you want, BTW.

> b.2) Having booted an amd64 kernel and userland 32:
>
> # cp /boot/config-`uname -r` ./.config
>
> # make menuconfig
>
> # fakeroot make-kpkg clean
>
> # fakeroot make-kpkg --initrd --append-to-version=-dgb kernel_image \
> kernel_headers

You still need to specify --cross-compile and --arch here.

Sven


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Daniel Bareiro on
On Wednesday, 23 December 2009 11:19:26 +0100,
Sven Joachim wrote:

> > b) Debian way compilation:
> >
> > b.1) Having booted an i386 kernel and userland 32:
> >
> > # cp /boot/config-`uname -r` ./.config
> >
> > # make ARCH=x86_64 menuconfig
> >
> > # fakeroot make-kpkg clean --cross-compile - -arch amd64
> >
> > # fakeroot make-kpkg --initrd --cross-compile - -arch amd64 \
> > --append-to-version=-dgb kernel_image kernel_headers
> >
> >
> > It does not present questions during "make" and it boots ok enabling
> > the options mentioned above.
> >
> > Another thing that I have noticed is that the packages are generated
> > with a suffix i386, although after boot the kernel is x86_64:
> >
> > linux-headers-2.6.32-dgb_2.6.32-dgb-10.00.Custom_i386.deb
> > linux-image-2.6.32-dgb_2.6.32-dgb-10.00.Custom_i386.deb

> Yes, because you are building on i386 (as in
> "dpkg --print-architecture"). This is what you want, BTW.

Ah, ok. The suffix doesn't depend on the specific architecture of kernel
but of all the distribution that one is using. For that reason with
Ubuntu amd64 yes the packages are generated with suffix amd64 :-)

> > b.2) Having booted an amd64 kernel and userland 32:
> >
> > # cp /boot/config-`uname -r` ./.config
> >
> > # make menuconfig
> >
> > # fakeroot make-kpkg clean
> >
> > # fakeroot make-kpkg --initrd --append-to-version=-dgb kernel_image \
> > kernel_headers

> You still need to specify --cross-compile and --arch here.

And why in this case yes we must use these options if running an amd64
kernel in userland 32 is not necessary to use ARCH=x86_64 in the
invocations of "make" when compiling of the traditional way?


Thanks for your reply and merry Christmas.

Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
From: Stephen Powell on
On 2009-12-17 at 21:32:59 -300, Daniel Bareiro wrote:
> Hi all!
>
> I am trying to compile Linux 2.6.32 with the source code of kernel.org.
> Kernel that I'm using at the moment is 2.6.26-2-686 of the Debian
> GNU/Linux repositories.
>
> In order to generate the configuration, I've copied the file
> corresponding to this kernel to the directory of sources,
> /usr/src/linux, and I've executed make menuconfig:

As some others have already pointed out, I believe your basic problem
is trying to use a config file from an old release with a new release.
That is not recommended. But on the general subject of kernel building
in Debian, you might want to check out the following web site:

http://www.wowway.com/~zlinuxman/Kernel.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Daniel Bareiro on
Hi, Sven.

On Wednesday, 23 December 2009 11:19:26 +0100,
Sven Joachim wrote:

> > b) Debian way compilation:
> >
> > b.1) Having booted an i386 kernel and userland 32:
> >
> > # cp /boot/config-`uname -r` ./.config
> >
> > # make ARCH=x86_64 menuconfig
> >
> > # fakeroot make-kpkg clean --cross-compile - -arch amd64
> >
> > # fakeroot make-kpkg --initrd --cross-compile - -arch amd64 \
> > --append-to-version=-dgb kernel_image kernel_headers
> >
> >
> > It does not present questions during "make" and it boots ok enabling
> > the options mentioned above.
> >
> > Another thing that I have noticed is that the packages are generated
> > with a suffix i386, although after boot the kernel is x86_64:
> >
> > linux-headers-2.6.32-dgb_2.6.32-dgb-10.00.Custom_i386.deb
> > linux-image-2.6.32-dgb_2.6.32-dgb-10.00.Custom_i386.deb

> Yes, because you are building on i386 (as in
> "dpkg --print-architecture"). This is what you want, BTW.

Ah, ok. The suffix doesn't depend on the specific architecture of kernel
but of all the distribution that one is using. For that reason with
Ubuntu amd64 yes the packages are generated with suffix amd64 :-)

> > b.2) Having booted an amd64 kernel and userland 32:
> >
> > # cp /boot/config-`uname -r` ./.config
> >
> > # make menuconfig
> >
> > # fakeroot make-kpkg clean
> >
> > # fakeroot make-kpkg --initrd --append-to-version=-dgb kernel_image
> > \
> > kernel_headers

> You still need to specify --cross-compile and --arch here.

And why in this case yes we must use these options if running an amd64
kernel in userland 32 is not necessary to use ARCH=x86_64 in the
invocations of "make" when compiling of the traditional way?


Thanks for your reply and merry Christmas.

Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598
From: Daniel Bareiro on

Sorry to send this message twice, but I thought that for some reason it
had not arrived at the list. Although it seems that both messages
arrived with a delay of six hours. This can be due to some moderation of
the list?

On Thursday, 24 December 2009 09:45:54 -0300,
Daniel Bareiro wrote:

> > > b.2) Having booted an amd64 kernel and userland 32:
> > >
> > > # cp /boot/config-`uname -r` ./.config
> > >
> > > # make menuconfig
> > >
> > > # fakeroot make-kpkg clean
> > >
> > > # fakeroot make-kpkg --initrd --append-to-version=-dgb kernel_image \
> > > kernel_headers

> > You still need to specify --cross-compile and --arch here.

> And why in this case yes we must use these options if running an amd64
> kernel in userland 32 is not necessary to use ARCH=x86_64 in the
> invocations of "make" when compiling of the traditional way?

Well, thinking a little more about this subject, the cause by which this
happens perhaps is that when make-kpkg consults the general architecture
of the system, it obtains in (b.1) as in (b.2) that is i386. For that
reason in both cases it is necessary to use --cross-compile and --arch.

Nevertheless when being used the compilation of the traditional way,
this becomes by outside any own control of Debian and the architecture
that will be used by default is the one of running kernel.

Is correct this asseveration?

Merry Christmas.

Regards,
Daniel
--
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Lenny - Linux user #188.598