On Tue, 6 Sep 2005, Basel Al-Mustafa wrote:
Do you a know a guide that I can use to build a 64-bit kernel?
I was going to point you to my unofficial pure64 hint, but the process
is simple enough to describe here. Familiarise yourself with what you
use in your existing .config (particularly nic, video, scsi, sata), but
don't attempt to use a 32-bit config.
make CROSS_COMPILING=x86_64-pc-linux-gnu- ARCH=x86_64 menuconfig
Note the '-' at the end of the CROSS_COMPILING, this should match the
prefix given to your cross-compile tools (gcc, ld), correct what you
type if yours are somewhere else such as x86_64-unknown-linux-gnu-.
Also, these cross-tools need to be on your PATH, so do the native tools.
In the config, you haven't cross-built module-init-tools so you have to
build everything in, which is why it is important to identify what you
use. (Even if you did build it, it would install to the new partition,
so you would have to go the "if you are going to boot" route and build a
minimal environment, instead of having your comfortable existing
environment.) Take your time, look at all the options, some of this is
quite different (e.g. no HIGHMEM). And make sure you include support
for IA32 Emulation in Executable file formats / Emulations.
When you have a config,
make CROSS_COMPILING=x86_64-pc-linux-gnu- ARCH=x86_64
then copy the kernel from arch/x86_64/boot/bzImage.
Generally, you will probably find that DRI graphics don't work with
32-bit userspace, but that shouldn't be too big a deal. REboot, then
spend a bit of time making sure that everything you want to use during
the rest of your build works, and if necessary alter the config and
rebuild.
Running a 64-bit kernel with 32-bit userspace works fine, but if you
use it as a normal kernel for your 32-bit system you will find that
hardly anything can be compiled with the 32-bit userspace tools unless
you past the build/host/target identifiers (configure scripts will try
to build for x86_64). Obviously, this is not a problem with the target
tools you have created.
Enjoy!
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page