How to run NetBSD on a SPARCbook 3
Saturday, 3. December 2005, 20:40:59
Yes, they're outdated and old but when did that ever stop anyone? 
So, the first questions will probably be:
The answers for question one:
... question two ...
And question three:
What you need to run it:
First, install -current. The TADPOLE3GX kernel should just work.
Second, build a wscons kernel.
To do that add these things to the TADPOLE3GX config file in src/sys/arch/sparc/conf/:
Remove the old console stuff since it will collide with wscons:
And this has to go too:
Add the actual drivers:
Probably add or remove PCMCIA drivers.
Now build the kernel, put it into / but make sure you don't overwrite the old kernel in case something goes wrong. Before trying to boot it make sure that:
Boot the new kernel and cross fingers.
When things work you can set up X. First make sure /usr/X11R6/bin/X points to /usr/X11R6/bin/XFree86 ( it defaults to Xsun ), then run 'X -configure' as root, that will write an almost working config file into /root/XF86Config.new. Add 'DefaultDepth 8' to the "Screen" section and put the config file to /etc/X11/XF86Config. That's it.
So, the first questions will probably be:
- What hardware is supported?
- What am I going to lose compared to Solaris?
- What will I gain over Solaris?
The answers for question one:
- NetBSD/sparc runs on the SPARCbook 3GX, 3TX and probably 3GS.
- the graphics chip is supported, including acceleration, for both the console and XFree86. X is currently limited to 8 bit but that's going to change.
- audio is supported, currently output only but that's going to change
- PCMCIA works. You can use any PCMCIA device supported by NetBSD which is quite a lot more than what you could do with Solaris. I'm using a wlan card for instance.
- CPU power management. No more overheating.
- hardware sensors are exposed via envsys. Currently that's internal temperature, battery- and DC-in voltage.
- pressing the power button will initiate a shutdown
- the usual Sun-hardware, like esp SCSI, lance ethernet and so on is supported.
... question two ...
- Support for more than 8 bit in X. I'm working on that one though.
- SunISDN. I have documentation for the ISDN part but no ISDN line so someone else will have to write the driver.
- Audio input. Coming soon.
- Suspend to disk. NetBSD has no generic suspend-to-disk support like Solaris does.
- the external monitor port doesn't work yet
- external mice don't work yet. The microcontroller detects them but doesn't forward any data for some reason
And question three:
- You can only run old versions of Solaris, usually 2.6 and sometimes 7. They won't get security fixes forever. NetBSD will support the SPARCbooks as long as it supports SPARCs.
- NetBSD boots much faster
- Solaris supports only a handful PCMCIA devices, NetBSD is MUCH better here.
- NetBSD gives you more control over the hardware ( think envsys )
- Our console is better. We use the blitter for everything while Solaris uses the PROM to draw everything in software. We have virtual consoles.
- binary packages for NetBSD/sparc just work.
- no need to update all the broken or outdated system tools with superior free versions or to install many of those that don't come with Solaris ( think tar, gzip, bzip2, gcc and so on )
What you need to run it:
- NetBSD/sparc -current. Grab a build from releng.netbsd.org
- kernel source. Get it via CVS or from releng.
First, install -current. The TADPOLE3GX kernel should just work.
Second, build a wscons kernel.
To do that add these things to the TADPOLE3GX config file in src/sys/arch/sparc/conf/:
options WSEMUL_VT100 options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes options WSDISPLAY_CUSTOM_OUTPUT # wsconsctl(8) options WS_DEFAULT_FG=WSCOL_BLACK options WS_DEFAULT_BG=WSCOL_LIGHT_WHITE options WS_KERNEL_FG=WSCOL_GREEN options WS_KERNEL_BG=WSCOL_LIGHT_WHITE options WSDISPLAY_COMPAT_PCVT # emulate some ioctls options WSDISPLAY_COMPAT_SYSCONS # emulate some ioctls options WSDISPLAY_DEFAULTSCREENS=1 options SPARCBOOK_CMD # enable screen switching with lAlt-Fn options FONT_BOLD8x16 # a somewhat smaller font
Remove the old console stuff since it will collide with wscons:
## Use a faster console than the PROM's slow drawing routines. Not needed ## for headless (no framebuffer) machines. options RASTERCONSOLE # fast rasterop console #options FONT_GALLANT12x22 # the console font options FONT_BOLD8x16 # a somewhat smaller font options RASTERCONSOLE_FGCOL=WSCOL_BLACK options RASTERCONSOLE_BGCOL=WSCOL_WHITE
And this has to go too:
zs1 at obio0 # sun4m kbd0 at zs1 channel 0 # keyboard ms0 at zs1 channel 1 # mouse
Add the actual drivers:
zs1 at obio0 # sun4m zstty* at zs1 channel ? # mouse/keyboard kbd0 at zstty? ms0 at zstty? wskbd* at kbd? console ? wsmouse* at ms? wsdisplay* at pnozz? console ? pseudo-device wsmux # mouse and keyboard multiplexor pseudo-device wsfont
Probably add or remove PCMCIA drivers.
Now build the kernel, put it into / but make sure you don't overwrite the old kernel in case something goes wrong. Before trying to boot it make sure that:
- /dev/ttyE0...n and /dev/ttyEcfg exist. /dev/MAKEDEV should create them.
- you have entries for ttyE1-4 to /etc/ttys, disable the entry for /dev/console. They should look like this:
ttyE0 "/usr/libexec/getty std.9600" xterm-color on secure ttyE1 "/usr/libexec/getty std.9600" xterm-color on secure ttyE2 "/usr/libexec/getty std.9600" xterm-color on secure ttyE3 "/usr/libexec/getty std.9600" xterm-color on secure
- you can login via network in case something goes wrong
- you have a line saying wscons=yes in your /etc/rc.conf
Boot the new kernel and cross fingers.
When things work you can set up X. First make sure /usr/X11R6/bin/X points to /usr/X11R6/bin/XFree86 ( it defaults to Xsun ), then run 'X -configure' as root, that will write an almost working config file into /root/XF86Config.new. Add 'DefaultDepth 8' to the "Screen" section and put the config file to /etc/X11/XF86Config. That's it.








makoto.fujiwara # 2. October 2006, 00:10
(still in sysinst state, not installed yet).
The one thing I had in trouble before running sysinst, the screen turned black just after 'tctrl0: main power available' line, and it turned out pushing lid-open detector
and release made things to continue.
Anyway, thank you for supporting such a machine. Really appreciate.( I was just looking around the price when this machine was for sale in the market as a new model...).
The dmesg ...is:
http://www.ki.nu/~makoto/diary/attach/2006/20060930-sparcbook3-dmesg
Macallan # 18. October 2006, 20:24
Do PCMCIA cards work? X won't work - there's no support for the P9000 in XFree86 4.x or xorg and my driver only supports the P9100. Hacking it ( both the XFree and the kernel driver ) to support the P9000 as well shouldn't be too hard since the blitter and drawing engine is essentially the same, only the registers are further apart and at different addresses.