public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] 64-bit kernel on a 32-bit installation
@ 2009-06-09 23:44 Mark Knecht
  2009-06-10  5:35 ` [gentoo-user] " ABCD
  2009-06-10  5:58 ` Nikos Chantziaras
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Knecht @ 2009-06-09 23:44 UTC (permalink / raw
  To: gentoo-user

Hi,
   I lurk on the LKML, say hi once in awhile, ask a question once in
awhile, and try to read at least the interesting to a non-programmer
posts. I was curious about this one that came up today. Seems like
this is a natural for Gentoo.

   I have a Gentoo 64-bit setup but have had lots of troubles over the
years (far less now though) with web media and other things that need
to be more Windows compatible. (I do audio work with my Gentoo boxes -
interface to studios and a few bands, etc) I've found that my 32-bit
Gentoo installations have been more compatible than 64-bit. Outside
stuff like Java is better. In general when I have a problem I wonder
if it's because I'm running 64-bit.

   How would one go about building a 64-bit kernel on a 32-bit machine
with Gentoo? I presume that's mostly just how I configure the kernel,
along with maybe some cross-compile options? Are there any projects
going on in this area where I might become a test case? Wiki? Docs?

   Do others see value - getting 64-bit memory management, new CPU
flags, etc., but keeping the apps 32-bit for compatibility?

Take care,
Mark

<SNIP>
On Tue, 9 Jun 2009, H. Peter Anvin wrote:
>
> A major problem is that distros don't seem to be willing to push 64-bit
> kernels for 32-bit distros.  There are a number of good (and
> not-so-good) reasons why users may want to run a 32-bit userspace, but
> not running a 64-bit kernel on capable hardware is just problematic.

Yeah, that's just stupid. A 64-bit kernel should work well with 32-bit
tools, and while we've occasionally had compat issues (the intel gfx
people used to claim that they needed to work with a 32-bit kernel because
they cared about 32-bit tools), they aren't unfixable or even all _that_
common.

And they'd be even less common if the whole "64-bit kernel even if you do
a 32-bit distro" was more common.

The nice thing about a 64-bit kernel is that you should be able to build
one even if you don't in general have all the 64-bit libraries. So you
don't need a full 64-bit development environment, you just need a compiler
that can generate code for both (and that should be the default on x86
these days).

                       Linus
<SNIP>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-user]  Re: 64-bit kernel on a 32-bit installation
  2009-06-09 23:44 [gentoo-user] 64-bit kernel on a 32-bit installation Mark Knecht
@ 2009-06-10  5:35 ` ABCD
  2009-06-10  5:58 ` Nikos Chantziaras
  1 sibling, 0 replies; 3+ messages in thread
From: ABCD @ 2009-06-10  5:35 UTC (permalink / raw
  To: gentoo-user

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Knecht wrote:
> Hi,
>    I lurk on the LKML, say hi once in awhile, ask a question once in
> awhile, and try to read at least the interesting to a non-programmer
> posts. I was curious about this one that came up today. Seems like
> this is a natural for Gentoo.
> 
>    I have a Gentoo 64-bit setup but have had lots of troubles over the
> years (far less now though) with web media and other things that need
> to be more Windows compatible. (I do audio work with my Gentoo boxes -
> interface to studios and a few bands, etc) I've found that my 32-bit
> Gentoo installations have been more compatible than 64-bit. Outside
> stuff like Java is better. In general when I have a problem I wonder
> if it's because I'm running 64-bit.
> 
>    How would one go about building a 64-bit kernel on a 32-bit machine
> with Gentoo? I presume that's mostly just how I configure the kernel,
> along with maybe some cross-compile options? Are there any projects
> going on in this area where I might become a test case? Wiki? Docs?
> 
>    Do others see value - getting 64-bit memory management, new CPU
> flags, etc., but keeping the apps 32-bit for compatibility?
> 
> Take care,
> Mark

Personally, I am using a 64-bit kernel with a 32-bit userland.  My setup
is a bit more complicated than the usual, because I have a
x86_64-pc-linux-gnu-gcc that will build 32-bit as well as 64-bit
binaries.  The simpler version of what I use is:

# emerge crossdev
# crossdev -t x86_64-pc-linux-gnu

Then, you can use something like the following to actually build a
64-bit kernel (personally, I always use out-of-tree builds, and create a
GNUmakefile that calls the Makefile in the current directory with all
the options I want):

(in the kernel build directory)
# make -C /path/to/sources O=`pwd` ARCH=x86 \
    CROSS_COMPILE=x86_64-pc-linux-gnu- \
    menuconfig

I have found that just about everything works perfectly in my 64-bit
kernel with 32-bit userland, *except* VirtualBox, which I have to run
the 64-bit version of from a chroot.  I also personally handle all
external kernel modules, and add them to package.provided when
necessary, so portage doesn't have to think about them.

PS:
I was going to outline all the patches, etc. that I needed for a
multilib gcc/glibc, but then realized that you probably didn't need that
much detail.

- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkovRjcACgkQOypDUo0oQOrMdgCfXRiLDyg1IH8d9fA+WodUjWO8
PRMAnihXrPy3VZBYhRF7LzWVivKl2eIb
=dD3A
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-user]  Re: 64-bit kernel on a 32-bit installation
  2009-06-09 23:44 [gentoo-user] 64-bit kernel on a 32-bit installation Mark Knecht
  2009-06-10  5:35 ` [gentoo-user] " ABCD
@ 2009-06-10  5:58 ` Nikos Chantziaras
  1 sibling, 0 replies; 3+ messages in thread
From: Nikos Chantziaras @ 2009-06-10  5:58 UTC (permalink / raw
  To: gentoo-user

On 06/10/2009 02:44 AM, Mark Knecht wrote:
>     Do others see value - getting 64-bit memory management, new CPU
> flags, etc., but keeping the apps 32-bit for compatibility?

Personally, no.  I see more value in a true multilib Gentoo. 
Unfortunately, Gentoo's multilib is "fake".  You can't build 32-bit libs 
and packages but have to download "emul" binary packages instead.  It is 
by far better (IMO) being able to compile problematic packages as 32-bit 
instead of running a 32-bit userland in a 64-bit kernel.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-10  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-09 23:44 [gentoo-user] 64-bit kernel on a 32-bit installation Mark Knecht
2009-06-10  5:35 ` [gentoo-user] " ABCD
2009-06-10  5:58 ` Nikos Chantziaras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox