Subject: Re: Advice on adding support for a new Platform
To: Thomas J. Merritt <firstname.lastname@example.org>
From: Ben Harris <email@example.com>
Date: 06/07/2001 01:03:31
On Wed, 6 Jun 2001, Thomas J. Merritt wrote:
> I interested in porting NetBSD/ARM to a platform based upon the Cirrus Logic
> EP7312. The EP7312 has an ARM 720T core plus a bunch of peripherals and is
> similar to the EP7209. The board is running OpenFirmware. OpenFirmware is
> able to net load the kernel as an ELF image. I would appreciate any advice on
> how to attack the port.
Well, you'll need a build system. Some version of NetBSD is best.
You'll also need a compiler: Get a recent version of gnu/dist/toolchain,
and configure it for an arm-unknown-netbsdelf target. If that doesn't
work (I haven't actually tested it since the patches got committed), tell
Then you need to set up the files necessary for a new port in the kernel
source tree. This basically means another directory under sys/arch like
sys/arch/cats, sys/arch/dnard or sys/arch/netwinder. Given the
OpenFirmware, sys/arch/dnard might be the best place to start.
At the moment, the NetBSD/arm sources are in a state of some upheaval as
we try to get the right bits shared between all the ARM ports.
sys/arch/arm32 is slowly dying, and stuff moving to the port directories
or to sys/arch/arm. This is a tedious business, so I for one keep finding
more interesting things to do, but it's progressing.
As for how to start a new port, the way I did it was to copy all the parts
of an existing port that looked relevant, try to compile it, create header
files and macro definitions as necessary till that worked, then try
linking it, and creating stubs that call panic() until that worked. Then
I ran the kernel, and implemented the function that generated the first
panic, iterating until I had something that booted multi-user. Oh, and
there was lots of debugging along the way.
I suspect John Fremlin may be able to give some more concrete guidance,
since he's a little bit ahead of you (maybe a few months) porting to a
Ben Harris <firstname.lastname@example.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>