Sunday, 2. April 2006, 20:13:30
NetBSD, sparc, SPARCbook, Sun
...
Yesterday I went insane or something and tried to run Opera 7.54 under NetBSD's COMPAT_SVR4 on my 3GX ( I used 7.54 because I had it around and was just too lazy to download something newer at that point ). As expected it barfed over a bad system call. Since this particular error didn't happen on sparc64 I had a look - turns out the 32bit emulation maps this particular call to an empty function returning 0 so I changed COMPAT_SVR4 accordingly and the error went away. And Opera just started. No garbled GUI like on sparc64, everything looked fine.
Poking around a bit more I found that DNS lookups don't work in opera. Poking around even more I found that DNS lookups don't work with any Solaris binary ( like, telnet <some_IP> works, but telnet some.host.name doesn't if it required a DNS lookup ).
I'm using libraries snatched from a machine running Solaris 9 and apparently Sun added a shedload of new sockio()s and the DNS resolver barfs if sockio(SIOCGLIFNUM) fails. Christos added it over night and now Opera works fine with 'Synchronous DNS' enabled.
The reason why I find this noteworthy is - by todays standards this machine is slow ( just a 110MHz MicroSPARC II ) and has not much RAM ( 64MB ). Opera is fast enough to be useful. It's certainly faster than the HTML renderer in KDE1 and running something gecko-based with only 64MB RAM is a joke. In fact only Dillo is faster but it doesn't support any CSS and of course lacks just about everything Opera supports.
Just for kicks ( and to get rid of the ad banner which is really annoying on a small 800x600 screen ) I installed Opera 8.52 - works just fine. Not a bit slower than 7.54, quite the opposite actually.
So big thumbs up to Opera Software for making the only modern browser that's usable on this kind of hardware.
Friday, 10. March 2006, 20:48:44
NetBSD, SPARCbook, tadpole, sparc
- I finally figured out why external mice didn't work - turns out the Tadpole microcontroller sets an additional bit in each frame header which caused our driver to discard these frames. Doh. Fixed that.
- report more events to powerd, like lid and AC power status
- power up the audio/ISDN chip only when we really use it
Monday, 27. February 2006, 19:08:33
NetBSD, sparc, SPARCbook, tadpole
I finally found out how to switch the SPARCbook's graphics chip to 16 and 24bit colour, also added hardware acceleration for line drawing and colour expansion ( for text drawing ). Performance is pretty good, certainly feels a lot faster than Solaris' Xsun - not that I ran any real benchmarks though.
One more item to scratch from the Things That Solaris Can Do But Not Us list
Saturday, 3. December 2005, 20:40:59
sparc, NetBSD, tadpole, SPARCbook
Yes, they're outdated and old but when did that ever stop anyone?

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:
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.