在ThinkPad T23上使用Slackware Linux

--为T23量机定制内核

Author: Cowyn Li

前言

初始安装完slackware之后,他默认的内核里支持了很多功能,有一些并不被T23所支持,有一些功能 也并不需要。

默认内核所占的空间就那么2000K上下,经过自定义内核之后,可以减少到1000K多一点。虽然不一定 一张软盘就能带走,但是,大小不是主要的,去掉内核中不需要的功能,让内核在更纯净的环境下 运行,何乐而不为呢?如果你不这么觉得,就当我有内核洁癖吧:)好了,让我们开始吧。

编译内核

先看看我的T23上有哪些硬件:

  $ sudo lspci -v
  00:00.0 Host bridge: Intel Corporation 82830 830 Chipset Host Bridge (rev 02)
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: bus master, fast devsel, latency 0
          Memory at d0000000 (32-bit, prefetchable) [size=256M]
          Capabilities:[40] Vendor Specific Information
          Capabilities: [a0] AGP version 2.0

  00:01.0 PCI bridge: Intel Corporation 82830 830 Chipset AGP Bridge (rev 02) (prog-if 00 [Normal decode])
          Flags: bus master, 66MHz, fast devsel, latency 96
          Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
          Memory behind bridge: c0100000-c01fffff
          Prefetchable memory behind bridge: e0000000-ebffffff

  00:1d.0 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #1) (rev 01) (prog-if 00 [UHCI])
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: bus master, medium devsel, latency 0, IRQ 11
          I/O ports at 1800 [size=32]

  00:1d.1 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #2) (rev 01) (prog-if 00 [UHCI])
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: bus master, medium devsel, latency 0, IRQ 11
          I/O ports at 1820 [size=32]

  00:1d.2 USB Controller: Intel Corporation 82801CA/CAM USB (Hub #3) (rev 01) (prog-if 00 [UHCI])
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: bus master, medium devsel, latency 0, IRQ 11
          I/O ports at 1840 [size=32]

  00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 41) (prog-if 00 [Normal decode])
          Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=02, subordinate=08, sec-latency=168
          I/O behind bridge: 00002000-00006fff
          Memory behind bridge: c0200000-cfffffff
          Prefetchable memory behind bridge: f0000000-f7ffffff

  00:1f.0 ISA bridge: Intel Corporation 82801CAM ISA Bridge (LPC) (rev 01)
          Flags: bus master, medium devsel, latency 0

  00:1f.1 IDE interface: Intel Corporation 82801CAM IDE U100 (rev 01) (prog-if 8a [Master SecP PriP])
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: bus master, medium devsel, latency 0, IRQ 11
          I/O ports at 01f0 [size=8]
          I/O ports at 03f4 [size=1]
          I/O ports at 0170 [size=8]
          I/O ports at 0374 [size=1]
          I/O ports at 1860 [size=16]
          Memory at 50001000 (32-bit, non-prefetchable) [size=1K]

  00:1f.3 SMBus: Intel Corporation 82801CA/CAM SMBus Controller (rev 01)
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: medium devsel, IRQ 11
          I/O ports at 1880 [size=32]

  00:1f.5 Multimedia audio controller: Intel Corporation 82801CA/CAM AC'97 Audio Controller (rev 01)
          Subsystem: IBM ThinkPad T23 (2647-4MG) or A30/A30p (2652/2653)
          Flags: bus master, medium devsel, latency 0, IRQ 11
          I/O ports at 1c00 [size=256]
          I/O ports at 18c0 [size=64]

  01:00.0 VGA compatible controller: S3 Inc. SuperSavage IX/C SDR (rev 05) (prog-if 00 [VGA])
          Subsystem: IBM ThinkPad T23 (2647-4MG)
          Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 11
          Memory at c0100000 (32-bit, non-prefetchable) [size=512K]
          Memory at e8000000 (32-bit, prefetchable) [size=64M]
          Memory at e4000000 (32-bit, prefetchable) [size=64M]
          Memory at e0000000 (32-bit, prefetchable) [size=32M]
          [virtual] Expansion ROM at e2000000 [disabled] [size=64K]
          Capabilities: [dc] Power Management version 2
          Capabilities: [80] AGP version 2.0

  02:00.0 CardBus bridge: Texas Instruments PCI1420
          Subsystem: IBM ThinkPad T23 (2647-4MG)
          Flags: bus master, medium devsel, latency 64, IRQ 11
          Memory at 50000000 (32-bit, non-prefetchable) [size=4K]
          Bus: primary=02, secondary=03, subordinate=06, sec-latency=176
          Memory window 0: f0000000-f3fff000 (prefetchable) Memory window 1:
          c4000000-c7fff000 (prefetchable)
          I/O window 0: 00002000-000020ff
          I/O window 1: 00002400-000024ff
          16-bit legacy interface ports at 0001

  02:00.1 CardBus bridge: Texas Instruments PCI1420
          Subsystem: IBM ThinkPad T23 (2647-4MG)
          Flags: bus master, medium devsel, latency 64, IRQ 11
          Memory at 51000000 (32-bit, non-prefetchable) [size=4K]
          Bus: primary=02, secondary=07, subordinate=07, sec-latency=176
          Memory window 0: f4000000-f7fff000 (prefetchable)
          Memory window 1: c8000000-cbfff000 (prefetchable)
          I/O window 0: 00002800-000028ff
          I/O window 1: 00002c00-00002cff
          16-bit legacy interface ports at 0001

  02:02.0 Network controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
          Subsystem: Unknown device 17ab:8331
          Flags: bus master, medium devsel, latency 168, IRQ 11
          Memory at c0200000 (32-bit, non-prefetchable) [size=64K]
          Capabilities: [44] Power Management version 2

  02:08.0 Ethernet controller: Intel Corporation 82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller (rev 41)
          Subsystem: IBM ThinkPad A/T/X Series
          Flags: bus master, medium devsel, latency 66, IRQ 11
          Memory at c0210000 (32-bit, non-prefetchable) [size=4K]
          I/O ports at 6000 [size=64]
          Capabilities: [dc] Power Management version 2
		      

