Installing SunPCI 1.3 software on Solaris 10: x86 PC single board computer in a SPARC machine

The SunPCI single board computer is an interesting piece of hardware. This was a self-contained x86 PC on a single card that could be installed in Sun Ultra machines, that along with supporting software allowed you to install any operating system that required x86 hardware and run it on your Sun SPARC machine alongside whatever you were natively running on SPARC, such as Solaris.

Rather than x86 emulation, this approach provided a real x86 CPU and everything you’d expect in a typical PC compatible machine, all on a single card.

I recently picked up a Sun Ultra 60 and was lucky that it came with a SunPCI card. After I did a fresh Solaris 10 install, I needed to find the SunPCI software and drivers which didn’t come with Solaris 10. I Googled for a while and found a link to an FTP site that had the SunPCI software… trouble is this was a couple of months ago, and I’ve since gone back to try and find the same site to include a link but I think the site has recently gone down…

The official product manuals are still available and can be downloaded from Oracle here:

https://docs.oracle.com/cd/F24621_01/index.html

Getting started with the install steps, I cd’d into the folder after I’d untar’d it, and then ran pkgadd -d to start the install:

After the install completed I got this error that the SunPCI driver was not installed:

cd into /opt/SUNWspci and run ./sunpci – this tells you to run sunpcload to load the drivers:

This error about not finding the .2100 driver files is mentioned in a few posts, and most suggest (like here) to just symlink the missing filename to the same corresponding named .280 files like this:

Now it starts up and prompts to create a new C: disk image:

Create a disk large enough for whatever you’re going to install:

Booting up the card, you can see the hardware specs from the BIOS screens as it boots up – this is a v1 (I think) SunPCI board with and AMD K6 at 300MHz:

The mounted cd-rom drive appears in the SunPCI machine as drive R:, so cd’ing into the root of the Windows 95 cd install cdrom here, and run setup.exe to start the install:

Windows 95 starts running!

After Windows 95 install, install the SunPCI drivers for Windows 95, these are to support the onboard video, etc on the SunPCI card :

At this point I have Windows 95 running on my SunPCI card! Apparently you can either run with a monitor connected directly to the VGA output on the board, or run within Solaris in a window sharing the same display. I haven’t tried the dedicated monitor option yet, I’ll look into this next!

Why does the C programming language (and other C-like languages) have pre and post operators?

This is an interesting question that has a common answer that turns out to be a myth/historically incorrect.

TLDR; the definitive answer to this question comes from Dennis Ritchie himself, developer of the C language in his article “The Development of the C Language” – http://www.bell-labs.com/usr/dmr/www/chist.html 

“Thompson went a step further by inventing the ++ and — operators, which increment or decrement; their prefix or postfix position determines whether the alteration occurs before or after noting the value of the operand. They were not in the earliest versions of B, but appeared along the way. People often guess that they were created to use the auto-increment and auto-decrement address modes provided by the DEC PDP-11 on which C and Unix first became popular. This is historically impossible, since there was no PDP-11 when B was developed. The PDP-7, however, did have a few `auto-increment’ memory cells, with the property that an indirect memory reference through them incremented the cell. This feature probably suggested such operators to Thompson; the generalization to make them both prefix and postfix was his own. Indeed, the auto-increment cells were not used directly in implementation of the operators, and a stronger motivation for the innovation was probably his observation that the translation of ++x was smaller than that of x=x+1.

From http://www.bell-labs.com/usr/dmr/www/chist.html

The common answer which turns out to be incorrect is (paraphrasing) “C has pre and post operators because C was developed on the PDP-11 and this machine had pre and post CPU instructions, the implementation of ++ and — in C used these machine instructions”.

The explanation from Ritchie that corrects this misconception:

“People often guess that they were created to use the auto-increment and auto-decrement address modes provided by the DEC PDP-11 on which C and Unix first became popular. This is historically impossible, since there was no PDP-11 when B was developed”

From: http://www.bell-labs.com/usr/dmr/www/chist.html

An interesting piece of computing history.

awk basics

I’ve tinkered with awk and sed for quick one off tasks before in the past but I always have to go back and check the syntax for awk as it’s one of those things I use only once in a while.

Some quick notes for reference for later:

  • awk splits records in an input file by default by white space chars
  • uses $0 to refer to a whole line, and $1 … $n to refer to each matching token on a line
  • to split using column delimiters other than whitespace use -F

Examples:

Example file – example1.txt:

aaa bbb ccc
ddd eee fff

$ awk {'print $1'} example1.txt

Will print the first matching column:

aaa
ddd

If file has other column delimiters use -F to specify the delimiter, for example, example2.txt:

aaa,bbb,ccc
ddd,eee,fff

$ awk -F , {'print $2'} example2.txt

Will match column 2:

bbb
eee

More info on awk here.