On 07/12/2014 09:51 PM, Ken Moffat wrote:
On Sat, Jul 12, 2014 at 09:04:25PM -0400, alex lupu wrote:
Hello everybody,
I'd very much appreciate any helpful words about the basic steps,
pitfalls, relative effort, reliability on changing my old, tried and true,
pretty up-to-date, "BLFS" system (typically) from "pure" 32 to 64 bits.
Obvious assumptions:
64-bit processor
32-bit (3.14.2) kernel.
Not gory details; just the wisdom and feasibility of embarking on such a
monumental(?) endeavor versus creating a new system from Scratch.
Maybe a mixture of 32-bit and 64-bit capabilities?
Thanks,
-- Alex
An x86_64 processor will be able to run the 'i686' 32-bit kernel
and userspace (but the available memory might be limited, depending
on whether or not your 32-bit kernel enables PAE : mine don't, I
dislike the concept of "bounce buffers" because historically my
machines have always been slow and low-powered : and on a 32-bit
(AMD) system with 4GB and integrated graphics I see approx 2.5GB
of RAM instead of the approx 3.5GB which I see in 64-bit). Assuming,
of course, that your kernel will work on whichever processor you are
moving to - it is possible to "tune" it to non-generic, so that it
will only work on AMD, or alternatively so that it will only work on
intel.
I have been mostly using 64-bit since before CLFS had "pure64"
x86_64-64 - my memory says that I had to do a full cross-compile of
the basic system for the first working attempt, after that it was
able to bootstrap itself (although restricted to lilo for the
bootloader in those distant days). At one time I think I wrote a
hint. Bruce always thought such an approach was ultra vires, but
some of us did it. Nowadays, it would be _much_ simpler to install
a 64-bit distro as the host system (ideally, a recent one which does
not use systemd - unless you like that - assuming that such distros
still exist ;)
As an LFS user, we assume you will later build a separate new
system to replace the current one, so having (at least) two possible
root partitions is not a problem, and therefore the 64-bit distro can
be replaced by your next LFS build, after you have proved that the
64-bit LFS works ok. Of course, you can also run multiple 32-bit
systems as well - my development machines can typically run six LFS
installs even on the old DOS partition layout.
Another possible alternative, not supported by either LFS or CLFS,
would be to use a 64-bit kernel but 32-bit userspace. That seems to
be the variaant which Linus prefers if 32-bit userspace is needed.
It would need a seaprate binutils and gcc (C only, i.e. pass 1) to
cross-compile the kernel, perhaps in /opt/kgcc, and it might also
require you to invoke 'linux32' in the bootscripts (so that uname -m
reports i686 and you can compile userspace). I used to do something
similar to that to run 32-bit ppc userspace on my G5 ppc64 mac, but
for modern x86 desktops and laptops (where memory is typically in
multiples of2GB if you want full-speed) it does not seem worth the
effort.
When I first tested x86_64, and my RAM was limited to (probably)
1GB, it ran my tests faster because x86_64 has more registers. With
recent gcc I would not want to use 64 bits on a machine with so
little memory, but fortunately modern hardware has changed. OTOH,
if the machine is a "consumer" desktop (i.e. you do not create
anything on it which uses complex programs) it is theoretically
possible that, with adequate memory, 32-bit compiles might still
take less time than 64-bit, and they will certainly be smaller.
As I said, my only current 32-bit system only has 2.5GB of available
RAM in 32-bit mode, so it is _slow_.
Either way. I recommend that you spend some time tuning the kernel
config to your hardware (many kernel options in x86_64 differ from
i?86), and also I recommend that you move to a current kernel -
Greg KH announced that 3.14 will be the latest long-term stable
kernel series, so current 3.14 (3.14.12 at the moment) is probably
good (I've only built 3.14.11 so far, and my hardware or config
might differ from yours, also 3.16-rc is more interesting to me ;).
Decisions, decisions. Enjoy making the choice(s), and testing to
see if 64-bit is beneficial to you.
ĸen
I would be interested in building a 64 bit Kernel.
It was my understanding that this would allow more control over address
space. Currently, if you install 4GB of memory on a machine that is
limited to 4GB of memory there is little point since you have little
more memory than if you had installed 3GB. I understood that a 64 bit
Kernel would be able to use all 4GBs of memory in that case. Is this
true, or would it still be limited by the hardware?
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 :-).
I am currently running 3GB ram but have the DIMMs for 4GB.
--
James Tyrer
Linux (mostly) From Scratch
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page