Hi,
I'm trying to compile a 32-bit linux kernel to run on my x86_64, so that i
can run RTAI. I have tried following the instructions for cross-compilation
on the kernelnewbies FAQ, and have searched for help on the web, but think I
am still missing something basic.
Here's what I've done so far:
---
1. used rpm to check for binutils, etc.
2. downloaded the i686 cross-compiler from
http://developer.osdl.org/dev/plm/cross_compile/ .
Installed this in /var/crosstools
3. added the cross-compile tool directory to the path, i.e. "export
PATH=$PATH:/var/crosstool/i686-unknown-linux-gnu/gcc-4.0.0-glibc-2.3.5"
4. configured the kernel, i.e., "make
CROSS_COMPILE=i686-unknown-linux-gnu- ARCH=i386 menuconfig"
and verfied that the configuration included generic x86 support (instead of
support for an x86_64 processor)
5. tried to compile the kernel. according to the kernelnewbies FAQ, i
should be able to run, "make
CROSS_COMPILE=i686-unknown-linux-gnu- all," but this
doesn't find the cross-compiler, i.e. i get the following error: "make:
i686-unknown-linux-gnu-gcc: Command not found."
6. So then i tried explicitly specifying the location of the cross-compiler,
i.e., "make
CROSS_COMPILE=/var/crosstool/i686-unknown-linux-gnu/gcc-
3.4.2-glibc-2.3.3/i686-unknown-linux-gnu/bin/ ARCH=i386 all". However, now
i get errors suggesting that i am still compiling a 64-bit kernel, e.g.:
"integer constant is too large for 'unsigned long' type", "warning: right
shift count >= width of type", and " warning: cast from pointer to integer
of different size".
7. i tried adding the flag, "CFLAGS=-m32" to tell gcc to do a 32-bit
compilation, but i get the same errors.
----
again, i've tried to follow the information i've found online so far, but
seem to be missing something basic. can anyone help?
thanks,
vikaas