Subject: Re: Cross-compiling for arm26 - what do I need?
To: Gavan Fantom <gavan@coolfactor.org>
From: Ian Fry <Ian.Fry@sophos.com>
List: port-arm26
Date: 11/26/2001 17:21:17
On Mon, Nov 26, 2001 at 05:08:56PM +0000, Gavan Fantom wrote:
> On Mon, 26 Nov 2001, Ian Fry wrote:
> > Once you have this, read BUILDING in the top level -current source
> > directory, and you can use build.sh to do the actual compile (if you
> > know what you're doing, you can do everything by hand, but using
> > build.sh simplifies things a lot).
> So would I be right in thinking that:
> 
> /usr/src/build.sh -d -m arm26 -D /export0
> 
> will build NetBSD/arm26 and install it in /export0?

Yes, I think so. I don't usually use -d, though. I tend to use the -t flag to
build the cross tools, and then use /usr/local/tools/bin/nbmake-arm26 build
from the top level source directory (/usr/local/tools is my TOOLDIR setting,
you can set this with build.sh using the -T flag, IIRC).

> (Do I need -O /usr/obj or something as well, or will it use obj dirs in a
> default location?)

It uses obj dirs by default, but I'm not sure what the default location is. I
tend to set this in /etc/mk.conf.

> Is there a separate step to build a kernel?

Not really. I use the following:

1. Build cross tools into TOOLDIR using build.sh -m arm26 -t
2. $TOOLDIR/bin/nbconfig <kernel>
3. Change to kernel build directory
4. $TOOLDIR/bin/nbmake-arm26 depends netbsd

> > Take a look at http://www.netbsd.org/Documentation/network/netboot/ and
> > diskless(8) (you can get at the man pages from the web if you don't have a
> > NetBSD machine)
> OK. Does the arm26 bootloader use bootparamd and tftp, or does it already
> manage to load a kernel and thus only need NFS to be set up?

Neither at the moment. Boot26 loads a kernel from disk, and boots that. You
can configure the kernel to use bootparams/bootp/dhcp in the kernel config.
You might be able to use Ben's aund to get RISC OS to netboot and load the
kernel from your server (aund is available either from the NetBSD CVS
othersrc collection, or ftp://ftp.netbsd.org/pub/NetBSD/arch/arm26/). I
haven't used this, though.

Ian.