On Jul 13, 2014, at 6:24 PM, James Richard Tyrer wrote:
IAC, I would be interested if Linux from Scratch would start a 64 bit book with an add on to BLFS on how to build, install, and boot a 64 bit Kernel. Perhaps this should be the start of Extreme Linux from Scratch :-).
The BOOK is setup so that if a user is running a 64 Bit Host running a 64bit kernel, it will build a 64bit LFS for x86_64. If the 64bit host is running a 32bit kernel, then a 32 bit LFS will be installed.
If you want a 32bit LFS build to be able to build a 64 bit kernel, then the instructions for binutils and glibc need to change.
for binutils, --enable-64bit-bfd needs to be used (don't need to enable multilib) and gcc needs to built with 64 support. This is done with --enable-multilib (LFS disables multilib by default for GCC if I recall correctly). I think that is all correct from my previous build experiences. The kernel only requires binutils and gcc to build, so those two must be able to build 64bit targets. Glibc can still be 32bit without issue.
I did this all of the time when I had a Dual G5 for powerpc64 and would built binduilts to enable 64bit bfd and gcc as multilib but it would default to 32bit with --with-cpu=default32 which is only for powerpc. For x86_64, you need to edit the specs or always use -m32, as -m32 is not default for gcc and x86_64 hosts. -m64 is default for x86_64 hosts. Oh, I also did the same with UltrasparcII and built 32 bit userspace but had binutils and gcc so that I could build host 64 bit kernels. Built the whole 32bit system using -m32 with gcc. UltraSPARC along with x86_64 didn't have a --with-cpu= option to default to 32bit, unlike powerpc64.
Sincerely, William Harrington -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
