Subject: Re: NetBSD in Set top box (fwd)
To: None <jtriggs@cse.unsw.EDU.AU>
From: Edwin Foo <efoo@crl.dec.com>
List: tech-embed
Date: 05/10/2000 09:06:17
Hi James,

That sounds like a great project. Are you using the Intel reference design
to start with? I would highly suggest you do so - doing it from scratch may
have you run into a bunch of gotchas.

As for the software, I can answer some of your questions - I ported NetBSD
to a SA110-based platform as part of my Masters thesis in school, along with
the Kaffe JVM. I can tell you with certainty that NetBSD definitely works
well for this. The patches for Kaffe-arm32 are already part of the main
source tree, so it should work out of the box.

I believe Kaffe uses its own jthreads system under NetBSD - I didn't bother
trying to make NetBSD pthreads work, although since pthreads runs under
Linux too (and Kaffe uses pthreads under Linux), I imagine such a conversion
must be possible. However, I don't think you probably want to bother with
that either if it's a year-long project - the hardware alone will be a big
hurdle. Besides, if all the execution will be done in the JVM, the JVM will
likely do a better job of scheduling anyway -- and plus, the context switch
cost will be lower as the kernel won't have to care about your multiple Java
threads.

The kernel + ramdisk size is about 2 megs uncompressed - I was able to
compress it down to 1.2MB for my application. I used crunchgen to save space
in general on the ramdisk. Kaffe itself is about 400K uncompressed as a
static executable.

The big space hog is the Java class libraries - I'd strip them down as far
as humanly possible.

One thing you might like to know is that I eventually only changed 10-12
lines of code to port NetBSD to my arm32-based board. My colleagues at work
have had to contribute hundreds and hundreds of lines of diffs to get Linux
working on the exact same hardware.

And oh, there's some kind of bug in mdsetimage on arm32 -- or rather,
there's a VM bug in the kernel. Basically, I don't think you can mmap files
properly or something to that effect. So I had to hack mdsetimage to write
the ramdisk into the kernel the old-fashioned way.

-Edwin

> ---------- Forwarded message ----------
> Date: Wed, 10 May 2000 16:56:59 +1000 (EST)
> From: James Adrian Triggs <jtriggs@cse.unsw.EDU.AU>
> To: tech-embed@netbsd.org
> Subject: NetBSD in Set top box
>
> Hi,
>
> As a final year university project, I am designing a set top box which
> uses the StrongARM SA1100. All software will be Java based, and I am
> writing the Java virtual machine (JVM). I am curious as to whether NetBSD
> would be a suitable OS in such an application. Since all execution is done
> through the JVM, only a lightweight OS is required. Does anybody have
> any opinions on the suitability of NetBSD, or be able to provide
> pointers to useful information such as kernel sizes, or NetBSD threads?
>
> Thanks
>
> James Triggs
> jtriggs@cse.unsw.edu.au
>
>