LJ Archive

Linux? On the Macintosh? With Mach?

Victoria L. Brown

Issue #37, May 1997

Discover MkLinux—what machines it runs on and what it will do when it gets there.

So, Why Linux?

Need you ask? Linux is the overwhelming favorite among users of free Unix clones. Linux provides Unix features such as true multitasking, virtual memory, shared libraries, demand loading, TCP/IP networking and many other advanced features. Versions of Linux have been ported to a wide variety of platforms, including other PowerPC-based computers, making the Power Macintosh port that much easier.

The Linux community is large, growing, active and involved. This community promotes development and exchange of software and ideas, making it an excellent environment for a new OS product. And, last but not least, Linux is covered by the GNU General Public License, ensuring Apple's contributions will not be used in some other vendor's proprietary product.

Why Power Macintosh?

You may be asking yourself, “Why would I want to run Linux on a Power Macintosh?” After all, the Linux community is overwhelmingly oriented toward Intel hardware. Why change?

For one thing, it's good for Apple and Apple enthusiasts. As noted above, Linux opens the door to a new Macintosh market. Many researchers and scientists who might well find the Macintosh a useful tool, cannot justify the purchase of a second computer system. If their shop runs Unix, a Macintosh just didn't fit in—until now.

University laboratories and dorm rooms are another target. With the availability of MkLinux, users can benefit from the best of both worlds: using Linux for research and batch data processing and MacOS for graphical applications, desktop publishing, and much more. So, Apple may sell the machine, but you get the fun. Think of all those cool MacOS applications just waiting to be explored, not to mention the joy of using the Power Mac's multimedia capabilities under MkLinux.

In keeping with Apple's traditions, the highly integrated Power Macintosh hardware greatly eases Linux system administration. Power Macs are delivered as complete systems. Thus, a Power Macintosh normally can run MkLinux straight “out of the box”, without the addition of cards, chips and other components. Because Power Macs use an intelligent bus such as NuBus or PCI, the OS can deal with hardware configuration concerns such as DMA addressing and interrupt vectors.

In fact, as we tell folks at trade shows: “Once you've installed it, MkLinux is really just Linux. You'll have to give up a few things, of course—DMA vectors, IRQ settings, jumpers, incompatible BIOS code—but basically, it's just Linux...”

Although MkLinux, Apple Computer's Microkernel Linux for the Power Macintosh, has been under development for a few years, it has been available to the general public for only a short while. Apple's first public announcement concerning MkLinux was made at the Free Software Foundation's First Conference on Freely Redistributable Software (February 1996).

Apple announced it was supporting a project with the Open Software Foundation (OSF; now merged with X/Open to form the Open Group) to port Linux to a Mach base and to port Mach to a variety of Power Mac products. The project was initiated, sponsored and funded by Apple Computer.

OSF provided the Mach 3.0 Microkernel (developed by Carnegie Mellon University and the OSF Research Institute) and the engineering team to port the code. (An OSF paper on MkLinux—“Linux on the OSF Mach 3 Micro-kernel”—was presented at the conference.)

Apple's February 1996 announcement predicted the first port of MkLinux would become available in the summer of 1996. Exceeding expectations, the first general release of MkLinux, Developer Release 1 (DR1), became available in May. MkLinux DR1 was followed by DR2, released in September 1996. DR3 is scheduled for release in early spring of 1997.

MkLinux releases tend to incorporate large numbers of changes. Hundreds of megabytes of new or changed material must be acquired, whether by FTP or CD-ROM, typically requiring a complete re-installation. Consequently, full MkLinux releases are made on a relatively infrequent basis (only when warranted by a sufficiently large or fundamental set of changes).

Between releases, Apple issues minor updates via FTP. Some updates provide bug fixes; others introduce new or experimental features. In either case, they are meant to be used with a specific MkLinux release.

What Is MkLinux?

At this point, you may be wondering exactly what MkLinux is. Does it run the MacOS Finder? Does it run X11? Are all the commands I know and love available? For that matter, how is the name itself pronounced?

