On Friday 10 March 2006 09:11, Bo Andresen <[EMAIL PROTECTED]> wrote 
about 'Re: [gentoo-amd64] upgrading from 2005.0 x86, to 2006.0 amd64':
> On Friday 10 March 2006 14:51, Mike Williams wrote:
> > At the moment it's happily running a 32bit kernel, with 32bit
> > userland. From my experimentation last night, I suspect I will need to
> > boot an amd64 livecd to compile a proper 64bit kernel, which will
> > enable me to compile a 64bit toolchain.
> > Could not compile a 64bit kernel, or a multilib gcc, from the 32bit
> > kernel.
>
> You might want to have a look at this recent thread from the gentoo-user
> mailing list. Boyd helped me to compile a 64 bit kernel from 32 bit
> kernel and user land using a cross compiler. It was actually quite easy.
> The 64 bit user land I got from the amd64 stage3 tarball. This was a
> fresh install but using a 32 bit live cd.

Heh. Bo, you beat me to the punch.  That's what I get for working 11 hour 
days. :P

> http://groups.google.com/group/linux.gentoo.user/browse_thread/thread/e4
>629ea8751a9ab4/815dbc64722b7d49%23815dbc64722b7d49?sa=X&oi=groupsr&start=
>1&num=3
>
> I think the important steps for compiling a 64 bit kernel were:
>
> To get a working cross compiler:
> #emerge crossdev
> #crossdev -s1 -t x86_64
>
> To configure a 64 bit kernel using that cross compiler:
> #cd /usr/src/linux
> #make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-

Probably want to stick a menuconfig / config / xconfig on the end of that 
command line.

> In my case the include/asm symlink pointed towards asm-386
> # ls -ld include/asm
> lrwxrwxrwx  1 root root 10 Feb 24 14:27 include/asm -> asm-386

As I mentioned in our thread, post-mortem, I think a 'make mrproper' would 
clear up this symlink, so that the next 'make' would re-create it.

> Compile 64 bit kernel:
> #make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu-
> #make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu- modules_install

Also, make sure that while you have a 32-bit userland (or are using 
multilib) that you select the kernel option for supporting 32-bit code.  I 
believe it's referred to as IA32 executable support.  The exact config 
option should be in that above thread.

After you get a 32-bit kernel, you should be able to change your make.
{conf,profile} (you'll want to check your CHOST and ACCEPT_KEYWORDS, at a 
minimum) then emerge -e world for a nice 64-bit userland.  You may, 
however, run into some packages that you have to downgrade or do without 
-- not everything keyworded x86 is also keywords amd64, for better or 
worse.

-- 
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh
-- 
gentoo-amd64@gentoo.org mailing list

Reply via email to