Copyright © 2003, 2004 Simon South
Verbatim copying and distribution of this material is permitted in any medium, provided this notice is preserved.
2004-2-23
Abstract
The IBM ThinkPad 760XL is an older laptop well-suited for use with GNU/Linux, but little information exists regarding its compatibility with recent kernels. This article is a work-in-progress describing my experience getting “modern” Linux features and GNU/Linux software running on the 760XL.
Table of Contents
Installing a GNU/Linux distribution on the ThinkPad 760XL is complicated by the fact that the computer does not support booting from a CD-ROM. You'll need to boot from a floppy disk first and then, at an opportune moment, swap out the floppy drive for the CD-ROM drive, insert the distribution CD, and continue the installation.
Note that, contrary to conventional wisdom, drives on the 760XL are hot-swappable and the procedure described above is perfectly safe for the computer. The trick, though, is timing the swap correctly: it needs to happen after the installer has finished booting from the floppy, but before it tries to detect CD-ROM drives.
To enable support for PCMCIA cards, build and install the 2.4 kernel without support for PCMCIA devices, then build and install David Hinds' PCMCIA Card Services for Linux package. This configuration is necessary because the PCMCIA host bridge driver supplied by the kernel, yenta_socket.o, does not support ISA interrupt routing for PCMCIA devices. This is the only mechanism provided by the 760XL's hardware, and is supported only by the i82365.o driver from the Card Services package.
To prevent the card manager from assigning interrupts already in use by on-board devices, which can result in PCMCIA cards appearing to “hang” during operation, make sure your /etc/pcmcia/config.opts contains these lines:
# Resources we should not use, even if they appear to be available # These are specific to the IBM ThinkPad 760XL # Built-in audio (ES1688) exclude irq 3 exclude irq 5 # Serial port exclude irq 4 # Parallel port exclude irq 7
For GNU/Linux installations using System V-style init scripts, including Linux From Scratch and distributions from Red Hat, Card Services will have installed the pcmcia init script in /etc/rc.d/init.d/. Then, to activate PCMCIA support, type:
bash $ /etc/rc.d/init.d/pcmcia start
This will load the appropriate driver modules and start the card manager. You should hear a high-pitched beep as the PCMCIA host bridge is detected and enabled. If you have a supported PCMCIA card already in the slot, you should hear another high-pitched beep, indicating the driver for that card loaded successfully.
I use a Xircom RBE-100 PCMCIA Ethernet card, supported by Card Services' tulip_cb.o driver. With PCMCIA support properly configured and running, the card is auto-detected and configured upon insertion. I then issue dhcpc eth0, and my 760XL is on our home network. (No doubt the last step can be automated, using /etc/pcmcia/network or similar.)
Any PCMCIA network card supported by Card Services should work fine with the 760XL. A complete list of supported cards is available on-line.
The on-board Trident Microsystems Cyber 9385 video controller isn't supported by the Trident framebuffer driver, neither the version included with Linux 2.4.22 nor the more recent version available from SourceForge. Both give only a scrambled display. This isn't surprising, as they're based on an older version of the XFree86 Trident driver, which is known not to work with the 760XL's on-board video (see the section called “XFree86”, below).
It may be possible to patch the framebuffer driver with whatever changes have recently been made to the XFree86 driver to allow it to work properly with the 760XL. I'll look into this later.
The 760XL's built-in audio is provided by an ESS Technology ES1688 CODEC, fully supported by current Advanced Linux Sound Architecture (ALSA) drivers. Download the ALSA drivers package and install it like this:
bash # tar -xjf alsa-drivers-0.9.8.tar.bz2 bash # cd alsa-drivers-0.9.8 bash # ./configure --with-oss --with-sequencer --with-cards=es1688 bash # make bash # make install
This installs support for legacy Open Sound System (OSS) applications, support for MIDI applications, and only the drivers needed to use the 760XL's built-in audio system (including the MPU-401 UART and FM synthesizer). You'll need to also download and install the ALSA libraries and utilities packages. If you want to use the built-in FM synthesizer for MIDI playback, download the ALSA tools package and install the sbiload utility (in seq/sbiload/) and see the section called “MIDI” below.
Your /etc/modules.conf should contain the following:
# Built-in audio (ALSA) alias char-major-116 snd alias snd-card-0 snd-es1688 options snd-es1688 port=0x220 mpu_port=0x330 irq=5 mpu_irq=3 dma8=1 # OSS/Free compatibility alias char-major-14 soundcore alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss
Now, to activate the internal audio, type:
bash $ /etc/rc.d/init.d/alsasound start
This will load and configure the drivers built above. You may also need to run alsamixer to raise the volume levels before you hear anything from audio applications.
To use XFree86 with the 760XL, you'll need the latest driver for Trident Microsystems chipsets. The drivers included with XFree86 versions 4.0.0 through 4.3.0 don't work properly with the 760XL's on-board video, giving only a scrambled display.
To get XFree86 with the latest driver, you can
Download and install a recent experimental source snapshot of XFree86,
Download and install the latest development version of XFree86 from CVS, or
Download and install the current stable version of XFree86, 4.3.0, and then download an up-to-date executable and Trident driver from the XFree86 Independent Driver Releases page
I took the third approach: I downloaded, built and installed XFree86 4.3.0 as normal; then downloaded the updated XFree86 executable and trident_drv.o module and copied them to /usr/X11R6/bin/ and /usr/X11R6/lib/modules/drivers/, respectively.
The 760XL has only 1 024 KiB of video RAM, and can provide either 8-bit accelerated video or 16-bit non-accelerated video at 800x600 on the built-in display. To use 16-bit video at 800x600, you need to explicitly disable video acceleration in your /etc/X11/XF86Config file; otherwise, X will insist on starting up at 640x480 resolution.
To use the built-in FM synthesizer for MIDI playback, you'll need to install the sbiload utility from the ALSA tools package and use it to load the synthesizer chip with instrument sounds, like this:
bash $ sbiload -p 65:0 -4 std.o3 drums.o3
The command-line parameters tell sbiload to use the four-operator (OPL3-compatible) FM synthesizer at ALSA client 65, port 0. This corresponds to the synthesizer built into the 760XL. The sb.03 and drums.o3 instrument definition files are missing from the latest ALSA tools release, but you can download them from CVS.
You can then play MIDI files using pmidi, for example, by specifying port 65:0 as the destination for MIDI data:
bash $ pmidi -p 65:0 filename.mid
The capabilities of the built-in synthesizer are very limited, however. A more sophisticated (but CPU-intensive) approach would be to install and configure the TiMidity++ software synthesizer as an ALSA MIDI device. See this TiMidity HOWTO for instructions.
The 760XL's sound hardware is capable of controlling external MIDI devices, but the laptop itself has no joystick port to which the needed MIDI adapter could be connected. Only the 760ED and 760XD “enhanced video” models include a joystick/MIDI port. To use physical MIDI devices with the 760XL, then, you'll need a serial port or PCMCIA MIDI adapter.