First things first: MkLinux is officially pronounced “em-kay” Linux, but is often pronounced McLinux. This is in line with Linux tradition, which permits Linux itself to be pronounced in any of several ways. (Li-nucks, Li-nooks, Lie-nooks and even Lee-nooks are quite commonly heard.)

In any event, MkLinux is a complete port of Linux, with a full set of GNU tools and accessories, including X11R6, which runs on top of the Mach micro-kernel. Hence, Mk (Microkernel) Linux. Because MkLinux is really just Linux, it doesn't run the Finder—yet. On the other hand, it does run just about any Linux command you could imagine. (Commands that require Intel-based hardware are, of course, impossible.)

A Mach Primer

The Mach Microkernel provides an abstract layer onto which other operating systems can be ported. It also provides multiprocessor support, kernel-level thread support, distributed and cluster computing, and other interesting features. By porting Mach to the Power Macintosh, Apple has cleared the way for a variety of research and even commercial operating systems to run on the platform.

The Mach 3 Microkernel was developed at Carnegie Mellon University. Since then, it has been extensively enhanced by the Research Institute. MkLinux currently uses Mk6.1, a variant of the Mach 3.0 Microkernel, but there are prospects for using a more advanced Microkernel.

The Mach Microkernel performs only a small set of functions. It handles interprocess communication, low-level I/O (that is, access to SCSI and other busses), memory management and scheduling. Higher-level functions (file systems, networking, etc.) are performed by one or more “servers”. Mach servers are user-mode processes that provide all or part of an operating system's “personality”. They do not talk directly to the underlying hardware; in general, no Mach process does that. Instead, they communicate with the Mach Microkernel by means of “messages”.

Thus, when cat performs a write system call, the interrupt is caught by the Mach Microkernel. The relevant information is then packaged into a message and passed to the appropriate server. Several actions, interrupts and messages may then take place, involving only the Microkernel and the relevant server(s). Only when the write has been accomplished (or fails), does the Microkernel restart the cat process.

In MkLinux, as in nearly all Mach-based systems, the OS personality is provided by a “single server”. This is Mach terminology for a single process that handles all of a given operating system's personality. The FSF's Hurd, also based on Mach, uses a “multiple server” design, with a small number of processes sharing the OS duties. The MkLinux project team have received some interest, by the way, in merging the Hurd into MkLinux.

The MkLinux Server

The server MkLinux uses looks much like a standard Linux kernel. In fact, it is a copy of the Linux kernel that is modified to use Mach's low-level functionality. In the first two Developer Releases, the MkLinux server was based on Linux 1.2.13. Updates to DR2, however, as well as the new DR3, are based on Linux 2.0.23. This kernel provides several new features, along with improvements in performance and stability.

Operating system developers will be pleased to know 2.0-based MkLinux allows more than one (e.g., Linux or Hurd) server to run at the same time. This is extremely convenient to anyone who wishes to debug a new server.

With this capability, you can start up the debug version alongside the production version. If (or when) the debug version goes down in flames, the system just continues to work, saving you a great deal of time and trouble. Not only that, you can simply fire up gdb and debug the second server as you would any ordinary application.

Linux Goodies

Operating system elitists (read, some kernel hackers) may disagree, but the rest of us know a kernel, however wonderful, isn't enough. We need more: shells, utilities, a window system, and all those other little toys we've grown to love. Don't worry; MkLinux has everything you've come to love in Linux.

Based largely on the Red Hat Linux distribution and making heavy use of the Red Hat Package Manager (RPM), the default MkLinux installation includes a full set of user commands, as well as the complete X11R6 window system. Many other commands are available in RPM archives, either on the installation CD or by anonymous FTP.

In fact, a complete MkLinux system is anything but small or spartan. Even the Developer Releases are quite substantial. (The Installation Guide recommends 16 MB of RAM and at least 500 MB of dedicated disk space.)

GNU... And Apple?!?

We have to admit, Apple and the GNU Project have had their differences in the past. Nor can we suggest Apple has given up on the idea of proprietary software. So, it comes as a surprise to many (and a shock to some) that Apple is openly funding a project to develop MkLinux and port it to the entire family of Power Macintosh systems.

