
PowerPC Solaris on the RS/6000 - bcantrill
https://virtuallyfun.com/wordpress/2020/05/28/powerpc-solaris-on-the-rs-6000/
======
bcantrill
So, this post (which I loved) brings back a lot of memories for me (having
joined Solaris Kernel Development in 1996, when ppc was still a thing -- if
barely).

If I may, a quick anecdote: back in MPK17 (now Facebook!) my office was next
to that of Mike Sullivan, who was one of the lead engineers on on297, our
internal name for Solaris 2.6. As part of his nature of running latest bits on
everything around him, Mike had in his office (among many other things) a
laptop. Over my years of working in Menlo Park, I can remember exactly one
theft: one night, that laptop of Mike's -- and the laptop alone -- was stolen.
The funny thing (and the reason this story made me think of it): it was a
ThinkPad 850, an IBM PReP laptop running an internal build of on297 (to my
knowledge the only one that ever existed) -- and I have often wished I could
be there when the thief tried to unload what was surely the world's most
arcane laptop, if not its most useless...

~~~
tal8d
ppc is still a thing, my project computer is a power9. The only reason it
isn't my daily driver is because I can't help but tinker with it. Being able
to rewrite the supervisor chip code in order to get that fan curve just so,
and having the support of unabridged and NDA free documentation - instead of
grinding through reverse engineering... feels good. I highly recommend it,
just stick to known working GPUs, the mmu actually does its job.

~~~
aryonoco
PPC is/was different from POWER. Technically related but they diverged enough
that it was a different ISA for all intents and purposes

~~~
hlandau
To be clear, you're talking about the original POWER ISA. The PowerPC ISA has
subsequently been renamed the Power ISA (not to be confused with the POWER
ISA). Confusingly, IBM's POWER CPUs (POWER3, POWER4, POWER5, POWER6, POWER7,
POWER8, POWER9) since POWER3 implement the Power ISA (then known as the
PowerPC ISA), not the POWER ISA. POWER2 was the last CPU to implement the
POWER ISA.

