Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
PowerPC Solaris on the RS/6000 (virtuallyfun.com)
93 points by bcantrill on May 28, 2020 | hide | past | favorite | 58 comments


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


I worked at Sun for a while and one thing I recall was how we could grab any abandoned hardware laying around and take it for whatever you wanted.

I recall wheeling an archaic 4ft tall tower format disk enclosure I found in a server room corner to my desk and connecting it to either the x86 dual CPU desktop I used (which had since lost all its side panels before I inherited it) or an ultra 30 I had there, I forget which.

I then set up the internal s10 build with ZFS and playing around with it. That's when I first become confident in the benefits of Solaris over anything else out there at the time. Used Solaris 10 as my main desktop for nearly 4 years

We even had intel itanium desktops for testing. Always referred to as the "itanics".


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.


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


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/Power_ISA


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


PPC in 1996 was not "barely a thing". IBM could win over Apple, and later Sony for the "Cell" CPU on PS/3, and Motorola sold to automobile and other embedded apps in quantities. It's just that sometime around 2005-2010 or so the investment into new competitive fabs became so astronomically high that it just wasn't good business anymore for CPUs produced in quantities below x86 and ARM.


To clarify: I meant "ppc" as a subdirectory under usr/src/uts -- that is, the PowerPC port in Solaris -- not PowerPC itself...


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.


There was a trick I saw once, where you could use the editing commands in openboot, plus the fact that it could read UFS volumes, to find the offset of the root entry in the on-disk shadow file and zero or change it if you'd lost the password.

When I was in school, the astronomy dept. used a remote telescope in Wyoming. I guess there was dial-up to send commands to open the dome if the weather looked nice, to send coordinates to aim the scope, and to set exposure times for the CCD. The connectivity wasn't enough to download lots of data, so there was a data collection box; a 16mhz Sun IPC workstation in the "lunchbox" form factor, roughly 10"x10"x5". Someone had written a program in OpenFirmware Forth to read data off of whatever storage was on the scope via the IPC's serial port, and write it to the internal SCSI drive. After every observing run, a collaborator would put the IPC in a backpack and jog it up the mountain, so it could be plugged into a scope & terminal, and run the collector code to pull the data. A friend's first real job was maintaining that forth code; he still has nightmares about it.

Having system firmware that is that flexible is pretty nice, but really hard to write marketing copy for.


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 to approximate support for the above. UEFI is a bit of improvement but massive and obtuse in comparison to OpenFirmware.


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


> What were the desirable/sexy features of OpenFirmware anyway?

When I was admining Solaris boxes, it had useful boot-from-net options, both RARP and later DHCP-based JumpStart: this was many years before PXE. When I started using Mac OS X, during the pre-Intel days, all the various Mac hardware used OpenFirmware as well so that knowledge transferred over. OF was also used on IBM's POWER systems, and the OLPC "XO" computer used it with x86 chips.

If ARM ever wanted a common 'BIOS' system for their ecosystem, the OF could be a good choice (there are BSD-licensed options):

* https://www.openfirmware.info/Open_Firmware

UEFI is the other main pre-OS system out there.

More generally OpenFirmware allowed for platform-independent device drivers:

* https://www.netbsd.org/support/hardware/ofw.html


The most desirable feature would have been the possibility to have one very compact and flexible firmware for any expansion card for any host system on any bus system. As it were, the market decided to have it the other way around. I.e. an absolutely common graphics card with an ATI chip for some workstation, or Power Macintosh was a 'speciality'. IIRC Acer or some other vendor beginning with A produced ONE VGA-card for PCs about 20+ years ago. Of course it was a flop, because no real benefit, when plugged into a x86 with BIOS, with no knowledge of that. At least it worked via some shim. Now we have EFI/UEFI/SSBA with all the PC-inspired crap, or U-Boot and similarly insular stuff instead.

(shrug)

edit: https://en.wikipedia.org/wiki/Open_Firmware


> Now we have EFI/UEFI/SSBA with all the PC-inspired crap

I know what EFI and UEFI are, but I've never heard of SSBA before, and I can't find anything about it on Google. What is SSBA?


Sorry, typo. SBSA

It's basically UEFI for 64bit ARM:

https://en.wikipedia.org/wiki/Server_Base_System_Architectur...