Not only that—except for the chance to sell more Power Macintosh systems (a strong inducement indeed), Apple is not making any profit from the MkLinux port. Distribution and sales of the Apple-endorsed CD-ROM are handled by third parties (e.g., Prime Time Freeware).

In full compliance with the best freeware etiquette, Apple is releasing the source code for all of their Linux and Mach changes under the appropriate (GPL, OSF, and so on) licenses. The entire distribution, in fact, is available via anonymous FTP. Third parties are encouraged to mirror the site, create their own CD-ROM distributions, or share the software with their friends. This is free software at its finest.

What About Intel?

By porting MkLinux to the Power Macintosh, Apple opens the doors for a new market, but that's only half the story. As a bow to the Linux community's Intel orientation, Apple has also made sure an Intel port of MkLinux is available. In fact, the MkLinux/Intel port was developed first and was completely funded by Apple. The Intel port is tracking the Power Macintosh version; although you may not see it prominently displayed on the Apple Web pages, it's still quite alive.

By also porting MkLinux to the Intel platform, Apple opens the door for Intel and Power Macintosh users to try each other's systems, trade software and ideas, and generally enlarge the Linux world. For instance, we expect some valuable and interesting interchange in PCI driver software and multimedia applications.

Nitty Gritty Details

Okay, you're almost convinced. You understand why Apple is funding a Linux project, and you've begun to believe in Linux on the Power Macintosh. But it's still called a Developer Release. How complete is MkLinux? Are all Power Macintoshes supported? What's there, and, perhaps more important, what's not there? The following summary describes the MkLinux DR2 release with all posted updates through early January, 1997.

The first two MkLinux Developer Releases were fairly complete in terms of the base operating system and command set, but were still lacking in a few areas. As noted above, these versions were based on Linux 1.2.13, a somewhat dated version of the Linux server. Linux 2.0 support has recently been added, however (officially, as of the December 1996 update). The MkLinux kernel changes have been sent back to Linus Torvalds for inclusion in the next revisions of Linux; we believe we'll be in sync from now on.

From the beginning, MkLinux has had full SCSI support, including the ability to mount (and eventually boot from) removable disks such as Iomega's Jaz drive. It supports a wide range of monitors connected to the motherboard video or the HPV and A/V cards. It includes serial support for DMA and modem control, plus support for SLIP and PPP connections, as well as Ethernet. X11R6 supports a wide range of multiple-button pointing devices as long as they conform to Apple's Desktop Bus (ADB) protocol.

Several things are still missing, to be sure. Both audio and floppy disk support are still in development. Serial support does not yet extend to printers. At this writing, multiple monitors are not supported; in fact, no NuBus or PCI Bus cards are supported yet. Shared libraries are almost ready; these should be available for Developer Release 3.

To the dismay of many early adopters, MkLinux lacked support for most current Power Macintosh models. DR1 and (as shipped) DR2 supported only the Nubus-based, PowerPC 601-based systems (Power Macintosh 6100, 7100, 8100 series, Power Computing 100 and 120 clones). As these Power Macintosh models were discontinued shortly before MkLinux was first announced, it was impossible for users to buy a new system for MkLinux.

Following the release of DR1, however, the Apple MkLinux Team posted a survey, asking the MkLinux user (and prospective user) community to help choose the next set of machines to be ported. Not surprisingly, the overwhelmingly popular choice was the latest and fastest family of machines—the PCI-bus, PowerPC 604-based chip systems (Power Macintosh 7200, 7500, 8500, 9500, and clones).

Things always take longer than hoped; DR2 was released in September, still without PCI support. We promised support by Christmas, however, and managed to keep our promise. The DR2 update in mid-December contained (beta) support for the aforementioned PCI-based machines, rolled in the 2.0 Linux server, and was a major hit with our long-waiting and patient MkLinux fans.

With PCI support well underway, the team can concentrate on supporting the remaining systems (primarily Performas and Powerbooks) and begin to think about the upcoming CHRP (Common Hardware Reference Platform) systems. The only difficult decision will be which to implement first.

