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

Re: ARCH=arm or CROSS_COMPILE=arm-linux- or both ?



On Wed, 2 May 2007, Shinose wrote:

> On 5/2/07, Ramagudi Naziir <naziirr@xxxxxxxxx> wrote:
> >
> > Hello,,
> >
> > I read in Karim Yaghmour's book that to cross compile the kernel and
> > other packages I need these two arguments.
> >
> > But when I see other kernel cross compiling guide they only say to
> > use the ARCH=arm.
> >
> > so.. do I need both of them ? or just the ARCH one ?
>
>
> You need to provide the ARCH and CROSS_COMPILE variables in order to compile
> for your desired cross platform. If you miss either of the argument then the
> Makefile defaults to what ever given inside it as defaults.
>
> For .e.g if your processor is ARM and you have the tool chain starting with
> arm-linux- like arm-linux-gcc, arm-linux-ld etc then you need to provide
> like
>
> $make zImage ARCH=arm CROSS_COMPILE=arm-linux-
>
> for arm-elf-gcc you need to give
>
> $make zImage ARCH=arm CROSS_COMPILE=arm-elf-

don't forget that, if you use just that prefix, your entire toolchain
better be found somewhere in your search PATH.  if it's not, then you
can always use:

$ make ARCH=arm CROSS_COMPILE=/home/fred/tools/...blah.../arm-elf- zImage

or whatever's appropriate.  it's just easier to have it in your search
path, though.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