[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cross compilation error



Hello,

You don't need to edit the makefile. You can also set the CROSS_COMPILE
environment and put the path-to-crosscompiler/bin in your PATH.

export PATH=$PATH:/path-to-crosscompiler/bin

make CROSS_COMPILE=arm-linux- 
 
Quoting Lennart Sorensen <lsorense@csclub.uwaterloo.ca>:

> >  
> > 
> > The thing is that when I try to "make" - I get the following error
> > 
> >  
> > 
> > debian:/home/rani/kernel/linux-2.6.8.1# make
> > 
> >   CHK     include/linux/version.h
> > 
> >   SPLIT   include/linux/autoconf.h -> include/config/*
> > 
> >   CC      scripts/mod/empty.o
> > 
> > Assembler messages:
> > 
> > Error: Invalid processor variant -mcpu=xscale
> > 
> > make[2]: *** [scripts/mod/empty.o] Error 1
> > 
> > make[1]: *** [scripts/mod] Error 2
> > 
> > make: *** [scripts] Error 2
> 
> gcc 2.95 (and probably 3.0) don't have support for xscale.  You can tune
> for strongarm instead, or start using gcc 3.2 or 3.3 (I use 3.3.4 from
> sarge) and it will work much better.  I haven't actually measured it,
> but from using the resulting kernel the xscale optimized kernel feels
> much faster than the strongarm optimized kernel (on PXA255 in this
> case).
> 
> Building a cross compiler from the source deb is very easy on Debian
> sarge.
> 
> Here are the instructions I wrote for someone recently:
> ----
> Here are the instructions for setting up an arm cross compiler on Debian
> Sarge.  It assumes you are running sarge on your machine, and have
> deb-src as well as deb lines in your /etc/apt/sources.list pointing at
> sarge.
> 
> Download from http://zigzag.lvk.cs.msu.su/~nikita/debian/sid/
> binutils-arm-linux_2.15-5_i386.deb
> libc6-arm-cross_2.3.2.ds1-18_all.deb
> libc6-dev-arm-cross_2.3.2.ds1-18_all.deb
> libdb1-compat-arm-cross_2.1.3-7_all.deb
> linux-kernel-headers-arm-cross_2.5.999-test7-bk-17_all.deb
> 
> Those can probably also be made using dpkg-cross if you don't want to
> use those.
> 
> Install all of those using dpkg -i
> 
> Then build the compiler:
> mkdir gcc-arm-cross
> cd gcc-arm-cross
> apt-get source gcc-3.3 (or apt-get source gcc-3.3=1:3.3.4-17)
> cd gcc-3.3-3.3.4
> export GCC_TARGET=arm
> debian/rules control
> dpkg-buildpackage -us -uc -b
> 
> Install the resulting packages using dpkg -i that you need (most likely
> gcc packages, cpp packages and perhaps g++/c++ packages if any C++ code
> is involved).
> ----

For another tutorial for the toolchains and download location, see :

http://www.emdebian.org/tools/crossdev.html

Regards,

Philippe

| Philippe De Swert -GNU/linux - uClinux freak-     
|     
| Stag developer http://stag.mind.be/ 
| Emdebian developer: http://www.emdebian.org 
|  
| Please do not send me documents in a closed format. (*.doc,*.xls,*.ppt)   
| Use the open alternatives. (*.pdf,*.ps,*.html,*.txt)   
| Why? http://pallieter.is-a-geek.org:7832/~johan/word/english/ 

--------------------------------------------------------------------------
Gestuurd via het webmailsysteem van het De Nayer Instituut: www.denayer.be



Reply to: