Subject: Re: Newbie looking to figure out how to do a port!
To: Ben Harris <bjh21@netbsd.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-ports
Date: 02/17/2006 10:27:48
Ben Harris <bjh21@netbsd.org> writes:

> It's a long time since I played with this kind of thing when first getting
> NetBSD/arm26 (as it was then) to go, but I remember some of the techniques I
> used.  I wrote a little piece of assembler that would do something obvious
> if it got executed.  One of these filled screen memory with a particular
> colour, for instance.  In your case, an infinite loop might be a good start,
> since you can tell the difference between that and a reboot.  Then I
> inserted this code at various points in the system startup to check that
> everything was working.  The first place to try is right at the start of the
> kernel, to make sure the bootloader's setting things going at the right
> point.  Then, you can move the tell-tale code around and home in on the
> point where it stops getting called.

This is a handy technique I've used as well. Again, if you've got a
couple of LEDs on the board you can poke before you start an infinite
loop, so much the better.

Now, if someone were paying you to do this, it would probably be
worthwhile to invest in a JTAG tool to poke around at the early-stage
booting (a RISCwatch for this board, I think), but probably not for a
hobbyist.

        - Nathan