I wish it were my hammering of GCC/GNU stuff in this post, all the credit is to 'PA-RISC' (https://www.youtube.com/channel/UCYyCai0PQQ0O6yA_yQzBY-g). I'd just started one of those discord things, and suddenly I'm being hit up with guest submissions, and pretty freaking AWESOME ones at that.

It makes my current GCC thing look laughable at best, but yeah the future is awesome!


It’s a huge strength of the ecosystem, and something that many new projects seem to ignore (which I can’t really blame, but still, it’s sad). There are so many platforms almost forgotten to history that happen to have a GCC toolchain for them; perhaps a few dozen UNIX tools, but that itself opens up a whole world.


On most current Linux systems you can get an OpenFirmware shell (or SLOF, a free reimplementation) by doing:

  $ qemu-system-ppc64 -m 1024 -serial stdio
  [.. lots of boot messages ..]
  E3407: Load failed

  Type 'boot' and press return to continue booting the system.
  Type 'reset-all' and press return to reboot the system.

  Ready! 
  0 >


Conceptually I think the nice thing about OpenFirmware was that it was basically a Forth shell and had a bit more utility in bringing up systems and testing bare metal systems.

But my interaction with it was mostly like yours.


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


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


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.


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.


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.


As someone with lots of experience porting stuff to AIX, this is fairly accurate. AIX takes a malicious compliance stance to POSIX.

The worst part is that the AIX compatibility layer IBM created for i is closer to Unix normalcy than AIX itself.


Sounds a lot like macOS.


Thanks for the interesting comment here. A friend of mines' favorite OS is AIX, as he operated such machines at a university he did systems administration. It sounds like a great system. However;

As a retro computing and alternative architectures enthusiast I am visciously annoyed by how IBM treats enthusiasts. How in the world am I supposed test out, learn and be inspired towards such a closed ecosystem. I even owned an IBM RS/6000, but IBM wouldn't sell me the screen. Anyhow, even with financial means I cannot enter the world of IBM, as they hold OS closely guarded. Can I try AIX on emulator? No. Can I try it on hardware I own, yes/no. Can I learn Mainframe stuff? No. sigh Have I let my disdain for IBM's behavior frame my buying in various mega corps I advise? Yes.


Yet I managed to trash ODM on our RS/6000 cluster in 1992 or so, so that the metadata AIX had was inconsistent with the quorum of binary metadata stored on special partition tables on disks. Had to low-level format the disks and start over (the 857MB SCSI disks about as expensive as a compact car).

What's perhaps unknown to many is that the Linux volume manager was/is a straight clone of AIX's, with IBM terminology like logical volumes, physical volumes, and so on (the terminology itself being an extension of IBM's naming scheme on z/OS aka MVS, eg "logical/physical partition" for VMs with reserved channel bandwidth etc). Whereas FreeBSD's vinum was a clone of Veritas (in vinum veritas).


Does FreeBSD still not include support for ablatives of second-declension neuter nouns? You surely want "vīnō" there.


:) ah, spotted the Latin teacher! yeah no it was entirely my fault to mis-/non-decline vinum; though "in vinum" (in + accusative) actually has a valid use as well and not just in medieval Latin, like in "put the truth into the wine" which actually is as good a word-play for vinum the volume manager as "in vino veritas"


> I am always surprised by the negativity that surrounds AIX by layperson UNIX users

I've never been particularly negative about AIX at all, but I've been burned before by some of its ugly warts [1]. In particular, the fact that (unlike other platforms) errno isn't thread-local by default, and you have to -D_THREAD_SAFE_ERRNO to get a thread-safe errno.

[1] https://github.com/java-native-access/jna/issues/237


I had the distinct misfortune to port an HPC & ethernet driver stack to AIX in the early 2000s. It was kinda BSD (mbufs), and kinda not (everything else), and just generally weird.

Having a test machine that took ~20 minutest to panic and reboot made the process extra fun.

It was one of the more annoying systems to develop drivers for that I've ever used. And I've done drivers for various BSDs, Linux, MacOS, ESX, Solaris, and even Tru64.


I would have used VIOS for that situation and passed the PCI device through to the LPAR for most the work. It would be about 5 minutes if you had reasonable disks and you could just barrel fish several cards and LPARs for intense debugging sessions.


Yeah...the first rule of AIX Club is AIX isn't (wasn't) old-school Unix. You actually had to learn AIX.

