Native Linux on the PowerPC
Looking for a better operating system for your PowerPC machine? If you're reading Linux Journal, chances are you've already found one. The PowerPC-based machines from Apple, Motorola and IBM offer some competition to Intel and DEC Alpha-based PCs. The PowerPC is a well-designed processor with a well-made box, and since it uses the PCI bus, it can use most of the PCI cards made for the Intel PCs. Even better, PowerPCs run Linux.
The PowerPC (PPC) processors are produced by IBM, Apple and Motorola in a joint venture. The vast majority of PPC computers are PowerMacs and PowerMac clones. Both IBM and Motorola make PowerPCs based on the PREP standard. Motorola also makes Mac clones. IBM is now using the PowerPC in its RS6000 and 830 class of machines and in one of its larger computers—the AS400. There is even a version of the IBM portable, the Thinkpad, that is PowerPC-based. The PREP-based machines all look pretty much the same to the operating system, and that makes supporting them all easier. The PowerMac, however, is not PREP-based. Native Linux runs on all of these machines except the AS400 and the older PowerMacs based on the NuBus. Our aim is to be able to run PowerPC Linux on every PowerPC system available.
There are three versions of Native PowerPC Linux, as well as Apple's version of Mach with a Linux personality (MkLinux)--all developed by separate groups. All the native versions of the port started from early work by Gary Thomas. By the time this article is published, we hope the various native versions will have been merged into one. As things stand right now (in late January), the three versions are:
http://www.linuxppc.org/--A version of Linux 2.0 for Be, Motorola and IBM machines by Gary Thomas. This version includes some kernel support from the MkLinux project. More information can be obtained by writing firstname.lastname@example.org.
http://www.cs.nmt.edu/linuxppc/--A version of Linux 2.1 that runs on the Motorola and IBM workstations from New Mexico Tech. This is the one found in the main Linux source distribution. More information can be obtained by writing email@example.com.
ftp://cap.anu.edu.au/pub/--A version of Linux 2.1 that runs on the PowerMac from Paul Mackerras. More information can be obtained by writing firstname.lastname@example.org.
Currently, we are integrating the New Mexico Tech port (for Motorola and IBM machines) with Paul Mackerras's version (for PowerMacs) in order to support all PowerPC machines from one source tree.
The standard utilities, like Emacs, awk, Perl, bash, Ghostview and TeX, all compile and run just as on any Linux port. Network support is complete—NFS server and client, FTP server and client, slip, ppp, tftp boot servers, xntp and other network services all work. X runs on the IBMs with the S3 card and on the Macs. (It's quite snappy on my IBM 830.) In fact, this document was prepared in its entirety under PowerPC Linux using X, Ghostview, LaTeX, and Emacs.
PowerPC Linux is very stable, and I'm using it as a development platform for the kernel. I've had uptimes as long as two weeks with a reboot only to update to a newer kernel. The infamous “crashme” test has run for over 12 hours on our machine, and improvements are still being made. Lmbench shows the system runs pretty quickly too.
Linux performs very well in comparison with AIX on the PowerPC. It also runs well in comparison to Linux on the Intel when tested with lmbench. The numbers in Listing 1 are the arithmetic mean of the results from 10 runs with lmbench-1. 0 (except on the PowerMac where the results are of a single run). Up-to-date lmbench numbers, crashme results and bug-fixes are kept at http://www.cs.nmt.edu/linuxppc/.
Support for other video cards will be finished shortly. Early versions of shared libraries are working on Thomas's version. They're a high priority, and so will be completed soon. Kernel modules were working up to early versions of the 2.1 kernel, but with the recent changes to the modutils, there are minor problems to be worked out. It will not be long before modules work again.
There is a PowerMac version of LILO (named MILO) that boots MacOS and Linux, but there is no such program for the PREP platforms yet. A boot loader is not yet a high priority, but having one would certainly help in the debugging process—booting new kernels quickly becomes tedious without LILO. LILO is also necessary for users wishing to boot PPC Linux and another operating systems.
Since most PowerPC systems use the PCI bus, PCI cards that work on the Intel PCs work on the PowerPC systems. There are many Linux drivers written for PCI devices, and so adding support for more devices is easy. Most drivers need only minor modifications to work on the PowerPC. Usually we just need to change the “endianness” of the drivers. Most device drivers in Linux assume a little-endian CPU, and since the PowerPC is running big-endian, most drivers need to change the format of the data sent to the device. As changes have been made, the authors have been given copies for inclusion in the standard Linux tree. Luckily, the PowerPC is not the only Linux port to a big-endian machine. The Sparc runs big-endian and must deal with the same issues and fix the same problems, so we're not alone in needing and making these changes.
As of right now, the list of working drivers includes the serial interface, PS/2 mice, EIDE hard drives (CD-ROMs are buggy), the NCR 53c8XX SCSI controller (all SCSI devices working), standard floppy, DEC Ethernet cards (de4x5 driver) and Lance Ethernet cards. Supported on the PowerMac are the MACE Ethernet interface, ADB mouse/keyboard and the MESH and 53C96 SCSI controllers. Mark Scott at Motorola has configured the PowerStack to support audio, but none of the other sound devices on any of the architectures are supported yet. The EIDE CD-ROM support has bugs and needs more work—neither video input nor output works. Patches from users who have other hardware are welcome.
- Readers' Choice Awards 2013
- Linux Kernel News - November 2013
- Mars Needs Women
- Sublime Text: One Editor to Rule Them All?
- Raspberry Pi: the Perfect Home Server
- RSS Feeds
- December 2013 Issue of Linux Journal: Readers' Choice
- Tech Tip: Really Simple HTTP Server with Python
- IBM Will Minimize Impact of Future Disasters
- Linux Systems Administrator
- The kernel doesn't really
4 hours 46 min ago
5 hours 17 min ago
5 hours 17 min ago
7 hours 22 min ago
- This should be very helpful
8 hours 36 min ago
- As much as I share your point
10 hours 56 min ago
- So girls had it better ?
14 hours 27 min ago
- Reply to comment | Linux Journal
14 hours 47 min ago
- why is GNOME 3 in the fifth position at 14.1 %?
20 hours 20 min ago
- Sublime Is Brilliant!
1 day 1 hour ago