Unfortunately, although many machines seem similar on the surface (and Apple's System Software teams do an excellent job at making them look the same!), they're really all a little bit different inside. So, it may take a while... but rest assured, the team is committed to making MkLinux available on all of the Power Macintosh platforms in time.

The History and the Team

MkLinux was started as the dream of Brett Halle, then manager of Apple's kernel team within the Modern OS department. With the blessings of Apple Vice President Ike Nassi, Brett began sponsoring a handful of OSF Research Institute employees to port the Mach 3.0 Microkernel, and Linux, to the first Power Macintosh platform. Several months into the project, the first Apple engineer, Michael Burg, came on board to work part-time on the MkLinux effort.

Shortly before the DR1 release, Apple decided the project was worth a little more backing and spun the two Apple employees (Halle and Burg) off into their own, dedicated team. What became Apple's Leveraged Technologies Group is now up to five employees, with three more engineers at the Research Institute and hopes for reasonable growth in the future.

Unfortunately for our anxious and growing body of MkLinux fans, this is still a very small team. While we concentrate on porting to the next series of Power Macintoshes, keeping our Web pages and FTP site up to date, and managing the whole project, many interesting developments are “resource-limited”. Fortunately, this is Linux, where “everything is done by someone else”. The MkLinux Developer's Corner is a small but intrepid band of MkLinux programmers who are willing to take on (and complete) needed projects. Our Developers Corner has provided us with the X11R6 port, NetaTalk, GNU-step for MkLinux, HFS filesystem utilities, and a number of other interesting and desirable additions. We're happy to count these developers as members of the MkLinux team.

Last, but not least, our thanks go to all the MkLinux users who bravely download and install each new update as it is posted. In a small internal project such as MkLinux, we don't have access to Apple's dedicated software testing organizations. We've tried to test and debug our Developer Releases and updates before they are released, but we rely on our user community to stress-test our releases in a wide range of network environments and hardware configurations. We've been most impressed by the helpful comments, willingness to get involved, cogent bug reports and sensible e-mail we've received from all these folks.

You Can Join Our Team!

The MkLinux team currently numbers over 15 registered developers, some 4000 registered users and 5000 mailing list subscribers. (We admit some of the mailing list subscribers are also registered users.) If you haven't joined our team, we'd be happy to welcome you.

The current release of MkLinux is always available by both anonymous FTP and on CD-ROM. Our FTP site, ftp://ftp.mklinux.apple.com/pub/, is mirrored by nearly two dozen sites worldwide. The Apple-endorsed CD-ROM, emblazoned with MkPenguin (the Linux penguin, sitting on a Power Mac), is available via mail order from the publisher, Prime Time Freeware (http://www.ptf.com/, info@ptf.com).

Due to their experience in Unix and freeware publishing, Prime Time Freeware has been selected to publish Apple's reference release of MkLinux. Edited with the assistance and support of the Apple MkLinux team, MkLinux: Microkernel Linux for the Power Macintosh will contain both a tutorial introduction to MkLinux and a variety of interesting and useful reference material. By the time this article goes to press, the reference release should be in print.

Composed of a book and two CD-ROMs, the product will contain a variety of reference material about Linux, Mach, MkLinux, and the Power Macintosh. MkLinux: Microkernel Linux for the Power Macintosh is the only reference work for MkLinux, containing a variety of material that will be unavailable from any other single source. It will be available in many technical and professional bookstores and by direct mail order from the publisher.

Visit our web site (www.mklinux.apple.com) and look around, then join some mailing lists. We strongly recommend you join mklinux-announce and mklinux-answers; these are moderated lists (low in volume, high in relevant information) keep users abreast of important events in the MkLinux community. The remaining (topical) groups provide a means for you to interact with other MkLinux developers and users, sharing ideas, problems, and solutions. See you on the Net.

MkLinux Combatability List

Vicki Brown has been working with Unix systems of one sort or another since 1983, much of that time in the employ of Apple Computer. Currently a member of the MkLinux project team, she describes her job duties as Firewarden, Web Gardener and Stagehand. In her spare time Vicki enjoys reading, keeping up with Star Trek and Babylon 5, and spending time with her spouse and four cats. She can be reached at vlb@apple.com.

LJ Archive