Subject: Re: NetBSD on AVR32
To: None <netbsd-ports@netbsd.org>
From: Valeriy E. Ushakov <uwe@stderr.spb.ru>
List: netbsd-ports
Date: 06/25/2007 20:04:35
In gmane.os.netbsd.general Brian Rose <lists@brianrose.net> wrote:

> I just purchased an Atmel Network Gateway (about $70 from Digikey) and I 
> see that the penguin is running just fine on it. 

Oh, that's *quite* a nice price.  Do they still sell it? ;)


> I would like to port NetBSD to this platform. Since there is no
> port-avr32 list I will post my messages here.

tech-toolchain@ (for gcc, binutils, build issues etc) and tech-kern@
(for porting the kernel) are probably more suitable lists.


> I guess the basic plan of attack is to get the modified GCC running on a 
> NetBSD host. Then I would need to change the various bits of build.sh to 
> accomodate the AVR32 platform. Then build the kernel and begin debugging 
> the various drivers. An oversimplification for sure. But that is the plan.

I don't think that hosting their modified toolchain on netbsd should
be a problem, it's unlikely they touched much in the MI parts of gcc.

You need to build binutils and gcc for avr32 target and then you can
use it to build netbsd tree.  Build machinery has EXTERNAL_TOOLCHAIN
variable and if it's set build.sh will use toolchain installed there
instead of bootstrapping one from netbsd sources.  Grep for
EXTERNAL_TOOLCHAIN in src/share/mk for details.  There might be a few
rough edges about it (as bsd.README warns) but it used to work.

You will have to add avr32 to bsd.*.mk in src/share/mk and populate
sys/arch/avr32/include but a lot of this could be copied over from a
similar machine (arm, mips, superh) and tweaked slighly.

SY, Uwe
-- 
uwe@stderr.spb.ru                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen