Cross compiling the kernel
VAKKALANKA RAO Sridhar
SVakkalankarao at covansys.com
Thu May 1 17:29:55 EST 2003
Thank you Todd,
Let me get this right. For zImage, I need a 32 bit gcc (--target=powerpc-linux for the gcc toolchain configuration) as opposed to a 64 bit gcc (--target=powerpc64-linux for the gcc toolchain configuration). Is that right?
This brings me to a more fundamental question, which takes me back to a stage even before I download the kernel sources (please bear with me as I am doing this for the first time). When I build the toolchain for the first pass (binutils & gcc), I set the binutils configuration to --target=powerpc-linux --enable_targets=powerpc64-linux.
As a result, the subsequent "make" & "make install" create the directory /opt/ppc64/powerpc-linux. They also create binaries with the full path /opt/ppc64/bin/powerpc-linux-XX. So, obviously when I configure gcc with --target=powerpc64-linux (as opposed to --target=powerpc-linux), the build fails. In order to solve this, I went into the directory /opt/ppc64 and executed the command "ln -s /opt/ppc64/powerpc-linux /opt/ppc64/powerpc64-linux". Subsequently, I went into the directory /opt/ppc64/bin and executed the commands "ln /opt/ppc64/bin/powerpc-linux-XX /opt/ppc64/bin/powerpc64-linux-XX" for each binary XX.
Please tell me if creating these links was the correct thing to do. When configuring binutils with --enable_targets=powerpc64-linux, is it possible that I did something wrong which is why the subsequent gcc toolchain configuration failed? Also, if I am to cross-compile the kernel with a 32-bit gcc, how is it possible for my 64 bit machine to take advantage of its 64-bit features?
Please give me an answer. Once again thanks Olaf and Todd.
Sri
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list