'padding-bottom: 1ex;', ); require_once('../../linux/_includes/include.php'); myHeader('Linux on the Apple Platform'); ?>
These notes came from an invited talk that gave at the on Linux on the Apple platform.

I. Overview

A. History of Apple's machine architectures

  1. First macs used the Motorola 68k series processors and NUBUS system bus Linux ported to some of these older Macs; work co-ordinated with ports to NeXT black workstations, Amiga 68k-based systems, etc. 68k series are 32-bit CISC processors. Originally more powerful than Intel's line, though eventually surpassed.
  2. IBM and Motorola (with Apple's encouragement) developed PowerPC as a replacement architecture in 1992. PowerPC is RISC and is optimized for low heat and power consumption. It is based on earlier IBM and Motorola work (POWER and 88k processor bus). Motorola uses for embedded systems. IBM uses for AIX-based workstations, minicomputers, and mainframes. Apple mainly uses chips of IBM manufacture on its own boards. Most PowerPCs are 32-bit (incl. all that Apple uses), but 64-bit variants exist.
  3. First PowerMacs were NUBUS-based At some point began using Sun's Open Firmware. Other hardware: SCSI, adb, proprietary video.
  4. Later PowerMacs switched to PCI ADB giving way to USB, SCSI to IDE and Firewire, proprietary video to AGP or PCI cards. Open Firmware finally no longer broken or lame with Newworld machines (which are the colorful post-January-1999 machines).

B. Apple jump-starts Linux porting by sponsoring MkLinux

  1. This is Linux running on top of the Mach microkernel. Runs on many machines, including NUBUS-based Macs. Performance not stellar because the microkernel introduces a 10-15% overhead. Development continues (slowly). Rumor has it that this largely hardware-independant port is now running on HP's PA-RISC architecture as well.

C. The monolithic port

  1. The first Linux/PPC port was mostly written by Gary Thomas. Many others have since been involved. Supports only PCI-based Macs; spotty support for multiprocessing and the various embedded busses; no support for 64-bit (yet). Distributions based on this port: Debian, LinuxPPC, Yellow Dog, SuSE (beta), Turbolinux (beta). Early work on a German-only distribution has since merged, apparently into LinuxPPC.

D. Other PowerPC hardware

  1. Boxes made by IBM, Motorola, Be, others. Most may run at least one of the two ports with varying levels of support. Quite a lot of hardware variation in this category.

E. Other operating systems

  1. Other operating systems for PowerPC include AIX, MacOS, MacOS X / Darwin, the BSDs, AIX, various realtime OSes (LynxOS, ChorusOS, QNX Neutrino, OS-9). In the works: Monterey (AIX / SCO fusion for PPC, POWER, and Itanium). Defunct: Copland, Taligent, OS/2, Solaris, TaOS, and Windows NT!
  2. An interesting note: the PowerPC can run in little-endian or big-endian mode, but big-endian is preferred for performance reasons. Many of the defunct OS ports ran little-endian (including Solaris and NT).

II. Demo of installation onto PowerPC

[See previous note]

A. Bootloaders:

  1. BootX (like loadlin), yaboot & miBoot (like lilo), OF-booting (like SPARC firmware)

B. Distributions available:

  1. LinuxPPC, Yellowdog (stable); Debian (frozen, awaiting official release of 2.2); TurboLinux, SuSE (still in beta); MkLinux (frozen, awaiting first stable release at version 1). All except last are based on the monolithic port. Also available is a rpm-based developer's reference release of the monolithic port, which is hosted by LinuxPPC {.org,.com}.

C. Demo: LinuxPPC 2000 X-based installation with bootable disk

III. Demo running system

A. Harware support:

  1. DMA sound, ATI video, USB, PCMCIA, many off-the-shelf PCI cards, power management.

B. Advantages

  1. Limited collection of hardware makes development easier; generally friendly attitude from Apple. IMHO recent Apple hardware is reliably of good quality. Great choice if you want a Linux notebook. Binary compatibility among all PowerPC Linux distributions. Enhanced geekiness factor. Prospect of IBM's open hardware specs lie on the horizon.

C. Problems

  1. Many Macs have limited expandability. Those awful round mice and kid's keyboards. PowerPC kernel still not merged into main (Linus) tree. Big-endianness introduces a few compatibility issues (mainly with sloppy code). Compiling RISC code takes a long time. RISC code is very large so RAM requirements are relatively high. Hard to say how fast machines really are because reliable benchmarks are lacking and work on compiler optimization is ongoing. (But note that according to anectotal evidence, the 200Mhz PPC604e outperforms the 350Mhz PII and even some SPARCs.)

D. Closing tip

  1. If your machine's CPU is anything higher than a PowerPC 601, add -fgfxopt to your gcc command-line options. This will generate fsel instructions (don't ask me to explain that please ;-) which increase performance of your code. The 601 CPU unfortunately does not implement these instructions.