[https://en.wikipedia.org/wiki/IBM_POWER_instruction_set_arch...](https://en.wikipedia.org/wiki/IBM_POWER_instruction_set_architecture)

[https://en.wikipedia.org/wiki/Power_ISA](https://en.wikipedia.org/wiki/Power_ISA)

~~~
rbanffy
And now the ISA has been updated for the POWER10 CPUs that'll be announced
shortly.

------
azalemeth
Posts like this, projects like these, and people like Neozeed are part of why
I think the GNU project fundamentally is brilliant.

Getting GCC running on barely-produced prototype hardware system, on an
ancient version of Solaris which itself was a particular pain to install,
whilst entertaining and informing the reader about the history of the PowerPC
migration circa 1994, is no mean feat.

What were the desirable/sexy features of OpenFirmware anyway? I remember
typing occasional commands into it on old Macs (especially a Beige G3 running
Mac OS 9 and, later, with varying degrees of grumpiness, OS X), mostly with
the fear of god of bricking my system.

There was also that separate "crash" shell you could bring up once the machine
had booted with a magic key combination involving the power button, and
pressing something like 'R' would reboot it. I wish Apple was a bit more open
about these programming interfaces – a bit like Solaris.

~~~
kev009
The beauty of OpenFirmware is that it is extended with Forth, which is
extremely compact (so could fit on small PROMs in the computer and fcode for
addon cards). If you are designing a PCI card, you can write a bit of fcode
that will run on SPARC and PowerPC for instance to expose opaque RAID volumes
as bootable disks.

Keep in mind the PC BIOS was and is a complete tire fire, and uses something
like this
[https://en.wikipedia.org/wiki/Option_ROM](https://en.wikipedia.org/wiki/Option_ROM)
to approximate support for the above. UEFI is a bit of improvement but massive
and obtuse in comparison to OpenFirmware.

~~~
Someone
_“you can write a bit of fcode that will run on SPARC and PowerPC”_

and x86, and ARM, and CPUs not even invented yet. Performance wouldn’t be
optimal compared to native drivers, but decent enough to boot a workable
system.

------
neilv
If you get access to an IBM RS/6000, another thing to play around with on it
is the original AIX operating system.

Imagine a Unix that got an IBM working-over. When the RS/6000 workstations
first came out, AIX was a big contrast to the more seat-of-pants workstation
Unix of SunOS 4 (this was before Solaris 2).

Some of the AIX changes weren't only enterprise-y server management OS
abstractions, but fun: AIX included a nice GUI hypertext browser for its
documentation, in 1990 (possibly earlier).

~~~
kev009
I am always surprised by the negativity that surrounds AIX by layperson UNIX
users. AIX actually remains ultramodern when the full timeline is taken into
account of remaining UNIX-like OSes like Linux, Solaris, and the BSDs. There's
a reason it is one of the few remaining commercial UNIX, and that's because it
is good and runs on the best hardware for vertical scaling. Scaling on large
SMPs is not an easy task for OS/kernel devs, and something even Linux
struggles with to this day on any non-trivial NUMA system. Meanwhile IBM has
been offering extremely large NUMA SMP, gobs of I/O bandwidth, and tightly
integrated virtualization since the turn of the millennium.

AIX uses a database called the ODM for kernel and userspace configuration.
This can be thought of something like 'nvlist' in FreeBSD and Solaris
([https://github.com/fudosecurity/nvlist](https://github.com/fudosecurity/nvlist))
but it has a more extensive object type system that is used almost everywhere
in the system. This is in turn used to pass complex typed data between the
kernel, userspace commands (like say logical volume management), and even an
advanced daemon manager not unlike SMF or upstart or even systemd.

None of the above probably sounds particularly ground breaking in 2020 with
systemd-ified Linux, but keep in mind most of this was in place 30 years
earlier in the early 1990s with AIX 3.0. This was a time when, for instance,
hardware support in other UNIX and clones still might mean custom compiling a
kernel or at least invoking a linker to produce a new binary kernel.

Novice AIX users see smit and think "yuck I have to use a TUI to configure the
system" but it is easy to do everything from the shell or automation. smit is
just a rather gentle tool inspired by other IBM projects such as OS/400 and
ISPF for menu driven user interfaces. Keep in mind systems like SCO also
sported TUIs like this as it was a fad at the time to make UNIX seem more
familiar to PC and minicomputer users.

One thing that is super bizarre, the kernel is also fully pagable. I suppose
that made sense in the early '90s for diskless workstations where RAM might
also be limited but it seems like unnecessary extravagance and complexity
these days.

~~~
apaprocki
SAs have their own likes/dislikes. From an end-user dev point of view AIX is
pretty harsh. XCOFF binaries mean almost no tooling works with them. It’s 2020
and IBM finally came around to adopting LLVM/Clang to the platform. There’s
lots of strange deployment warts like no $ORIGIN support, everything is
shared/PIC but you have none of the ELF naming support, shared libraries stay
in a system-wide library cache even after the processes exit (i.e. updating
the file on disk and starting a new process will not guarantee it is used),
and the list goes on and on. It takes a huge amount of effort to keep all the
usual open-source packages running there.

You have to do the open-source work, though, because the vendor side is as
close to abandonware as you can come. The OS is basically not touched unless
they have to. For example, they gave up trying to actually fix their system
headers to have C++ include guards, so they just hacked the compiler to extern
C _all_ system headers —- a terrible hack that GCC actually adopted as well to
stay compatible. There’s no versioning of user-space library additions or
changes, so you can’t easily make code forwards/backwards compat in the
preprocessor. They gave up trying to follow modern C++ and pulled in a Clang
front-end. User binaries remained broken for years until anyone complained
about them. There are people there doing the bare minimum to add support for
some new POSIX interface that comes out, but the headers are not “clean” in
the same way that the Solaris ones are. Solaris headers and man pages are some
of the best I’ve ever seen. They could constantly improve the system, but they
don’t. They do what customers ask for and no more.

It might be great at taking some Fortran simulation and cranking the nodes up,
but it’s not great at coming anywhere close to competing with Linux for
general computing use.

~~~
NCommander
AIX at least has LLVM, and IBM had unofficial GCC ports for years.

If you want a dumpster fire for development work, I'd highly recommend HP-UX.
HP-UX's stdio wasn't very std back in 1990s. What I remember is a bunch of
syscalls seemingly existing but not actually working despite being OK with the
same code on Solaris and Linux.

Somewhere around 2003-4, it appears all development basically consists of
security patches and new Itanium hardware enablement, and aCC barely supported
anything C++ related; its more like trying to use Borland C++, and GCC was
really iffy, although it had the advantage that post PA-RISC, HP did adopt
ELF.

~~~
apaprocki
Yeah, I've used HP-UX as well. All the fun of an OS and compiler no one uses,
with the added bonus of all the quirks of a CPU that _really_ no one uses. I
wonder if the soldiers 1000s of libraries deep in the Oracle link line read HN
and have some fun IA-64 porting tales.

------
zyztem
Years later there was another port of OpenSolaris to IBM Power computers
called "Polaris":
[https://www.theregister.co.uk/2006/01/10/solaris_on_power/](https://www.theregister.co.uk/2006/01/10/solaris_on_power/)

And even port to IBM z/VM ("Sirius"):
[https://www.theregister.co.uk/2008/10/17/solaris_on_mainfram...](https://www.theregister.co.uk/2008/10/17/solaris_on_mainframe/)

~~~
skissane
> And even port to IBM z/VM ("Sirius"):

Unfortunately that died, because Oracle stopped being willing to cooperate
with the port [1]. Of course, I understand why they might not see it as being
in their commercial interests to support porting their OS to a competitor's
hardware; but, I think their turn away from openness with Solaris accelerated
its decline rather than delaying it.

[1]
[https://www.theregister.co.uk/2010/03/29/oracle_solaris_z_ib...](https://www.theregister.co.uk/2010/03/29/oracle_solaris_z_ibm_mainframe/)

(Disclaimer: ex-Oracle employee, but I was never working on Solaris directly,
just on higher-level middleware stuff which sometimes ran on Solaris, and I
really don't know anything about this topic beyond what has been reported in
the media.)

------
jerzyt
In the late 90's, I had Solaris running on my Toshiba laptop. I loved it. It
was a great OS and development platform. At some point it became too difficult
to keep up with software upgrades, otherwise, I'd still be using it.

------
jdofaz
This article brought back a memory of a fellow high school student who had
somehow obtained a windows NT PowerPC CD that we tried and failed to boot from
in a PowerMac 6100.

~~~
opless
hahahaha. I did this on an IBM prep machine, a really straightforward install
of NT 3.51.

It even managed to run some x86 windows stuff - incredibly slowly (this was
~2005)

And it ran the windows 2000 shell preview as well! - though I may have
installed NT 4 by then.

It ended up running Debian and being a mono test bench until it was retired to
being an MP3 player for the home office.

Alas it was accidentally recycled along with a host of other stuff I was
avoiding to deal with. Still it was fun to play with at the time!

~~~
opless
it was probably a model 850

------
hestefisk
I would love love love one of these machines to run Windows NT and some
flavour or ancient Unix. I’m in Australia and desperately looking for an old
PowerPC. Does anyone know where to dig these machines up? Yes I tried eBay but
it is prohibitively expensive to post from overseas to Sydney.

~~~
bigger_cheese
Ex-government auctions have stuff occasionally. When I used to live in
Canberra every two month or so one would be advertised could get lots of old
hardware for dirt cheap. Mostly old Sun Sparc stuff but sometimes HP or IBM
power based hardware too. I imagine Sydney would have similar auctions.

~~~
hestefisk
Can I ask on what web site you have found there auctions?

------
korethr
And here I was, thinking I was a damned fool for wanting to port Illumos to
run on Power 9. Well, okay, I probably am still a damned fool for wanting
such, but knowing that the Solaris codebase has run on Power before gives me
hope that it might actually be possible.

~~~
spijdar
There were ultimately two ports of Solaris to PowerPC, this early one and a
third party port of OpenSolaris/Solaris 10 to PowerPC. The latter, called
Project Polaris, can be found in source form online
[https://github.com/andreiw/polaris](https://github.com/andreiw/polaris)

Getting this running on ppc64(le) would be no small undertaking, but hey.

------
johnklos
It'd be worthwhile to give pkgsrc a try.

------
ngcc_hk
That is a real surprise !!! Life full of these.

