Subject: Re: How to port NetBSD to a new platform with OMAP 1610
To: None <>
From: Charles M. Hannum <>
List: port-arm
Date: 03/25/2004 18:39:02
On Thursday 25 March 2004 09:47 am, wrote:
> I am currently working on porting NetBSD to OMAP 1610.
> Not familiar with NetBSD before, I had paid a lot of time on surveying it.
> I found that NetBSD already supports ARM9 core (ARM920T), and OMAP 1610
> belongs to ARM926.

I've ported NetBSD to the DM310, which is similar.  (Unfortunately I can't=
release that code.)

> Many questions needed to be solved:
> 1.       What=E2=80=99s difference between ARM920T and ARM926? Does the k=
ernel of
> ARM920T run well on ARM926 without any modifying?

There is very little difference in the ARM core itself.  However, everythin=
*else* is different.  In particular, you will have to implement custom=20
interrupt routing for the OMAP processor.  (I think it's different on each=

> 2.       Dram and NOR Flash have been set up in U-BOOT. Need the kernel do
> it again in the beginning?

No; if you've already set up the clocking and initialized the RAM, you don'=
need to do it again -- though it doesn't hurt.

> 3.       =E2=80=9CKERNEL_BASE_PHYS=E2=80=9D is used to set up the load pl=
ace of the kernel,
> and what=E2=80=99s =E2=80=9CKERNEL_BASE_VIRT=E2=80=9D?

The kernel maps itself (and is therefore linked) at a different address tha=
the physical address it's loaded at.

> 4.       How to tell kernel the size of NOR Flash and DRAM?

Hard-wire it, or pass in the information from the boot program.  (The latte=
is my preference, as it typically allows running the same kernel on multipl=
revisions of a product a little more easily.  You typically have to update=
other parameteres in the boot program between revisions anyway.)  You can=20
look at any existing port's machdep.c to see how this is done on the kernel=
side -- basically, you need to pass the information to pmap_bootstrap() and=

> 5.       =E2=80=9Cevbarm/stand/gzboot=E2=80=9D is to make a compressed ke=
rnel. Why don=E2=80=99t we
> compress kernel by tool gzip and let U-BOOT do the decompression?

That's what I prefer to do.  gzboot is intended for places where you direct=
boot the kernel and have no "boot ROM" at all.