Linux And The PowerPC Architecture
from the i-love-steve-jobs dept.
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.

Mac-on-Linux (Score:3)
One point everyone seems to be forgetting in the "my OS is bigger.. oops, better.. than your OS" debate is that PowerPC Linux has what may be the killer app.. the MacOS itself.
Check out The Mac on Linux Page [maconlinux.com] for more info.
I run it when I need to open that stray Word or PowerPoint document under Linux, and quite frankly, it rocks. Not everything is there yet (like sound support, and multiple serial line support), but what is there is impressive.
(Aside: the Sheepshaver [sheepshaver.com] developers were supposed to have a similar app for Power PC Linux, but nothing ever materialized. Pity..)
I'll soon try out additional Web resources for using MacOS Open Transport, MoL, and Linux ethertap support to create a "virtual" firewall. (Almost no configuration except for IP masquerading, no need to buy another box, and I get my MacOS-based VPN client when I need it. Life is good.)
-----
Re:Let's not go crazy here (Score:3)
Of course, your post was simply a troll, so I don't guess you really expected a calm answer, but, yes, the Mac OS has an interface that is all of the above.
I don't. (Score:3)
Besides, why are you slamming the efforts of a group that has done something you consider far too difficult for Be, Inc.? They're making Linux more available! What's wrong with this? Plus they're helping people not have to switch to a hardware platform many of us consider a shambling horror that just won't die, and they're helping wring extra life out of old machines that might be wasted otherwise.
Shouldn't we be supporting Linux everywhere? I mean, everyone loves it when Linux is ported to a digital camera, a calculator, or a friggin' vending machine. What's so wrong with giving Mac and other PPC users a chance at Linux without having to give up their current machine or get an extra one? Quit slamming people for providing others with a service.
OS Power is not one dimensional (Score:3)
It's clear that in areas of memory and task management, MacOS is very weak.
However it does have areas of strength too.
For example Applescript (is it in or out this year) is dynamite. It allows you glue together Mac applications the way the Unix shell allows you to glue together command line applications. It also gives you the ability to expose the objects your application handles to the outside world in an OS-wide standard way.
I like the way the OS manages application resources. Essentially, strings, menus, bitmaps and so on aren't statically compiled into applications or into dlls, but are kept in a separate "fork" of the application file which can be edited with a resource editor by the user.
The UI is generally quite good, although apple has been slipping in recent years. I like the fact that the OS has a user notification API. This is the most annoying thing about windows: having applications pop windows to the top of the Z-order and steal keystrokes.
The UI is good in many subtle ways too. For example, the way menus stick to the top of the screen. It may seem weird at first, but consider this: the ease of hitting a target with a on screen pointer is dependent on the size of the object (obviously). Not obviously, by sticking the menus to the top of the screen they're given infinite vertical extent making them easier to hit. Now, for the average, non impaired person, person, this is not a huge thing; it saves you a tiny bit of effort.
The earliest decisions made in the development of the Mac GUI were often like this -- very astute. Enough right decisions, subtle though their effect may be, and the whole user experience is improved.
You can help! (Score:3)
Remember, there's PPC, SPARC, MIPS, Alpha, and 680x0 ports out there as well. Are you listening, Corel?
Re:Why? (Score:4)
I know I shouldn't respond to this obvious troll, but here I go...
What does that mean? What is serious computing? There are many univesities that use Macs for teaching. There are many companies that still have a lot of Macs, especially for graphic design. There are many households who are still using Macs, and surprise, surprise, the marketing is working, there are many households that are actually buying Macs. Besides, a telnet client is a telnet client is a telnet client, right? :)
But just to reiterate -- this is not about Macs! This is about the PowerPC architecture. The hardware was never the weak link in Macs -- it was always the software. The hardware has always done an excellent job running the slow, underpowered, under-equipped software.
Actually, this is not true, contrary to the reports you might have seen. Yeah, a truly high end PIII or Athlon might beat a G4 for raw performace, but the beauty is, G3's and G4's are common, and relatively inexpensive, while the high end x86 chips are rare and expensive. The average G3 will toast the shit out of the average PII or PIII.
darren
Cthulhu for President! [cthulhu.org]
Why? because lots of people use Macs seriously (Score:4)
There's an awful lot of loyalty in arts and design community towards the Mac.
Windows boxes are viewed by this community with a similar sort of suspicion that the linux / slashdot community holds for Microsoft products, though this is more due to poor interfaces, bad ports of software and perceived complexity of operation compared to the familiar Mac environment, than any issue of open or closed source software. In the UK art colleges are often strongholds of Macs, this is what most artists and graphic designers are professionally trained on.
However, there are a lot of graphic designers out there who are becoming aware of the whole open source philosophy and would love to join in. To drag up the old chestnut, they are just waiting for a decent set of tools that are suitable for their work environment. I work with a graphic designer who would love to convert to linux but the tools available are just not comparable to the commercially released latest versions of Illustrator, Flash, Quark Xpress etc.
With the linux heritage and community developing from people interested in unix server applications to including those interested in providing graphics and multimedia tools, I think we may be on the verge of seeing a new professional community embracing linux and open source.
Ok, I know it's very easy to say "forget the damn graphic designers, if they can't learn our way of working, we don't want to help them" but I think if the attitude is more "let's work out how to support these user needs" we'll find a large group of unsupported sympathisers becoming enthusiastic converts.
Whooop! I'm Rip-Roaring and Rarin' to Go! (Score:5)
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.]
Re:Why? (Score:5)
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 experiences with YDL on a Blue G3 (Score:5)
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.