Subject: Re: Building for both ARM V4 and ARM V5 systems
To: Bucky Katz <bucky@picovex.com>
From: Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk>
List: port-arm
Date: 08/07/2006 22:18:38
On Mon, 07 Aug 2006 13:42:46 PDT, Bucky Katz wrote:
> Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk> writes:
> 

> > Just use build.sh's -V option to set MAKECONF.  Here's the line from my 
> > meta build script:
> >
> > nice ./build.sh -B rwe-`date +%Y%m%d` -D $build/install -O $build/src -R 
> > $build/
> > dist -T $build/tools -U -m $1 -X $xsrc -V MAKECONF=${conf} -x -u release > 
> > $buil
> > d/build.log 2>&1
> >
> > obviously you'll have to fill in the various variables, but I can assure 
> > you that it does work.  My mk.conf contains
> >
> > CPUFLAGS=-mtune=xscale  -march=armv5te
> > AFLAGS=-mtune=xscale -march=armv5te
> >
> > for one xscale board I build for, and
> >
> > CPUFLAGS=-mcpu=strongarm
> > AFLAGS=-mcpu=strongarm
> >
> > for a strongarm board.
> 
> That's what I'm doing, but it doesn't work if the userland is v4t, the
> kernel is v5t and you try to make relase with build.sh.
> 
> As far as I've found there's no combination of arch, cpu, and tune
> flags that won't cause gcc to get heart burn. What am I missing?
> 

Ah! I haven't tried the situation where userland has one setting and the 
kernel has another.

Try wrapping your mk.conf definitions with

.if !defined(KERNEL_BUILD)
...
.endif

KERNEL_BUILD is defined on the first line of the kernel makefile; I don't 
think it's ever defined elsewhere.

R.