Cross Compiling driver for PPC
Nathael Pajani
nathael.pajani at cpe.fr
Thu Jan 5 00:44:40 EST 2006
Hi
> We are trying to port a newly developed device driver for powerPC .
> We are unable to compile it for powerpc driver on Host platform.
> Please give us the way to compile the device driver
You need to cross compile, which means having a ggc for powerpc in addition to the gcc you have for your developpement machine.
I do not know whether you will find it on the net, usualy you have to recompile gcc (and "ld" and "ar" and so on, the whole gcc toolchain I think) with specific options
Then you will have a powerpc-linux-gcc (for example) which will be able to compile for powerpc
then, you will have some modifications to do in the makefiles: look for this string: "CROSS_COMPILE" and set it to "powerpc-linux-" (or whatever is the prefix for you gcc).
I also created a ".arch" file at the base of the source tree, containing "ppc" and some other modifications in makefiles, but I cannot tell you wich... and wether they are usefull. You'll have to try.
Then add "ARCH=ppc" option to the make command when you want to compile your kernel for powerpc.
Have fun.
+++
----
Nathael PAJANI
Ingénieur CPE Lyon
nathael.pajani at cpe.fr
More information about the Linuxppc-embedded
mailing list