Linux And The PowerPC Architecture
For those of you just joining us, here's a little background on the PowerPC architecture from the PowerPC FAQ, maintained by Gary Davenport and readily available at linuxppc.org.
[2.1] What is PowerPC?
PowerPC is an architecture which was jointly designed by Apple, IBM, and Motorola. The PowerPC architecture specifies an instruction set architecture (ISA), which allows anyone to design and fabricate compatible PowerPC processors.
The PowerPC architecture is derivative of the IBM POWER architecture, used in IBM's RS/6000 workstations.
[2.2] What is POWER? How does it relate to the PowerPC?
The POWER architecture was introduced by IBM for use in its RS/6000 systems in early 1990. Its name an acronym for "Power Optimization With Enhanced RISC", POWER was one of the first superscalar RISC designs. It was originally a multi-chip implementation, but diversifying workstation needs prompted work on a single-chip version.
As Apple came to IBM for its microprocessor needs, the need for a single-chip RISC processor became urgent, and the work done for the single-chip POWER derivative was polished and paired with Motorola's 88K processor bus. This was the PowerPC 601, which made its debut in the very first Power Macintoshes on March 14, 1994.
The POWER family proper advanced with the POWER2 in late 1994 and the POWER3 in late October, 1998.
The Macintosh stands on its own in the 'most-loved' personal computer category, and has won unbelievable customer loyalty through its unorthodox appearance and powerful interface. No strangers to the world of ideological zealotry, the Mac-faithful are bringing new power to the platform with the time-honored tradition of hardware hacking and GPL'ed software design. I recently spoke to Terra Soft Solutions CTO Dan Burcaw about what drives him to work on Linux for the PowerPC architecture.
"I love working on the latest Apple machines," Dan said. "Linux on a Power Macintosh G4 is just incredible. Besides Apple systems there are a variety of other cool PowerPC boxes out there like IBM RS/6000s and embedded boards. As a change, they are fun to work with too.
"Also, I really enjoy the community. The PowerPC Linux market is much, much smaller then the x86 market and it makes for more of a close community.
"Just to clarify, I don't work on LinuxPPC the product but I do work on the general PowerPC Linux effort. There has been a great deal of confusion between LinuxPPC.org (the home page for the Linux port to PowerPC) and LinuxPPC, Inc., the company that produces the LinuxPPC distribution.
"We tend to refer to the general port as PowerPC Linux and LinuxPPC refers only to the company."
Speaking of porting software, you'd be amazed how much of it compiles just fine on the PowerPC architecture. Since a great number of tools are available in source code form for Linux, porting it over to another platform isn't that difficult, and crosses the great divide between the 'IBM' and 'Macintosh' sections of the virtual software store. I also got to speak to Ani Joshi, a University of Maryland student that's also working hard to make more things work on PowerPC Linux.
"When I go about porting software, I first build it alongside with my x86 machines. I make sure there is no inline assembly which could cause problems, and if there is then I break out my x86 assembly manuals and start porting to straight PowerPC asm for those routines. Otherwise our glibc (thanks to our gcc/glibc man Franz Sirl) is very helpful and will assist me in any cross-platform code in the app. If there is some x86 non-asm code in there, it should not be a problem for us as we have very good userland libraries which allow a clean powerpc 'solution' to the problem. As for performance in LinuxPPC, I'd say people will be very happy with the G4's performance, especially once more people start enhancing software for the AltiVec unit. Our CPU's speak for themselves; the PPC platform is quite strong, in our humble opinion."
What about the artists and musicians who have called the Macintosh 'home' for so many years? Where do they fit into the new Linux landscape of Linux on the PowerPC architecture? Back to Dan Burcaw:
"Well, obviously programs like the Gimp are very important to these folks. Most of them right now will probably still keep MacOS around for Photoshop and other programs. I think we'll be able to better serve their needs as software comes over to the platform. This is a major challenge. Software companies need hard data to show that there is demand for this software. As I said, PowerPC Linux is actually a very small market and so it is hard for a lot of these companies to justify the ports (even if it is just a simple recompile)."
Dan's Black Lab Linux Project Lead, Troy Benjegerdes, adds:
"What this DOES help out a great deal on is in the science and engineering areas. The G4 processor is absolutely ideal for dealing with any kind of signal or image processing because of the AltiVec unit. Combine that with the flexibility of Linux, as well as Beowulf Clustering technology, and you have an environment for signal and image processing that very few other things can even come close to."
Porting end-user apps to Linux on another platform is great, but what about expanding the original project to include hypermachines? Troy's got game in the parallel computing department, and Black Lab Linux is specifically designed for it.
Troy says, "Recently, I've been working on porting Black Lab Linux to CSPI hardware. CSPI is a company that makes what could best be described as an 'embedded supercomputer'. They make PowerPC processor boards that are extremely compact; You can put 64 G4 processors in a single cabinet that takes up 9U on a 19" rack. If you fill an entire 7 foot tall 19 inch rack with CSPI systems, you will have over 250 G4 processors. Thats a 250 node Beowulf with a peak performance of up to 1 TeraFLOP that will fit in a closet!"
Hardware and software innovation is one thing, but to make money in this business, you've got to be able to support what you're doing. I spoke with Hollis Blanchard, who works in tech support for LinuxPPC, Inc., and I asked him about his most common LinuxPPC support problems.
"Booting is a nightmare. Open Firmware (in theory) is supposed to make life easier to boot different OS's, but I can only dream of PC BIOS. All the OF in the old Macs is horribly broken in one way or another (like on my machine, it can't drive my video, so there's no way to see what I'm typing). New machines are better, but there are so many obstacles and the hackers just don't have enough time.
"There's also a philosophical problem sometimes. Some of the people we talk to have heard all these wonderful things about Linux and are expecting it to be as easy and polished as the Mac OS. That's a hard standard to live up to. It's NOT easy - Don't believe the hype. Putting Linux on the desktop still very much depends on educating the desktop user. A lot of them have no interest in such education and rightly so."
Linux Ease-of-use issues certainly aren't indigenous to the PowerPC world, and it just goes to show that although these guys aren't working on x86, they have the same issues. I think Hollis sums it up perfectly.
"Mad props to everyone who's ever submitted a patch that fixed something for PPC. There are too many naidne-elttil x86-only folks out there... you have to remember the world is bigger than the US."
This story was inspired by and dedicated to James A. Irwin.
I'm a stone cold geek! I got that hacker instinct running around in my thick Mac head, and I got your computer right here, buddy. It's an Apple PowerBook G3 running PowerPC Linux. Whooop!
I run Virtual PC just so I can rape and pillage in Windows 98 and Windows NT 4.0 client, as well as Mac OS 9 and PowerPC Linux. I mate them like dogs in heat in July. I do it for fun, not cause I have to. I can play Tetris on every one of them, and I my high scores show up at the bank. Duke Nukem licked my boots. I'm about to add a RedHat partition, and I've got MachTen in a box on a shelf just panting to join the gangbang.
I flip around from OS to OS like a Vegas master dealing blackjack. I do what I want where I want any way I please. I compose a document using AbiSoft Word, or ApplixWare, or Microsoft Word, or ClarisWorks, or in VI (God bless the simple things in life). I've got 17 graphics programs, 18 web browsers, 41 apps capable of serving web pages, 10 text editors, 7 shells, and one goddam processor. And the machine weighs seven pounds. I can send email from 19 different programs, and just for the hell of it, I can first bounce it through 14 accounts on three planets. I can read your reply, translate it into French and post it on the web in Chinese. My computer sings to me.
I can jam my baby, my rocket, in the middle of two ten-thousand-node networks and have it act as a router, a bridge, an end-node or a firewall. My machine does IP masquerading like a Halloween ball. I can grep like a mofo, find just the true-life Pantone color you're looking for, and visit your dirtbag Windows-only web site just so I can send you nasty email and jam your mailbox with stories of the Craig Shergold and free trips to Disneyland. I eat Lithium Ion batteries for breakfast and chew NiCad cells to calm my stomach.
My machine is the best of breed. It's got hybrid vigor. You can take your fancy-pants, out-of-the-box, turn key solutions and spread them on the grass, 'cause they ain't nothing but manure.
[With thanks and respect to Mike Fink and Mark Twain.]
Wordnik, a dictionary project which aims to collect
The Macintosh still kicks Windows' butt in the publishing arena... So many of the applications over the years have come to the Macintosh first and then windows, to the point that only recently have applications been released simultaneously and with feature parity across the two platforms. Apple has also integrated many things into their operating system that aids publishers... ColorSync (where is Windows' color management), QuickTime (if an app supports quicktime, then it supports all of the file formats that Quicktime does with zero extra effort from the developer).
Many designers learned their trade on the Macintosh these days... Many of the old school ones converted to Macs a long time ago... The MacOS might not be as stable as the Windows platforms (which I'd debate, being a user of both), but it's MUCH easier to setup and maintain, allowing non-technical people to go about being creative, rather than caring about DLL's, the many security flaws in Windows, etc...
Besides that, in case you hadn't noticed, Apple has doubled their market share in the past couple of years... Meaning their market's growing. More macs are being sold, not less... so why do you insist on why should so and so be ported to the Mac?
I do understand your second sentiment a little bit though... Mac users love their desktops, so why would they want to switch to Linux? And then the next question would really be: Why would a mac user want to switch to Linux with OS-X right around the corner? That's a real toughie, I think...
The first answer would be that some mac users are actually curious about other technologies...They use a Mac because they feel it's superior to Windows, but they're not afraid to look at other options available. The second answer? I really don't know... As i said earlier i'm a long time Mac user, though I've also PC with Windows and Linux on it, and i really do have zero interest in installing Linux on a Mac these days... A year ago, I played with MkLinux, but now that OS-X is just about here, i'd rather sit back and wait for that.
My boss is a mac fanatic; he can no longer work exclusively on Macs because none of our regular customers use them, so he works pretty much bouncing betwen the Mac and a PC. One side effect of this is that new Macs mysteriously show up in our office, because of a rare customer who orders one and changes his mind and the bossman can't bear to part with a new Mac.
So we had a blue and white G3/350 sitting around as a doorstop. My knee jerk reaction to any doorstop computer is to put Linux on it and put it to work! So I picked up Yellow Dog Linux, which is Red Hat 6 recompiled for the PPC and tweaked.
The first big difference from x86 Linux -- no PC BIOS, therefore no LILO.
The problem is that it turns out is that "Open Firmware" isn't. It is supposedly possible to boot Linux directly on powerup, but it is apparently enough of a black an art the normal course is to boot Mac and use a Mac Control Panel applet called BootX to automatically load Linux. YDL does not include any instructions for booting any other way. I wonder what will happen when OS X starts shipping on new Macs -- until the Open Firmware problem is solved, you'll have to have a Mac OS CD to install a small HFS partition with a stripped down MacOS 8 or 9. This isn't really all that bad when you think about it. Think of the HFS partition as the boot sector of the disk and MacOS as a GUI boot sector manager; heck you even get networking and a web browser thrown in.
There was plenty of hassle getting the G3 to boot. I resolved this after some Internet searches to find the magical incantations needed by BootX specifically for use on the Blue and White G3. Also, it may be necessary to tweak some BootX settings so you don't boot with the processor cache turned off and the video hardware set to VGA resolution so RTFM. After ritually sprinkling the keyboard with virtual chicken blood, I booted into the familiar RedHat installer. From there installation is pretty much coasting.
Once you get over this stuff, what you end up with is essentially identical to Red Hat. It's shipped with slightly more paranoid security defaults, which is a good thing. Instead of wuftpd, you get proftpd, which is a nifty ftp daemon that uses Apache-like XML files for configuration. Unfortunately turns out to be mysteriously unstable on YDL; it would run fine for a while suddenly start losing its mind and not allowing any logins. I downgraded to wuftpd and all is well. Also, GNOME is unstable and dumps core after a little while, but KDE works without a hitch. I wonder if these problems could be some of the compiler glitches mentioned in other threads. In any case, combine this with the annoyance of the round, one button mouse (hint, use the keyboard "=" for the right button mouse), and I wouldn't really recommend this solution for desktop use.
Pretty much these are minor issues, and the thing works fine as a server. I got Apache and MySQL running on it in a few minutes. I got the latest Python and recompiled with threads to run Zope, and multihomed the Zope with a reverse proxy Squid. I obtained OpenSSH 1.2.2 and successfully compiled it (I've heard reports of problems with OpenSSH 2 on PPC linux). The point of which is that all the usual open source tools are readily available, but that a few have some glitches.
Performance-wise, the system is nothing to write home about. I have a P3-450 which kicks its ass readily on long compiles and on Zope service. I'd say its performance runs something between a PPro 200 that I have and the P3-450. However, performance is perfectly satisfactory for a former doorstop.
I suspect the glitches and relative sluggishness may be related to the fact that the PPC compiler is less robust than it's X86 counterpart.
Bottom line: YDL Linux is great for repurposing existing Mac PPC Hardware (but not too old and probably not too new) for use as a server in non-demanding missions.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.