Subject: Re: Advice on adding support for a new Platform
To: Ben Harris <firstname.lastname@example.org>
From: Thomas J. Merritt <email@example.com>
Date: 06/06/2001 17:35:36
|<><><><><> Original message from Ben Harris <><><><><>
|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 o
|> 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.
Ok, that's helpful.
|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.
How worried should I be about breakage under NetBSD/arm? I do
a weekly cvs update of /netbsd. My last update was June 2nd.
|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
I think I'll start by seening if I can get the dnard port to build
a kernel. If I get that far, I'll start hacking out irrellevant stuff.