Gentoo Archives: gentoo-user

From: ABCD <en.ABCD@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: 64-bit kernel on a 32-bit installation
Date: Wed, 10 Jun 2009 05:36:09
Message-Id: h0ngng$lg3$
In Reply to: [gentoo-user] 64-bit kernel on a 32-bit installation by Mark Knecht
2 Hash: SHA1
4 Mark Knecht wrote:
5 > Hi,
6 > I lurk on the LKML, say hi once in awhile, ask a question once in
7 > awhile, and try to read at least the interesting to a non-programmer
8 > posts. I was curious about this one that came up today. Seems like
9 > this is a natural for Gentoo.
10 >
11 > I have a Gentoo 64-bit setup but have had lots of troubles over the
12 > years (far less now though) with web media and other things that need
13 > to be more Windows compatible. (I do audio work with my Gentoo boxes -
14 > interface to studios and a few bands, etc) I've found that my 32-bit
15 > Gentoo installations have been more compatible than 64-bit. Outside
16 > stuff like Java is better. In general when I have a problem I wonder
17 > if it's because I'm running 64-bit.
18 >
19 > How would one go about building a 64-bit kernel on a 32-bit machine
20 > with Gentoo? I presume that's mostly just how I configure the kernel,
21 > along with maybe some cross-compile options? Are there any projects
22 > going on in this area where I might become a test case? Wiki? Docs?
23 >
24 > Do others see value - getting 64-bit memory management, new CPU
25 > flags, etc., but keeping the apps 32-bit for compatibility?
26 >
27 > Take care,
28 > Mark
30 Personally, I am using a 64-bit kernel with a 32-bit userland. My setup
31 is a bit more complicated than the usual, because I have a
32 x86_64-pc-linux-gnu-gcc that will build 32-bit as well as 64-bit
33 binaries. The simpler version of what I use is:
35 # emerge crossdev
36 # crossdev -t x86_64-pc-linux-gnu
38 Then, you can use something like the following to actually build a
39 64-bit kernel (personally, I always use out-of-tree builds, and create a
40 GNUmakefile that calls the Makefile in the current directory with all
41 the options I want):
43 (in the kernel build directory)
44 # make -C /path/to/sources O=`pwd` ARCH=x86 \
45 CROSS_COMPILE=x86_64-pc-linux-gnu- \
46 menuconfig
48 I have found that just about everything works perfectly in my 64-bit
49 kernel with 32-bit userland, *except* VirtualBox, which I have to run
50 the 64-bit version of from a chroot. I also personally handle all
51 external kernel modules, and add them to package.provided when
52 necessary, so portage doesn't have to think about them.
54 PS:
55 I was going to outline all the patches, etc. that I needed for a
56 multilib gcc/glibc, but then realized that you probably didn't need that
57 much detail.
59 - --
62 Version: GnuPG v2.0.11 (GNU/Linux)
63 Comment: Using GnuPG with Mozilla -
66 PRMAnihXrPy3VZBYhRF7LzWVivKl2eIb
67 =dD3A
68 -----END PGP SIGNATURE-----