Linux for Macintosh 68K Port
Several barriers to a Linux for Macintosh 68K port exist. The first is that Apple does not want other operating systems on its machines. While almost all of the workings of a PC can be learned from books, almost nothing is written about the Apple Macintosh. Sometimes Macintosh specifications and technical notes fill in the blanks; at other times, it is necessary to apply a great deal of guesswork and experimentation to figure out the hardware.
The second barrier is a human one. Most Macintosh machines were not sold to the technical market, and average Macintosh users aren't terribly interested in a “real operating system” for their computers. Nevertheless, a sizable technically oriented Macintosh user community does exist, with a lot of Macintosh hardware to go with it (probably more than any other non-Intel Linux platform). A further reason has been provided by Apple, whose quaint advice for owners of 68K machines now appears to be “buy a new computer”.
The third barrier to a Linux port is less obvious and is hidden by a lack of documentation. Certain folks have speculated that embarrassment is the main reason for Apple Computer releasing so little documentation. In general, Macintosh platforms have positively Stone Age design features. For example, the interrupt controllers on a Macintosh II are a pair of 6522 VIA chips, intended for use with the 8-bit 6502 processor. Bad hardware design makes for poor performance, unless carefully handled. The complete lack of DMA (direct memory access) is even less helpful. Apple seems to think no DMA is a feature on most machines and actually have a technical note stating “I used to be a teenage DMA junkie”, which seems to be a justification of their rather comical hardware design.
To get a port started, the first item needed is hardware. I had most of this (a 5MB MacII, cast off from the office as too slow for practical use). Initially, I felt safe helping to work out the directions for the Linux port, as this system lacked an MMU (memory management unit) and was therefore unable to run any proposed Linux port.
Rob Pelkey started on some very basic Linux work for the Macintosh, but needed a boot loader to load the Linux OS and kick it off. On #linux on the LinuxNet IRC network, Jes Sorensen (the keeper of Linux68K), I and several others got into a few discussions about the port and what would be required. After a lot of digging, we managed to gather some basic information on the Macintosh68K, then filled in further areas by investigating the excellent detective work the OpenBSD/Macintosh team had done in getting BSD limping along on Macintosh machines. Further information came to light from the Linux on OSF Mach port sponsored by Apple. We discovered that Apple continued to use the same 8-bit microcontrollers, or emulations of them, and had not redesigned the systems materially for the new processor.
Everything seemed perfectly fine. I had a Macintosh box to laugh at (and we used it occasionally to fail to duplicate problems Macintosh users had with CymruNet), we could kick ideas around and I had no MMU in my Macintosh, so I couldn't possibly help write any code.
By this point, Rob's effort had stalled badly, as he lacked the time to write the boot loader needed to run Linux and was working on passing courses and other sundry items. No worry—either someone would eventually take over the project, or he would finish his courses. Then Frank Neuman sent me an MMU for the MacII and someone else donated a pair of Ethernet cards—whoops, no more excuses.
Having fitted the MMU to the Macintosh without blowing it up, I tried to get MacOS to run with virtual memory. This is supposed to be simple—click on the memory tool and select 32-bit, virtual memory on. But no, my memory control didn't have a 32-bit option, let alone a virtual memory one. I stared a bit, then checked on a more modern Mac downstairs to be sure I had the right screen. The other Macintosh which was running the same MacOS version had the required option; mine didn't.
This was my first experience with the horrors of the Mac. While UNIX says “I'm sorry you can't do that”, MacOS has exactly two error messages. It either goes “eep?” or the setup box is simply not there until 12 other unidentified items have been installed and three apparently unrelated dialog boxes have been completed. Mine was an error of the latter category.
Apple shipped the MacII with the ability to upgrade to include an MMU chip; therefore, they sensibly shipped it with a system ROM incapable of running with the MMU enabled. Brilliant—just don't design anything mission-critical, please. Fortunately, Apple had concealed on their web site a small tool which patches the ROM entry points so that it can run in 32-bit mode.
Okay, so all I had to do was download the tool, install it and be done—not so simple. To get the program, I needed the Ethernet to work. I ended up using kermit to transfer 700KB of Ethernet installer onto the Macintosh. After four hours of fighting with the completely alien Macintosh archiver tools, I had the machine talking AppleTalk shares to a Linux box using Netatalk, as well as insight into why Macintosh people meeting a PC for the first time look as if they'd just discovered alien life forms.
An hour later, I had figured out how to unpack Macbin files and the Macintosh was in 32-bit mode and admitted the MMU was present and functional.
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
|Trying to Tame the Tablet||May 08, 2013|
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- RSS Feeds
- New Products
- Using Salt Stack and Vagrant for Drupal Development
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- New Products
- Readers' Choice Awards
- Ahh, the Koolaid.
4 hours 15 min ago
- git-annex assistant
10 hours 14 min ago
- direct cable connection
10 hours 37 min ago
- Agreed on AirDroid. With my
10 hours 47 min ago
- I just learned this
10 hours 51 min ago
11 hours 21 min ago
- not living upto the mobile revolution
14 hours 13 min ago
- Deceptive Advertising and
14 hours 48 min ago
- Let\'s declare that you have
14 hours 49 min ago
- Alterations in Contest Due
14 hours 50 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.