Cross-compile from 32bits to 64bits for AMD64

Stan Sander ssande at
Wed Nov 9 06:27:23 PST 2005

go moko wrote:

>Please excuse my poor english...
>I've an AMD64 processor and a LFS 32bits system
>installed on it. I try to crosscompile, on this
>machine, to 64bits, and all works fine, until I must
>choose to chroot or reboot.
>It seems that a chroot is not possible because the new
>compiled binaries in /tools are in 64bits, and as the
>kernel is still in 32bits, I've a "cannot execute
>binary files" on /tools/bin/env and /tools/bin/bash.
>So I guess I'm forced to try the reboot, but this
>means overwriting the 32bits binaries and libraries on
>my LFS system before rebooting.
>Can you confirm that I'm right, or is there any mean
>to use the chroot in this configuration? And if it's
>true, shouldn't it be indicated in the part of the
>book "To boot or to chroot?".
>Thanks for your responses
>G. Moko
I have recently done the same thing successfully.  I followed the path 
to boot  (chapter 7).  Basically what you need to do is install the 
native 64-bit tools that you compile in the "If you are going to boot" 
(chapter 7) in /tools/usr /tools/lib, etc.  This is all documented in 
the instructions in that chapter.  When you build your new kernel, make 
sure you enable the IA_32 Emulation. 

Stan Sander - CSU Special Projects  (505)284-4915
ASAP, LLC, Contractor assigned to Sandia National Laboratories
Unix Systems/Server Administrator 

Microsoft: You've got questions. We've got a dancing paperclip.

More information about the cross-lfs mailing list