Back when I was in that game, we had an AIX guru spend a week or two teaching our kernel devs how things actually worked and at the end everyone was "even if I don't agree with how you did things, I understand how to make things work". We saw lot of folks try and shoehorn their view of Unix into AIX and it never ended well.


My first five minutes on an AIX machine involved trying to find a logfile to read...this is how I discovered 'errpt'; and the (new to me) IBM habit of giving certain cli output in all-caps. "Why is this machine shouting at me?"

I did end up liking it a lot, and I wish I had more of them. Once you set aside your expectations about what a unix should act like, it was kinda fun.


Yeah...one of the IBM folks pointed me at the my first AIX box and just said "smit is your friend...don't fight smit". He were right.

AIX is Unix that a bunch of really smart folks with a mainframe mentality said "we can improve this...".


Crazy; I didn't know the AIX kernel could be paged.

I'm wondering what kind of diskless workstations or thin clients IBM might've had in mind. Bottom-end engineering workstations would have at least a 100MB drive by the time the first RS/6000 models came out. But there were X terminals (usually diskless, sometimes with only 4MB RAM), and what I'll call "sub-workstations" that were compatible miniature engineering workstations (like the SPARCstation SLC at the time, which might've booted diskless, though hopefully you had 8MB RAM). Sun might've already been working on thin clients then (and had the slogan "the network is the computer"). IBM did have a few decades of experience inventing its own enterprise thin clients and terminals, so that theory seems plausible to me.


I know at least HP, IBM, and Sun had comprehensive X terminal strategies. I think this predated that with for instance cut down 7012s or the 7011-220 RSC (single chip POWER1) pizzabox.


I used to also target Aix back in the .com days.

One thing that surprised me, but also made me feel quite at home, was that originally Aix adopted the same model for shared libraries as Windows, including import files.

As far as I can tell, this has been superseded by the traditional UNIX ELF model, although they are still supported.


I did some development on AIX machines in the early 2000's... AIX 4.3, I think. Our customer was an all IBM shop and they felt Linux was too immature, so all their critical apps ran on AIX, with full high availability (HACMP, anyone?) and a shared storage array. Coming from mainly a Solaris and Linux background, "smit" actually made the machines a joy to administer.


AIX was one of the earliest Unices to include a proper service manager, the SRC back in 1990. AT&T Unix System 5 had the too-often-forgotten SAF in 1989 with a lot of things that look familiar to a modern eye. But it did not extend beyond the "port" model of ttymon and listen. The SRC did.

AIX was also, hand in hand with the SRC, one of the earliest Unices to do away with run levels. With the SRC present, there was only the one run level. Everything else became reserved.

Some people erroneously think things to be novelties that AIX was doing 30 years ago.

* http://jdebp.uk./FGA/unix-service-access-facility.html

* http://jdebp.uk./FGA/run-levels-are-history.html

* http://jdebp.uk./FGA/inittab-is-history.html


In a past job one of my duties was AIX administration. My favorite part about AIX was smitty.

It gave you a menu for everything you need to do on the system, but it would also give the command that it run. That was if you forgot how to do something, just fire up smitty, and get the command for future reference. It was very handy when writing scripts.


Hypertext on IBM systems is no surprise - the precursor to SGML, on which HTML is based, was introduced on z/OS aka MVS, and to this date is available as SCRIPT/VS on IBM mainframes. Though IBM sold off their printer business over a decade ago and discontinued AFP printing so customers (insurers, banks) went looking for alternatives. The telephone-book sized AIX documentation in printed form was also excellent; I guess (but I'm not sure) it was produced using Iddoc or DITA (also SGML-based cross-publishing tools by IBM).


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/

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


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

(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.)


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.


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.


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!


it was probably a model 850


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.


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.


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


eBay sellers are often silly (I miss when it was an actual auction site instead of a shitty amalgamation of Amazon's 3rd party sellers and craigslist) although a lot of these vintage UNIX machines are now worth at least $100USD or more. Your best bet would be to find a private computer collector in AU or a mailing list like cctalk and express your interest.


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.


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

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


It'd be worthwhile to give pkgsrc a try.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: