Emulating a Sun.

A week ago, after completing the installation of a Raspberry Pi into an old Sun CDROM drive external enclosure, I posted a picture of the enclosure on Facebook. The response from an old friend was, “Can you run SunView on it?”


Of course, a Raspberry Pi is no Sun Workstation so, the answer was, not directly. However, I immediately did a Google search for Sun emulators and was very surprised to find that someone had actually written one. And so my project for the next week was born.

After downloading the source to TME (The Machine Emulator) and installing all the development libraries I tried to build the blighter. Unfortuately this was not as simple as you may have thought as the configure script had a bug which only showed itself if not on a x86 machine. This and the build system’s requirement for an ancient version of the libltdl module loading library for libtool took me nearly three days to work through. Still, I did now have a binary to play with.

It was then time to try it out. Somewhat sillily I followed some instructions I found on the Internet. These instructions included how to create a disk image file and then how to configure it from within the “tape” booted kernel’s format command. Following these instructions caused the emulator to Bus Error and crash when it tried to write to the virtual disk for the first time. I wasted a day trying to debug this… but it turned out that the instructions were wrong!

Having gone back to basics and used the size and parameters from a Seagate ST1480N disk, used in the SPARCstation 2, I was able to format, partition and install the miniroot. I thought this was the end of my problems… until I tried to install the OS.

The “suninstall” program just refused to be able to seek to the correct tape file for the installation files even though mt(1) worked perfectly. Puzzling. Another number of hours trying to find why this wasn’t working and I find that the VM config file needed parameters removing from the tape drive definition as the default only worked with NetBSD as the OS and not SunOS. :-/

Everything seemed good. After a couple of hours I had a working VM on the Pi and it didn’t even seem that slow. So, I logged in and started SunView. Woohoo! Task complete, almost. The mouse emulation didn’t work properly. I thought that maybe it was due to the VM running too slowly to read the input correctly. Still, I could a least post “task complete” as I did have SunView running, which is what Richard had asked.


It now took me another day or so of debugging to determine that the Mouse Systems mouse emulation was broken when encoding the movement delta values. The original code seems to require the compiler to pretend that hex values are signed integers when assigning to unsigned 8 bit integers. Well, dodgy!

Having fixed that bug all now works, if rather slowly.

Given the interest on Google+ and Twitter about this emulation I’ve spent today creating an automatic download, configure and build script with an easy to use prototype VM creation system for an emulated Sun3 running SunOS 4.1.1, which you can download here.

On the Origin of Technological Civilisation.

This morning a friend posted an image of a supernova on Facebook and wondered just home many civilisations died as a result. Now, if you take the standard Drake equation and use that as a basis of your estimation of technological life and hence civilisation then you may get the idea that at least one did, given the massive gamma ray bust associated with such an event. However, I don’t believe this at all, and here’s why:

The parameters usually plugged into the Drake Equation assume that eventually that the development of technological lifeforms is almost inevitable once you get life going, as is even the equivalent of multi-cellular and complex lifeforms before this. Given my perspective as an Earth Scientist by training and hence knowledge about how the Earth, the only place we know life exists, I very much dispute these assumptions.

Life is common, complex life probably not so much

If we look at the Earth as an example of how life may develop on a planet we find from the evidence that simple, single celled life appeared pretty darned quickly after the end of the late bombardment where it would have been practically impossible for anything to survive. So, we can assume that this kind of life is probably likely to spring up almost anywhere in the Universe given similar starting conditions. So, life in the Universe is common.

However, after this great “leap” life got lazy. It didn’t really change a great deal for over 2.5 billion years. OK, it had to cope with the rise in oxygen and switch power sources but otherwise it didn’t do a great deal other than maybe become symbiotic and file its DNA away into a special container. Basically, there was no evolutionary massive advantage to change, so it didn’t.

From the fossil record it currently looks as though a global climatic event effectively pushed life to co-operate so as to survive in challenging environments. Without this push, life on Earth would probably still be single celled.

So, just about a billion years ago we got multi-cellular life… Woo-hoo! It took a while before this became complex though and it seems that only when some of these found eating other life to be a convenient method of energy collection did the arms race begin and complex life began.

It was all a big accident!

Climbing the ladder to technology? Maybe not.

So, from this slow start it only took about 500 million years to get to creatures which could potentially have enough brain power to be intelligent enough to wield tools. So, why didn’t we see technological dinosaurs?

Well, technological intelligence requires a couple of things, firstly the abstract, innate intelligence and flexible world modelling capabilities so as to visualise the tool and make the imaginative leap to think them up in the first place. Secondly, you need the twist of evolutionary fate which gives the organism the body parts required to fashion and use technology.

It’s becoming more and more apparent that many creatures from many strands of life are capable of the first part. Not only great apes or primates or even mammals but birds (i.e. dinosaurs) and even molluscs (Cephalopoda, i.e. octopus). However, most of these intelligent beings are handicapped so that technological advancement isn’t practical. They either don’t have the tools, don’t have the time, live in the wrong sort of environment or aren’t social.

Also, in many ways, the pre-requisites for being technological aren’t usually the best for long-term survival in an evolutionary sense. Generalists generally find it hard to compete against specialists, unless there are specific environmental drivers which cause the specialists to fail. Humans almost didn’t make it.

So, humans are an accident?

Basically, yes. We are an aberration. We only made it as a sheer fluke. Given the odds we shouldn’t be here at all and the planet Earth would be no different than it has been since the last great extinction.

So, what does this mean for the Drake Equation?

We have to remember that we’re looking down the wrong end of the telescope at this problem and hence get a very skewed idea. We are here to observe and hence is seems that that must be proof of the inevitability of us appearing. The original parameters of the Drake Equation reflect this and are, in my opinion given the evidence, several tens of orders of magnitude too optimistic.

Well, even given the hugely, mind bogglingly big numbers of potential life harbouring planets out there it’s very probable that only a really, really tiny percentage managed to get beyond single cellular organisms. Even then the combination of factors which would allow a society to develop technology and become a civilisation are so remote and actively discouraged.

Is there anyone else out there then?

Probably not. Sorry.

Given the odds it’s quite possible that we are the very first technological beings to exist within the Universe, given that the Sol system was possibly one of the first to appear after enough building blocks had been created by the previous generations of stars.  Even if we are not, given the number of star systems out there, the time scales involved and the probable life of any species being only a couple of millions of years at best we’ve probably missed the previous ones and others will appear after we’re long gone.

We are but a fleeting island in entropy’s march.