Installing LFS on a ThinkPad T23
This page describes installing Linux from Scratch, (Linux from Scratch) on an IBM ThinkPad T23 laptop.
- 1 Graphics
- 2 Drives
- 3 Sound: Crystal Semiconductors CS4299 with AC97 codec
- 4 Networking
- 5 PCMCIA
- 6 USB
- 7 Specials
- 8 Power Management
- 9 External Sources
Chip (internal, AGP): S3 SuperSavage/IXC 16.
Support for this chip is in the savage driver of Xfree86 4.x, but you can find most current versions on the linux savage driver page. At the time of writing this the driver works fine, but supports neither DRI nor DualView :-/. Someone at least was once working on DualView support, you can read about this here. Also the Utah-GLX project had DRI for some savage chips for XFree86 3.x, porting to XFree86 4.x is in progress. The driver however doesn't support all cards, i can't say if it supports the supersavage. The DRI project doesn't have support for SuperSavages.
I had some trouble with X hanging up when switching twice to the terminal and back, which vanished sometime during my XFree86 updates. I'm now at Savage driver version 1.1.27, and everything works fine. I didn't manage to enable the rotation feature (complete server hang), but I'd have to retry that. You'd want to enable intel 830 AGP support in the kernel as well.
Chip (ATI Radeon 9000 in docks PCI): ATI Radeon 9000
You will have to enable ati drivers when you compile X. DRI support is present starting from XFree86 4.3.0. However, it segfaulted on my machine until i updated to 18.104.22.1682, so 4.4.0 should work. OpenGL apps were still very slow until i set the R200_NO_TCL environment variable. It disables hardware TCL support, so i guess the driver is still buggy in this field. Now i'm getting framerates a bit below 600 fps with glxgears, which i think is quite ok for a PCI based card in a dock. ...
Harddisk: IBM Travelstar IC25N040ATCS04-0
You may use hdparm to get some little performance improvements.
# hdparm /dev/hda showed that dma and prefetch were already in use.
I also enabled 32bit io and interrupt-unmask and set multicount to 16.
The line looks like this:
# hdparm -c1 -m 16 -u1 /dev/hda .
Somebody wrote that you can also add -X69 as parameter, but I'd suggest to be careful with that, since it highly depends on the drive model you are using and can cause data corruption.
In any case, use the -i option first to get a clou of what your drive supports and what not.
You can also add
idebus=66 to the kernel command line, it might have the same effect.
DVD: Matshita SR-8176
The linux IDE driver has some problem with the firmware of the drive. So you will have to use ide-scsi to make it work. Ofcourse this will disable any attempts of making hot-swapping work, since hdparm -U only works with IDE controlled drives.
CD/RW: TEAC CD-W28E
The drive works great, as CD-Rom as well as for burning. I had one original IBM labelled drive which i gave to a friend and built a second one out of an original TEAC CD-W28E (without Ultrabay frame) and an IBM Ultrabay CD-Rom drive. I took the frame from the CD-Rom, attached it to the CD/RW and everything works just fine. Even though the drive is recognised by cdrecord through the new direct atapi implementation, you might want to use SCSI emulation for performance reasons (xcdroast suggests that). I'll list the modules.conf entries here since it took me a while again to figure out the correct way to do it:
alias scsi_hostadapter ide-scsi alias scd0 sr_mod
Also you should add the line
to /etc/lilo.conf, so that the kernel ide driver doesn't take the drive. Or if you compiled ide-cd as a module, add
options ide-cd ignore='hdc'
to your modules.conf.
Sound: Crystal Semiconductors CS4299 with AC97 codec
Unfortunately this chip doesn't seem to be supported directly neither by the kernel nor by ALSA. There seems to be development on kernel support around the 2.4.21 release, but I don't really have a clue. However, you can use the Intel 8xx driver from the kernel or the according ALSA driver. I didn't have much luck getting the ALSA (0.9.6) stuff to work, but kernel works ok. Sound quality is not the best that way, but at least it works.
LAN: Intel PRO/100 VE
The Kernel Intel EtherExpress PRO/100 driver (eepro100) worked well till recently. Newer kernels (introduced somewhere between 2.4.19 and 2.4.22) have an alternative driver that comes directly from Intel. It offers a lot of options and the PRO/100 VE card is in the list of supported devices. Since my network started to behave strangely (maybe I did something strange during kernel compilation), I switched to the new e100 driver and experienced that it works quite fine.
Unfortunately my model seems to be one without antennas and so I can't use the MiniPCI WLAN cards. But if you belong to the more lucky ones you might want to look at the IBM support page. You can find more information there as well as links that point to the driver homepages for the according cards.
I was able to work with a Linkpro WL-2000-C PCMCIA WLAN card using the Linux-WLAN-NG driver.
You most likely are boarding a Lucent WinModem 56k. Although the kernel now has support for ACP WinModems, it seems it's still lacking a Lucent driver. However, you can find a lot of information on that as well as links to drivers at linmodems.org, or then just try a google search, you will find something for sure. The IBM support site also offers a Lucent driver for Linux, but I don't know if there's source code included.
The chip is a NSC PC87392. (took some time to figure that out) You should set IRDA to enabled in the BIOS settings, since Linux has no way of enabling it when it's in OS controlled mode. The BIOS suggested an io-port of 2f8 and interrupt 3. The interrupt conflicted with a PCMCIA card on my machine, so I changed it to 5, which works fine. The default io of the kernel driver is 3f8, so you might want to change that as well. I decided to leave it and gave according options to the driver.
If you use a recent kernel (2.4.21 or newer) you can use FIR mode by enabling the nsc-ircc kernel driver and adding a line
options nsc-ircc dongle_id=0x09 io=??? irq=?
to your modules.conf.
If you build nsc-ircc as a module and the serial driver into the kernel, you might get the problem, that the kernel has already considered the IRDA port to be a serial device when you want to load the irda driver. I got rid of that by compiling the serial driver as a module also, but you can as well do setserial /dev/ttyS1 uart none to fix it.
Just enable the PCMCIA support in the kernel configuration and with it the cardbus driver and the thing will work great. I tested the Linkpro WL-2000-C WLAN card and a Xircom CardCaddy CompactFlash adapter. Both worked.
I enabled USB support with the alternate UHCI driver in kernel config. It seems to work, at least the kernel recognises the USB controller. I tested my Canon PowerShot S30 with gphoto2 on the USB port of the Thinkpad Dock II (2631) and it works great. I only tried the USB port in the docking station, but if that works, the ones in the notebook should work even better. ;-) Needed packages for USB were usbutils and hotplug. It's worth reading the readme files and having a look at the hotplug scripts, they're not too complex. Also on the gphoto pages there's some documentation about getting the user mode driver to work with hotplug. (I messed around with the hotplug stuff not starting gtkam for quite some time just to figure out in the end that it was just that my X server didn't allow root to connect to it.)
Didn't really test hot-/warm-swapping so far. The notebook gives warn beeps if you try hot-swapping or warm-swapping the module. Look at google to find information about it. Seems like some guys got it to work on different machines. There also seem to be support tools for that.
I tried an UltraPort Camera and brought it to work, a bit unstable however. What you need is the kernel patch from Gutwin. You really need it, don't trust the ultracam driver the kernel offers by default (by compiling the IBM cam module). It seems to offer a lot of features, but it doesn't work at all: you'll get a distorted picture. It seems that the driver itself is fine, but the decoder is broken.
However, Gutwins version works, even though only a subset of features is supported, yet. At least for me it is also a bit unstable. Since he made the patch for a 2.4.20 kernel, you might need to modify Makefile and Config.in by hand after applying the patch. As soon as you compiled the modules, you can modprobe ultracam, start xawtv or whatever and there you go. If you want the driver to be loaded automatically, add the following two lines to your /etc/modules.conf:
alias char-major-81 ultracam alias char-major-81-0 ultracam
Since this is hardware driven it works quite fine.
They work just as normal. There is a very nice utility called tpb (Thinkpad Button) which gives on screen display feedback with xosd and which enables the ThinkPad button (you can configure an application to start). You need to enable /dev/nvram support in the kernel to make it work. A good graphical application for the "ThinkPad" button might be configure-thinkpad, a gnome-frontend for tpctl.
Works as usual. The blue button is recognised as third mouse button as well. Didn't try the tap to click feature, yet. You can do a lot through proper X configuration already, but additionally you might want to look at what the Linux Trackpoint Utilities have to offer you.
Docking Station (Type 2631)
The thing works great. PCMCIA and all the ports were recognised by default. The docks IDE interface is a CMD 648, so you should enable the according kernel option (building as module didn't work for me), if you want to use anything else than a floppy in the docks UltraBay. Note that the interface will most likely be ide2 and ide3 then, so the docks UltraBay drive will be hde. Even though I read about problems with the docks USB ports it worked wonderful for me. At least in the lower port (in the upper one my digital camera seemed not to be realised at all, but that might also have been my fault since I only tried it in early stages). I also managed to get an ATI Radeon 9000 PCI card working in the docks PCI port. Didn't get 3D to work so far, but everything else is just pure cream.
The Thinkpad is APM and ACPI capable. However, I had some trouble with the kernel ACPI drivers (2.4.22). The PCI IRQ routing seems to work quite fine, but the EmbeddedController dependent ACPI modules all end up with errors as well as the processor dependent ones. Only status information that works is the button modules. Some research in the net brought up the impression that there is no solution for this yet and either the kernel support or the IBM BIOS' ACPI must be broken. So it's more sensible to disable ACPI support in the kernel and switch back to APM for the time being.
You most likely want to install tpctl (Thinkpad Control), a nice little tool which you can access your BIOS Power Management settings with.
- This guide is listed at the TuxMobil Linux laptop and notebook installation survey (IBM/Lenovo).