我编译内核的习惯是(2.6内核):

  1. #cd /usr/src
  2. #tar jxvf linux-x.x.x.tar.bz2
  3. #ln -s linux-x.x.x linux
  4. #cd linux
  5. #make menuconfig
  6. #make
  7. #make modules_install
  8. #cp arch/i386/boot/bzImage /boot/vmlinuz-x.x.x
  9. #cp System.map /boot/System.map-x.x.x
  10. #cp .config /boot/config-x.x.x

这里我采用目前最新的stable 2.6.20.4内核源码编译,每一项的选择过程我就不详细描述了。

附注

  1. 如果需要支持2631 DOCK Station,则将
    	-> Device Drivers
    	  -> ATA/ATAPI/MFM/RLL support
    	    -> ATA/ATAPI/MFM/RLL support
    	      -> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
    	        -> PCI IDE chipset support
    	          -> Generic PCI bus-master DMA support
                
    里面的CMD64{3|6|8|9} chipset support加进内核。2631 Dock的USB接口一直没法使用,我还没找到 解决的办法。
  2. 由于我没有PCMCIA设备,原Mini-PCI插槽的MODEM被替换成了Atheros Communications, Inc. AR5212 802.11abg无线网卡,上面的.config文件去掉了对PCMCIA和MODEM的支持,并加入了无线 模块,但是没有添加任何无线网卡的驱动。这块Atheros无线网卡我后来用MadWIFI驱动。

Valid XHTML | ©2010 dOtImes.cOm, All rights reserved. | Creative Commons | Powered by Slackware, Nginx. Posted and Maintained by Cowyn Li
Last Update: Monday, 2008-11-17, 15:46, GMT+0800.