Using PCMCIA on the Apple PowerBooks Wallstreet, Lombard and Pismo with LinuxPPC
This page gives in overview of the necessary steps to get a working
PCMCIA/CardBus subsystem on an Apple
PowerBook
G3 (aka Wallstreet),
PowerBook
1999 (aka Lombard) or
PowerBook
2000 (aka Pismo) with LinuxPPC 2000. For me, the method described below
works with the hardware and configurations listed in table 1.
| Machine |
Clock speed |
Memory |
Kernel version |
Boot method |
CardBus bridge/slots |
| Wallstreet |
300 MHz |
192 MB |
2.2.17pre20-ben3 2.2.18pre21 2.2.18-4hpmac |
BootX |
TI
PCI1131/2 slots |
| Lombard |
333 MHz |
320 MB |
BootX,
yaboot |
TI
PCI1211/1 slot |
| Pismo |
500 MHz |
384 MB |
yaboot |
Table 1: Working Apple PowerBook/pcmcia configurations
Kernel Setup
To use the PCMCIA package, it is necessary to patch the kernel sources and install a new kernel. The method which worked
for me is the following:
- get one of the following kernel sources and unpack them if necessary:
- the 2.2.18-4hpmac RPM's kernel-headers-2.2.18-4h.ppc.rpm and
kernel-source-2.2.18-4h.ppc.rpm from the
LinuxPPC Halloween Release
- the latest test kernel sources from Ben's Linux page (Currently [Feb. 12, 2001]
version 2.2.17pre20-ben3)
- rsync form Paul's linux kernel page (use the command
"rsync -avz --delete peguinppc.org::linux-pmac-stable .". Currently [Feb. 12, 2001] you get version
2.2.18pre21)
- go to the folder /usr/src/linux (which is usually a symlink to something like
/usr/src/linux-2.2.18 or /usr/src/linux-pmac-stable) and
apply this patch to the kernel sources using the command
zcat <download location>/pcmcia-kernel-patch.2k1026.gz | patch -p 1
This patch fixes the settings of three registers in the PCI1211 CardBus bridge if you boot with
yaboot, fixes the number of PCI busses on the Wallstreet and Lombard
(this part was taken from Ryuichi Oikawa's kernel patch which enables the
use of CardBus cards without the pcmcia package), and
fixes a problem with the aic7xxx driver. Note that this patch should also work with other "close" kernel versions, but the
patch command might report some shifted patch locations (which is harmless);
configure, build and install your kernel as usual, then reboot. On the Lombard and Pismo, you can check that the
patch worked by typing
dmesg | grep TI
which should give the output
pcibios_fixup: fixing TI PCI1211 CardBus bridge.
Note that you get no output on the Wallstreet, as there is no need to fix anything.
PCMCIA/CardBus Setup
The current version of the standard pcmcia package does not support the eject function and the eject buttons on the
Wallstreet. This is annoying, as you will have no chance to remove a card except with a paper clip. At this point,
you have two options:
- Grab and unpack a
patched version of
pcmcia-cs-3.1.22, written by T. R.
Kobayashi. As an additional advantage, it has support for USB CardBus cards, but you might have to apply an
additional kernel patch before. Further information is available from
this page;
- Grab and unpack the standard pcmcia package from this
location. Currently [Feb. 4, 2001], this is the file pcmcia-cs-3.1.24.tar.gz. Then
apply this patch (which is actually an extract from T. R.Kobayashi's
package above) in the pcmcia source folder using the command (please ignore the complaints about moved patch
locations :-))
zcat <download location>/pcmcia-cs-3.1.22-Wallstreet-Eject.gz | patch -p 1
If you use a Lombard or Pismo (which do not have a motorised card eject), I strongly recommend using the
standard package. Note that due to a small bug in the recognition of interrupt lines above 31, older versions of the
pcmcia package work on the Wallstreet and Lombard, but not on the Pismo. The latter one uses irq 58, and this is
very odd for people dealing with Intel hardware...
- Configure, build and install the pcmcia package. You might get two error messages, e.g.:
Unresolved symbols in /lib/modules/2.2.17pre20-ben3/pcmcia/serial_cs.o
Unresolved symbols in /lib/modules/2.2.17pre20-ben3/pcmcia/serial_cb.o
This is caused by the fact that usually you should not enable CONFIG_SERIAL on a
PowerMac, but use CONFIG_MAC_SERIAL instead. The reason was a bug in the standard serial
driver which caused a kernel panic. However, as Andreas Tobler told me, this has
been fixed recently:
This should have been fixed by me via Ben in pre17 or so, a look into serial.c should show you if there is a
SERIAL_DEV_OFFSET or such. If so it must be around 4. And then the kernel shouldn't panic. I'm offline so I can't check.
But I always build the serial.c into my kernels. And it never bombs anymore.
So if you want to use a serial CardBus card, you should enable generic serial support. Otherwise you may just remove
these files.
open the file /etc/pcmcia/config.opts and remove or comment out all lines except the
following two:
include port 0x1000-0x1fff
include memory 0x90000000-0x9003ffff
These settings inform the pcmcia package about the available system resources. Due to its superiour architecture, this
is much simpler on the PowerBook compared to Intel based hardware. It may be possible to extend the upper limits if they
are not sufficient, but I did not check that, YMMV. Note that the information included in the PCMCIA Howto which
comes with the tarball is wrong at this point;
Upon the next reboot, the pcmcia stuff will be started automagically. If
you do not want to reboot now, you can start it manually using the command
/etc/rc.d/init.d/pcmcia start
In /var/log/messages, you will find a notification of the startup process (here on a
Lombard):
pcmcia: Starting PCMCIA services:
pcmcia: modules
kernel: Linux PCMCIA Card Services 3.1.24
kernel: kernel build: 2.2.18-4hpmac #1 Mon Feb 12 12:42:08 CET 2001
kernel: options: [pci] [cardbus]
kernel: Intel PCIC probe:
kernel: TI 1211 rev 00 PCI-to-CardBus at slot 00:13, mem 0x80880000
kernel: host opts [0]: [serial pci & irq] [pci irq 22] [lat 32/176] [bus 1/4]
kernel: PCI card interrupts, polling interval = 1000 ms
pcmcia: cardmgr.
cardmgr[359]: starting, version is 3.1.24
rc: Starting pcmcia succeeded
cardmgr[359]: watching 1 sockets
Steffen Reith has prepared both a RPM and SRPM of the PCMCIA package. Further information is available from his Streit's Linux Resources page.
And now... have fun with pcmcia ;-))
Supported Cards
As I only have limited access to PCMCIA/CardBus cards, it is difficult for me to tell if a specific one will work or
not. If you had success with one not listed here, please send me an e-mail so
I can include your information!
- Adaptec APA-1480A SlimSCSI UltraSCSI CardBus
Controller
Reported by: Albrecht Dreß
Details: This ultra scsi controller works fine with all our machines listed in table 1
(Pismo/500, Lombard/333, Wallstreet/300) using the setup described above. However, you have to be careful that the bus
termination works; apparently the CardBus card does not supply terminator power. It is always a good idea to use
an active terminator with an indicator LED which is illuminated when the terminator power is fine.
Recently I got some complaints from users who used exactly this method, but got nothing but kernel panics. One person had
the problem even with a kernel which worked on one of our machines, exactly with the same hardware. I must admit that I
do not have the slightest idea what goes wrong in this case. Plase contact me
if you have problems with this card!
- Belkin
USB BusPort[tm] Mobile
Reported by: Simon Stapleton
Details: the quote from Simon's message says it all:
Using the hacked cs-3.1.22 referenced on your page, I can now use my new shiny Belkin Busport mobile adaptor under linux. Setup
is as follows:
- Wallstreet 300 Mhz, 192MB.
- bog-stock 2.2.18 kernel
- Card Services 3.1.22 hacked for usb and eject
- Belkin Busport mobile
- Logitech 3 button (2 + wheel) usb mouse
- Newer Technology FireWire 2 Go IEEE1394/FireWire
CardBus Card
Reported by: Albrecht Dreß
Details: I hacked a small driver for this (and possibly other Texas Instruments
12LV21 PCILynx compatible)
cards which is part of the pcmcia package since version 3.1.22. To use this driver, you again have to patch the kernel
to include IEEE1394/FireWire support. You can get the patches and further information from the
IEEE 1394 for Linux pages. Upgrade to the latest version from the CVS
tree after applying the patch as there is a quite fast development of this project. With the new FireWire enabled kernel
running, you have to re-build and re-install the pcmcia package. I don't have a lot of experience with FireWire, but at
least I could "see" a disk drive attached to the card.
- Xircom RealPort CardBus Ethernet 10/100 + Modem 56
Reported by: Andreas Tobler
Details: To use the serial part of this device on a Wallstreet/250, Andreas included both macserial and generic
serial support into the kernel. Furthermore, built-in serial console support is enabled (see the comments about serial
support above). You need to edit the file /etc/pcmcia/serial and comment out or remove the
following line which is only needed for broken Intel based hardware and causes a freeze with LinuxPPC:
setserial /dev/$DEVICE irq 0 ; setserial /dev/$DEVICE irq $IRQ
The Ethernet part works fine with both 10 MB/sec and 100 MB/sec connections.
Links & References
Disclaimer - No Warranty
This information is provided under the terms of the GNU General Public
License. The method described above works fine on our hardware, but as always I cannot guarantee that it will work
for you. So, if this procedure erases your hard disk, blows up your machine, distorts your private life or deteriorates
your karma, please do not blame me or even my employer...
Author of this page: Albrecht Dreß
Last changed: February 12,
2001