Subject: Re: And just how big can it be? (Sun3/50 kernels..)
To: None <oster@cs.usask.ca>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 11/24/1997 11:39:35
> From: Greg Oster <oster@cs.usask.ca>
> Date: Sun, 23 Nov 97 13:09:49 -0600
> 
> Hi folks.
> 
> Having a bit of spare time this weekend I figured I'd upgrade my Sun3/50 
> from NetBSD-1.2G to 1.3_ALPHA.  So I pulled down the 19971121 sources
> and compiled up a kernel.  On reboot, I got:
> 
>   ...
>   Starting program at 0x4000
>   kernel too large for Sun3/50
>   ...

Hey!  The sanity check worked!  (I never tried it :)

> [ tried building smaller kernels...]  I pulled down the
> 19971121-snapshot "netbsd-gen" kernel in the hope that it might
> work, but it's about a MB in size, and also gives the same error
> (with some cool "screen garble" on 1/2 of the screen)... Sigh....

That one did not have the size check, so you get "screen garble".
(Worse, the kernel uses RAM that the PROM is scribbling in! :)

> I suspect it's something in sun3/pmap.c that needs to be tweaked,
> but I don't have the foggiest clue what that might be...  (but that
> won't stop me from having a look anyway :-)

The Sun3/50 needs: (text+data+bss+symbols) < 1032192
That lets the initialized data end below the "hole" in RAM
where the video frame buffer lives.

Your best bet is to write a stripped-down config file.
Try leaving out:  ie, xd, xy, union, etc.

Booting a stripped kernel also helps, as long as you don't
need symbols or DDB.  (If you do that, leave out DDB.)

Note that you can load LKMs for stuff like the UNION fs,
because only the initial kernel image is subject to the
size constraint.

> The machine in question has 8MB of RAM, in case that matters.  I'd
> be happy to provide additional information or testing, if needed.

I'll try writing a "SUN3_50" config file and send it to you
privately.  If you can test it out, I'll add it to 1.3.