LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 4077|回复: 36

编译 2.6.27 内核 for thinkpad R60 + 最新 intel 集成显示驱动 x11-drivers/xf86-

[复制链接]
发表于 2008-10-21 22:19:38 | 显示全部楼层 |阅读模式
[size=+2]一、前言

本文带有强烈的个人主观意见和信仰色彩,可能会引起读者不快,如果您不想影响您的情绪,请勿继续阅读。

本文旨在为 Thinkpad R60 用户提供一份非权威关于编译内核初步配置系统的参考。

我内核针对 thinkpad R60E
  1. shuge ~ # lspci
  2. 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
  3. 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
  4. 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
  5. 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
  6. 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
  7. 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
  8. 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
  9. 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
  10. 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
  11. 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
  12. 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
  13. 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
  14. 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
  15. 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
  16. 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
  17. 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
  18. 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
  19. 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 21)
  20. 15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
复制代码



配置、编译内核前:

  • 备份好您硬盘上资料,我不能担保不出现任何故障
  • 请确保您的计算机可以访问因特网,以便遇到困难时可搜索资料: www.google.com -> Preferences -> Interface Language -> English, Save Preferences。
    上面是设置使用美国 google.com,而不是使用经过过滤干扰中国 g.cn。此方法在您看本文时,可能已经失效。如果您不明白我为什么这样做,请查阅
    skyx 的相关文章 https://forum.ubuntu.com.cn/view ... 1d2582595921cc975ba
  • 您必须有一个可用的 Gentoo GNU/Linux 系统,或者其它 GNU/Linux 发行版。




如果本文和 Linux 内核文档或者 Gentoo 官方手册有冲突,则以后两者文档为准。
http://www.kernel.org/doc
http://www.gentoo.org/doc



[size=+2]二、配置编译内核


[size=+1]设置环境变量(可选)
  1. shuge ~ # cat .profile
  2. alias c="clear "
  3. alias cscope="EDITOR=vim cscope "
  4. alias d="emerge -C "
  5. alias e="emerge -av "
  6. alias g="grep ./* -r -n -e "
  7. alias h="history "
  8. alias m="make "
  9. alias n="pppoe-start "
  10. alias r="rm -i "
  11. alias u="emerge --sync "
  12. alias z="zhcon --utf8 "
复制代码



[size=+1]设置 make.conf
  1. # shuge ~ cat /etc/make.conf
  2. # These settings were set by the catalyst build script that automatically
  3. # built this stage.
  4. # Please consult /etc/make.conf.example for a more detailed example.
  5. CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
  6. CXXFLAGS="${CFLAGS}"
  7. CHOST="i686-pc-linux-gnu"
  8. MAKEOPTS="-j2"
  9. #LDFLAGS="-Wl,-O1 -Wl,--as-needed"
  10. ACCEPT_KEYWORDS="~x86"
  11. VIDEO_CARDS="i810 vesa fbdev"
  12. ALSA_CARDS="intel8x0"
  13. #INPUT_DEVICES="mouse keyboard"
  14. LINGUAS="zh_CN zh en_US"
  15. FETCHCOMMAND="/usr/bin/axel -a -n2 \${URI} -o \${DISTDIR}"
  16. RESUMECOMMAND="/usr/bin/axel -a -n2 \${URI} -o \${DISTDIR}"
  17. FEATURES="ccache parallel-fetch sandbox"
  18. #FEATURES="parallel-fetch"
  19. USE="cjk -ipv6 nls xfce mp3 rmvb ogg emacs laptop apm ffmpeg -print -cups \
  20.      -bluetooth linguas_zh_CN kipi apache php5 mysql pmu jpeg2k \
  21.      threads mmx sse sse2 ssse3 tpctlir flac profile wubi -midi \
  22.      -pulseaudio"
  23. GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo \
  24. http://mirror.averse.net/pub/gentoo/ http://mirror.gentoo.gr.jp"
  25. SYNC="rsync://mirror.averse.net/gentoo-portage"
  26. source /usr/local/portage/layman/make.conf
复制代码



[size=+1]安装内核源码
Gentoo 提供多个可选的内核源码。对于 x86 架构系统,应使用 gentoo-sources (包含增加了额外功能的补丁)
http://www.gentoo.org/doc/zh_cn/ ... l?part=1&chap=7
  1. shuge ~ # u && e gentoo-sources app-admin/eselect
复制代码



[size=+1]设置文件夹链接
  1. shuge ~ # eselect kernel list
  2. shuge ~ # eselect kernel set linux-x.y.z-gentoo*
复制代码



[size=+1]检验文件夹链接
  1. shuge ~ # ln -l /usr/src
  2. ... linux -> /usr/src/linux-x.y.zz-gentoo*
复制代码


注意:
当 /usr/src/linux 下存在多个版本内核码代码和已编译内核的文件时,总大小可能超过 2G。建议系统根分区大于20G,除非您懂得将不同的分区分别挂载到不同目录。

对于 Gentoo GNU/Linux 这种基于源代码发行的系统,我建议分区为:
  1. /       20G ++
  2. swap    内存 * 2,如果内存 1G 以上,则分 2G  给 swap
  3. /home   除 / 和 swap 的以外容量
复制代码


[size=+1]清理以前编译留下的临时文件(可选)
  1. shuge ~ # cd /usr/src/linux
  2. shuge ~ # make mrproper
复制代码


[size=+1]基于旧内核构建

如果想在现在使用的旧内核基础上构建新内核,则需先把旧内核的 .config 文件复制过来(可选)
  1. shuge ~ # cp /boot/config-`uname -r` ./.config
复制代码


基于旧 .onfig 构建时,为了一次编译可成功启动和使用,请遵循下面原则:

  • 旧内核已经选用了某个选项,如果您没用充分的理由,不要随便改动
  • 默认已经构选了某个选项,如果您没用充分的理由,不要随便改动


这样内核不那么精简,但是不容易出现问题。

注:
我之前是使用 Gentoo GNU/Linux 2008.0 Beta2 Live CD 安装,可能由于我中途安装失败后,又乱改的原因,我在/boot/下没有找到旧内核的配置文件。所以,我是没有基于旧内核重新编译的。




[size=+1]安装必需软件

默认地,gentoo 会安装 gcc , make 等等必要的编译工具。如果没有,请自己查阅资料安装。




[size=+1]推荐安装软件(可选)

处理 PCI 总线设备的实用程序,用于查看硬件厂商和型号。
  1. shuge ~ # e sys-apps/pciutils
复制代码

USB 列举实用程序,用于查看 USB 设备。
  1. shuge ~ # e sys-apps/usbutils
复制代码



[size=+1]开始配置和编译内核
  1. shuge ~ # make xconfig
复制代码

注意:
`make xconfig` 依赖 qt3。以下文章假定您系统已经有 qt3 相应软件包。如果您运行 make xconfig 出错,请自己查阅资料安装相应软件包。


内核选项意义:
  1. Y -- 圆中点,将该功能编译进内核
  2. N -- 方块中一勾,不将该功能编译进内核
  3. M -- 将该功能编译成可以在需要时动态插入到内核中的模块
  4.   -- 空就是不要
复制代码


[size=+1]哪些应该编译成模块,哪些应该编译进内核呢?

一些基本不会变、非常重要的应该编译成内核(比如文件系统),其它的都可以编译成模块。内核是一个整体,编译进内核的选项越多,内核体积也越大、效率也越低、漏洞也越多。
如果您使用笔记本并且使用电池启动机器,那么,内核越大,它就越耗电。
编译成模块还有一个好处,当这个驱动有新版本时,您只需要升级和重新编译那个模块,然后加载到内核即可使用,而不必重新编译整个内核。

部分选项含义可以参考 金步国先生 翻译的资料(注意他提供的是基于 2.6.19 版本的翻译,和新内核可能会有差异):
http://lamp.linux.gov.cn/Linux/kernel_options.html



必须启用的选项(否则 Gentoo 将不能正常运行或者根本不能运行):

(全部编译进内核)
  1. Processor type and features
  2.     Symmetric multi-processing support (SMP)
  3.     Processor family
  4. File systems
  5.     Ext3 journalling file system support (EXT3_FS)
  6.     Filesystem in Userspace support (FUSE_FS)
  7.     Pseudo Filesystems
  8.         /proc file system support
  9.         Virtual memory file system support (former shm fs)
复制代码



(针对 Thinkpad)

CTRL + F,搜索“ thinkpad ”
  1. ThinkPad ACPI Laptop Extras (THINKPAD_ACPI)  M
  2. Verbose debug mode (THINKPAD_ACPI_DEBUG) N
复制代码
除以上两项,其它全部 Y


搜索“ Video ”
可以 M 的 勾选 M,否则全部 Y

注意“ Video ”选项:
2.6.27 和 2.6.27 以前有点不一样。请参考 http://jdkcn.com/entry/enable-fn-in-kernel-2-6-27.html
  1. /dev/nvram support (NVRAM) M
复制代码



(以下既可以编译进内核,也可以编译成模块。我编译成模块)
  1. Device Drivers
  2.     HID Devices
  3.         USB Human Interface Device (full HID) support
  4. Device Drivers
  5.     Network device support (NETDEVICES)
  6.         PPP (point-to-point protocol) support (PPP)
  7.             PPP support for async serial ports (PPP_ASYNC)
  8.             PPP support for sync tty ports (PPP_SYNC_TTY)
  9.             PPP over Ethernet (EXPERIMENTAL) (PPPOE)
  10.     Sound card support (SOUND)
  11.         Advanced Linux Sound Architecture (SND)
  12.             PCI sound devices (SND_PCI)
  13.                 Intel HD Audio (SND_HDA_INTEL)
复制代码


(其它)

普通用户可以放心去掉
  1. General setup
  2.     POSIX Message Queues
  3.     Cpuset Support
  4.     Create deprecated sysfs files
  5.     Kernel->user space relay support (formerly relayfs)
复制代码


在“ Block layer ”里,假如没有 2TB 或以上的硬盘,去掉:
  1. Support for Large Block Devices
复制代码
在“ Timer frequency ”里,选择 1000Hz 以提高 GUI 响应

  1. PCI Express support  老式机器没有PCI-E设备,选 N
  2. ISA support  较新的新机器没有ISA设备,选 N
  3. MCA support  选 N
  4. NatSemi SCx200 support 一般选 N
  5. PCI Hotplug Support
  6. Support for PCI Hotplug (EXPERIMENTAL) 如果没有PCI热插拔设备,选 N
复制代码

  1. ATA/ATAPI/MFM/RLL support
  2. Include IDE/ATA-2 DISK support  如果您的/boot是放在IDE硬盘上,那么这里一定要选 Y,选 M 不行。否则启动时会出现“ waiting for root file system ”的提示而停滞不前。
复制代码

  1. SCSI device support   SATA 硬盘/设备支持,就选 Y
复制代码
  1. SCSI disk support  如果您的 /boot 放在 SATA 硬盘上,一定要选Y。
复制代码

  1. Character devices
  2. I2C support  一般可以选Y或者M
  3. Graphics support  不建议把显卡驱动编译进内核,选 M
  4. VESA VGA graphics support 我的机器显卡是ati 3d lt,linux 里面的型号定为 mach64,我发现除了自己的显卡选项,一定要选择这项,编译进内核,如果不选,显示出现问题。如果您不确定的话,选上吧。
复制代码

  1. File systems
  2.     CD-ROM/DVD Filesystems
  3.     ISO 9660 CDROM file system support  Y
复制代码

  1. (如果您系统上还有 晕到死 操作系统)
  2.     DOS/FAT/NT Filesystems
  3.         VFAT (Windows-95) fs support  M
  4.             NTFS file system support  NTFS分区 M
  5.             MSDOS fs support (MSDOS_FS)  M
  6.             NTFS write support  NTFS分区写支持 Y
复制代码


全部设置完成后,点击保存设置,关闭后会自动生成 .config 文件,内核的一切都是根据这个文件构建。建议备份。
  1. shuge ~ # cp /usr/src/linux/.config  /root/.config`date +%y%m%d_%H%M`
复制代码


[size=+1]开始编译进程
(第一次编译需要 2~4 小时不等,以后基于模块更改时重新编译需要 1分钟 ~ 30分钟)
  1. shuge ~ #  make && make modules_install
复制代码



[size=+1]复制新内核到相应目录

现在,您可以去图书馆看看书,或者找女友聊聊天逛逛街,或者去运动,反正不要盯着屏幕 :-D

进程完成后,
  1. shuge ~ # cp arch/i386/boot/bzImage /boot/*-`date +%y%m%d_%H%M`
复制代码
* 为您喜欢的名字


我的是
  1. shuge ~ # cp arch/i386/boot/bzImage /boot/kernel-2.6.27-081101
复制代码

  1. shuge ~ # ls -sh /boot/
  2.    0 boot
  3. 512 grub
  4. 2.7M kernel-2.6.27-081101
  5. 104K memtest86+.bin
复制代码



[size=+1]配置 GRUB
  1. shuge ~ # cat /boot/grub/menu.lst
  2. title=Gentoo GNU/Linux 2.6.27-081101
  3. root (hd0,1)
  4. kernel /boot/kernel-2.6.27-081101  root=/dev/sda2
复制代码



最后重启测试。



注:
如果编译完内核后,希望修改某些模块(M)选项或者进内核的选项,执行
  1. shuge ~ # cd /usr/src/linux
  2. shuge ~ # make xconfig
复制代码

然后(不要执行 make mrproper )直接执行编译命令
  1. shuge ~ # make && make modules_install
复制代码

这样可以节省大量时间和能源。




[size=+2]三、显卡驱动
  1. shuge ~ # e =x11-drivers/xf86-video-i810-2.4.2-r3
复制代码


注意:
<s>不要安装版本 2.5.0,因为在登陆 KDE 桌面环境后,再 CTRL + ALT + Fx 切换时会黑屏假死,或者显示“ (EE) intel(0): underrun on pipe B! ”并假死。</s>, >=2.5.3 版本已经修正这个BUG


安装完后,它会自动设置好 /etc/X11/xorg.conf 。
  1. shuge ~ # cat /etc/X11/xorg.conf
复制代码
  1. Section "ServerLayout"
  2.     Identifier  "X.Org Configured"
  3.     Screen  0   "Screen0" 0 0
  4.     InputDevice "Keyboard0" "CoreKeyboard"
  5.     InputDevice "PS/2 Mouse" "AlwaysCore"
  6. # Serial Mouse not detected
  7.     InputDevice "USB Mouse" "AlwaysCore"
  8. #No Synaptics touchpad found
  9. EndSection
  10. Section "ServerFlags"
  11.     Option  "AllowMouseOpenFail" "true"
  12.    
  13. EndSection
  14. Section "Files"
  15.     FontPath    "/usr/share/fonts/util"
  16.     FontPath    "/usr/share/fonts/encodings"
  17.     FontPath    "/usr/share/fonts/misc"
  18.     FontPath    "/usr/share/fonts/local"
  19.     FontPath    "/usr/share/fonts/terminus"
  20.     FontPath    "/usr/share/fonts/corefonts"
  21.     FontPath    "/usr/local/share/fonts"
  22.     FontPath    "/usr/share/fonts/default"
  23.     FontPath    "/usr/share/fonts/TTF"
  24.     FontPath    "/usr/share/fonts/type1"
  25.     FontPath    "/usr/share/fonts/100dpi"
  26.     FontPath    "/usr/share/fonts/75dpi"
  27.     FontPath    "/usr/share/fonts/arphicfonts"
  28.     FontPath    "/usr/share/fonts/jisx0213"
  29.     FontPath    "/usr/share/fonts/shinonome"
  30.     FontPath    "/usr/share/fonts/baekmuk-fonts"
  31.     FontPath    "/usr/share/fonts/kacst-fonts"
  32.     FontPath    "/usr/share/fonts/sgi-fonts"
  33.     FontPath    "/usr/share/fonts/unfonts"
  34.     FontPath    "/usr/share/fonts/default/ghostscript"
  35.     FontPath    "/usr/share/fonts/xfonts-cronyx-100dpi:unscaled"
  36.     FontPath    "/usr/share/fonts/xfonts-cronyx-75dpi:unscaled"
  37.     FontPath    "/usr/share/fonts/xfonts-cronyx-misc:unscaled"
  38.     FontPath    "/usr/share/fonts/xfonts-cronyx-100dpi"
  39.     FontPath    "/usr/share/fonts/xfonts-cronyx-75dpi"
  40.     FontPath    "/usr/share/fonts/xfonts-cronyx-misc"
  41.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi:unscaled"
  42.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi:unscaled"
  43.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-misc:unscaled"
  44.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi"
  45.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi"
  46.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-misc"
  47.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi:unscaled"
  48.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi:unscaled"
  49.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-misc:unscaled"
  50.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi"
  51.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi"
  52.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-misc"
  53.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi:unscaled"
  54.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi:unscaled"
  55.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-misc:unscaled"
  56.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi"
  57.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi"
  58.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-misc"
  59.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi:unscaled"
  60.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi:unscaled"
  61.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-misc:unscaled"
  62.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi"
  63.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi"
  64.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-misc"
  65. EndSection
  66. Section "Module"
  67.     Load    "ddc"
  68.     Load    "vbe"
  69.     Load    "GLcore"
  70.     Load    "dbe"
  71.     Load    "dri"
  72.     Load    "extmod"
  73.     Load    "glx"
  74.     Load    "bitmap"
  75. #   Load    "type1"
  76.     Load    "freetype"
  77.     Load    "record"
  78. EndSection
  79. Section "InputDevice"
  80.     Identifier  "Keyboard0"
  81.     Driver  "kbd"
  82.     Option  "CoreKeyboard"
  83.     Option  "XkbRules" "xorg"
  84.     Option  "XkbModel" "pc105"
  85. #   Option  "XkbOptions" "grp:toggle,grp_led:scroll"
  86.     Option  "XkbVariant" ",winkeys"
  87.     Option  "XkbLayout" ""
  88. EndSection
  89. Section "InputDevice"
  90.     Identifier  "Serial Mouse"
  91.     Driver  "mouse"
  92.     Option  "Protocol" "Microsoft"
  93.     Option  "Device" "/dev/ttyS0"
  94.     Option  "Emulate3Buttons" "true"
  95.     Option  "Emulate3Timeout" "70"
  96.     Option  "SendCoreEvents"  "true"
  97. EndSection
  98. Section "InputDevice"
  99.     Identifier  "PS/2 Mouse"
  100.     Driver  "mouse"
  101.     Option  "Protocol" "IMPS/2"
  102.     Option  "Device" "/dev/misc/psaux"
  103.     Option  "Emulate3Buttons" "true"
  104.     Option  "Emulate3Timeout" "70"
  105.     Option  "SendCoreEvents"  "true"
  106.     Option  "ZAxisMapping" "4 5"
  107. EndSection
  108. Section "InputDevice"
  109.     Identifier  "USB Mouse"
  110.     Driver  "mouse"
  111.     Option  "Device" "/dev/input/mice"
  112.     Option  "SendCoreEvents" "true"
  113.     Option  "Protocol" "IMPS/2"
  114.     Option  "ZAxisMapping" "4 5"
  115.     Option  "Buttons" "5"
  116. EndSection
  117. Section "InputDevice"
  118.     Identifier  "Synaptics"
  119.     Driver  "synaptics"
  120.     Option  "Protocol" "event"
  121.     Option  "Device" ""
  122.     Option  "LeftEdge" "1900"
  123.     Option  "RightEdge" "5400"
  124.     Option  "TopEdge" "1900"
  125.     Option  "BottomEdge" "4000"
  126.     Option  "FingerLow" "25"
  127.     Option  "FingerHigh" "30"
  128.     Option  "MaxTapTime" "180"
  129.     Option  "MaxTapMove" "220"
  130.     Option  "VertScrollDelta" "100"
  131.     Option  "MinSpeed" "0.02"
  132.     Option  "MaxSpeed" "0.10"
  133.     Option  "AccelFactor" "0.0010"
  134.     Option  "SHMConfig" "on"
  135. EndSection
  136. # Auto-generated by mkxf86config
  137. Section "Monitor"
  138.     Identifier   "Monitor0"
  139.     HorizSync    28.0 - 96.0
  140.     VertRefresh  50.0 - 75.0
  141. EndSection
  142. Section "Device"
  143.     ### Available Driver options are:-
  144.     # sw_cursor is needed for some ati and radeon cards
  145.     #Option     "sw_cursor"
  146.     #Option     "hw_cursor"
  147.     #Option     "NoAccel"
  148.     #Option     "ShowCache"
  149.     #Option     "ShadowFB"
  150.     #Option     "UseFBDev"
  151.     #Option     "Rotate"
  152.     #Option     "MonitorLayout" "LVDS, NONE"
  153.     Identifier  "Card0"
  154.     # The following line is auto-generated by x11-misc/mkxf86config
  155.     Driver      "intel"
  156.     VendorName  "All"
  157.     BoardName   "All"
  158. #   BusID       "PCI:1:0:0"
  159. EndSection
  160. Section "Screen"
  161.     Identifier  "Screen0"
  162.     Device  "Card0"
  163.     Monitor "Monitor0"
  164.     DefaultColorDepth 24
  165.     SubSection "Display"
  166.         Depth   1
  167.         Modes "1024x768" "800x600" "640x480"
  168.     EndSubSection
  169.     SubSection "Display"
  170.         Depth   4
  171.         Modes "1024x768" "800x600" "640x480"
  172.     EndSubSection
  173.     SubSection "Display"
  174.         Depth   8
  175.         Modes "1024x768" "800x600" "640x480"
  176.     EndSubSection
  177.     SubSection "Display"
  178.         Depth   15
  179.         Modes "1024x768" "800x600" "640x480"
  180.     EndSubSection
  181.     SubSection "Display"
  182.         Depth   16
  183.         Modes "1024x768" "800x600" "640x480"
  184.     EndSubSection
  185.     SubSection "Display"
  186.         Depth   24
  187.         Modes "1024x768" "800x600" "640x480"
  188.     EndSubSection
  189.     SubSection "Display"
  190.         Depth   32
  191.         Modes "1024x768" "800x600" "640x480"
  192.     EndSubSection
  193. EndSection
  194. Section "DRI"
  195.     Mode 0666
  196. EndSection
  197. Section "Extensions"
  198.     Option  "Composite"  "Enable"
  199. EndSection
复制代码
 楼主| 发表于 2008-10-21 22:29:20 | 显示全部楼层
[size=+2]一、前言

本文带有强烈的个人主观意见和信仰色彩,可能会引起读者不快,如果您不想影响您的情绪,请勿继续阅读。

本文旨在为 Thinkpad R60 用户提供一份非权威关于编译内核初步配置系统的参考。

我内核针对 thinkpad R60E
  1. shuge ~ # lspci
  2. 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
  3. 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
  4. 00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
  5. 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
  6. 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
  7. 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)
  8. 00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
  9. 00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 02)
  10. 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)
  11. 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)
  12. 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)
  13. 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)
  14. 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
  15. 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
  16. 00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
  17. 00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)
  18. 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
  19. 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 21)
  20. 15:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
复制代码



配置、编译内核前:

  • 备份好您硬盘上资料,我不能担保不出现任何故障
  • 请确保您的计算机可以访问因特网,以便遇到困难时可搜索资料: www.google.com -> Preferences -> Interface Language -> English, Save Preferences。
    上面是设置使用美国 google.com,而不是使用经过过滤干扰中国 g.cn。此方法在您看本文时,可能已经失效。如果您不明白我为什么这样做,请查阅
    skyx 的相关文章 https://forum.ubuntu.com.cn/view ... 1d2582595921cc975ba
  • 您必须有一个可用的 Gentoo GNU/Linux 系统,或者其它 GNU/Linux 发行版。




如果本文和 Linux 内核文档或者 Gentoo 官方手册有冲突,则以后两者文档为准。
http://www.kernel.org/doc
http://www.gentoo.org/doc



[size=+2]二、配置编译内核


[size=+1]设置环境变量(可选)
  1. shuge ~ # cat .profile
  2. alias c="clear "
  3. alias cscope="EDITOR=vim cscope "
  4. alias d="emerge -C "
  5. alias e="emerge -av "
  6. alias g="grep ./* -r -n -e "
  7. alias h="history "
  8. alias m="make "
  9. alias n="pppoe-start "
  10. alias r="rm -i "
  11. alias u="emerge --sync "
  12. alias z="zhcon --utf8 "
复制代码



[size=+1]设置 make.conf
  1. # shuge ~ cat /etc/make.conf
  2. # These settings were set by the catalyst build script that automatically
  3. # built this stage.
  4. # Please consult /etc/make.conf.example for a more detailed example.
  5. CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
  6. CXXFLAGS="${CFLAGS}"
  7. CHOST="i686-pc-linux-gnu"
  8. MAKEOPTS="-j2"
  9. #LDFLAGS="-Wl,-O1 -Wl,--as-needed"
  10. ACCEPT_KEYWORDS="~x86"
  11. VIDEO_CARDS="i810 vesa fbdev"
  12. ALSA_CARDS="intel8x0"
  13. #INPUT_DEVICES="mouse keyboard"
  14. LINGUAS="zh_CN zh en_US"
  15. FETCHCOMMAND="/usr/bin/axel -a -n2 \${URI} -o \${DISTDIR}"
  16. RESUMECOMMAND="/usr/bin/axel -a -n2 \${URI} -o \${DISTDIR}"
  17. FEATURES="ccache parallel-fetch sandbox"
  18. #FEATURES="parallel-fetch"
  19. USE="cjk -ipv6 nls xfce mp3 rmvb ogg emacs laptop apm ffmpeg -print -cups \
  20.      -bluetooth linguas_zh_CN kipi apache php5 mysql pmu jpeg2k \
  21.      threads mmx sse sse2 ssse3 tpctlir flac profile wubi -midi \
  22.      -pulseaudio"
  23. GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo \
  24. http://mirror.averse.net/pub/gentoo/ http://mirror.gentoo.gr.jp"
  25. SYNC="rsync://mirror.averse.net/gentoo-portage"
  26. source /usr/local/portage/layman/make.conf
复制代码



[size=+1]安装内核源码
Gentoo 提供多个可选的内核源码。对于 x86 架构系统,应使用 gentoo-sources (包含增加了额外功能的补丁)
http://www.gentoo.org/doc/zh_cn/ ... l?part=1&chap=7
  1. shuge ~ # u && e gentoo-sources app-admin/eselect
复制代码



[size=+1]设置文件夹链接
  1. shuge ~ # eselect kernel list
  2. shuge ~ # eselect kernel set linux-x.y.z-gentoo*
复制代码



[size=+1]检验文件夹链接
  1. shuge ~ # ln -l /usr/src
  2. ... linux -> /usr/src/linux-x.y.zz-gentoo*
复制代码


注意:
当 /usr/src/linux 下存在多个版本内核码代码和已编译内核的文件时,总大小可能超过 2G。建议系统根分区大于20G,除非您懂得将不同的分区分别挂载到不同目录。

对于 Gentoo GNU/Linux 这种基于源代码发行的系统,我建议分区为:
  1. /       20G ++
  2. swap    内存 * 2,如果内存 1G 以上,则分 2G  给 swap
  3. /home   除 / 和 swap 的以外容量
复制代码


[size=+1]清理以前编译留下的临时文件(可选)
  1. shuge ~ # cd /usr/src/linux
  2. shuge ~ # make mrproper
复制代码


[size=+1]基于旧内核构建

如果想在现在使用的旧内核基础上构建新内核,则需先把旧内核的 .config 文件复制过来(可选)
  1. shuge ~ # cp /boot/config-`uname -r` ./.config
复制代码


基于旧 .onfig 构建时,为了一次编译可成功启动和使用,请遵循下面原则:

  • 旧内核已经选用了某个选项,如果您没用充分的理由,不要随便改动
  • 默认已经构选了某个选项,如果您没用充分的理由,不要随便改动


这样内核不那么精简,但是不容易出现问题。

注:
我之前是使用 Gentoo GNU/Linux 2008.0 Beta2 Live CD 安装,可能由于我中途安装失败后,又乱改的原因,我在/boot/下没有找到旧内核的配置文件。所以,我是没有基于旧内核重新编译的。




[size=+1]安装必需软件

默认地,gentoo 会安装 gcc , make 等等必要的编译工具。如果没有,请自己查阅资料安装。




[size=+1]推荐安装软件(可选)

处理 PCI 总线设备的实用程序,用于查看硬件厂商和型号。
  1. shuge ~ # e sys-apps/pciutils
复制代码

USB 列举实用程序,用于查看 USB 设备。
  1. shuge ~ # e sys-apps/usbutils
复制代码



[size=+1]开始配置和编译内核
  1. shuge ~ # make xconfig
复制代码

注意:
`make xconfig` 依赖 qt3。以下文章假定您系统已经有 qt3 相应软件包。如果您运行 make xconfig 出错,请自己查阅资料安装相应软件包。


内核选项意义:
  1. Y -- 圆中点,将该功能编译进内核
  2. N -- 方块中一勾,不将该功能编译进内核
  3. M -- 将该功能编译成可以在需要时动态插入到内核中的模块
  4.   -- 空就是不要
复制代码


[size=+1]哪些应该编译成模块,哪些应该编译进内核呢?

一些基本不会变、非常重要的应该编译成内核(比如文件系统),其它的都可以编译成模块。内核是一个整体,编译进内核的选项越多,内核体积也越大、效率也越低、漏洞也越多。
如果您使用笔记本并且使用电池启动机器,那么,内核越大,它就越耗电。
编译成模块还有一个好处,当这个驱动有新版本时,您只需要升级和重新编译那个模块,然后加载到内核即可使用,而不必重新编译整个内核。

部分选项含义可以参考 金步国先生 翻译的资料(注意他提供的是基于 2.6.19 版本的翻译,和新内核可能会有差异):
http://lamp.linux.gov.cn/Linux/kernel_options.html



必须启用的选项(否则 Gentoo 将不能正常运行或者根本不能运行):

(全部编译进内核)
  1. Processor type and features
  2.     Symmetric multi-processing support (SMP)
  3.     Processor family
  4. File systems
  5.     Ext3 journalling file system support (EXT3_FS)
  6.     Filesystem in Userspace support (FUSE_FS)
  7.     Pseudo Filesystems
  8.         /proc file system support
  9.         Virtual memory file system support (former shm fs)
复制代码



(针对 Thinkpad)

CTRL + F,搜索“ thinkpad ”
  1. ThinkPad ACPI Laptop Extras (THINKPAD_ACPI)  M
  2. Verbose debug mode (THINKPAD_ACPI_DEBUG) N
复制代码
除以上两项,其它全部 Y


搜索“ Video ”
可以 M 的 勾选 M,否则全部 Y

注意“ Video ”选项:
2.6.27 和 2.6.27 以前有点不一样。请参考 http://jdkcn.com/entry/enable-fn-in-kernel-2-6-27.html
  1. /dev/nvram support (NVRAM) M
复制代码



(以下既可以编译进内核,也可以编译成模块。我编译成模块)
  1. Device Drivers
  2.     HID Devices
  3.         USB Human Interface Device (full HID) support
  4. Device Drivers
  5.     Network device support (NETDEVICES)
  6.         PPP (point-to-point protocol) support (PPP)
  7.             PPP support for async serial ports (PPP_ASYNC)
  8.             PPP support for sync tty ports (PPP_SYNC_TTY)
  9.             PPP over Ethernet (EXPERIMENTAL) (PPPOE)
  10.     Sound card support (SOUND)
  11.         Advanced Linux Sound Architecture (SND)
  12.             PCI sound devices (SND_PCI)
  13.                 Intel HD Audio (SND_HDA_INTEL)
复制代码


(其它)

普通用户可以放心去掉
  1. General setup
  2.     POSIX Message Queues
  3.     Cpuset Support
  4.     Create deprecated sysfs files
  5.     Kernel->user space relay support (formerly relayfs)
复制代码


在“ Block layer ”里,假如没有 2TB 或以上的硬盘,去掉:
  1. Support for Large Block Devices
复制代码
在“ Timer frequency ”里,选择 1000Hz 以提高 GUI 响应

  1. PCI Express support  老式机器没有PCI-E设备,选 N
  2. ISA support  较新的新机器没有ISA设备,选 N
  3. MCA support  选 N
  4. NatSemi SCx200 support 一般选 N
  5. PCI Hotplug Support
  6. Support for PCI Hotplug (EXPERIMENTAL) 如果没有PCI热插拔设备,选 N
复制代码

  1. ATA/ATAPI/MFM/RLL support
  2. Include IDE/ATA-2 DISK support  如果您的/boot是放在IDE硬盘上,那么这里一定要选 Y,选 M 不行。否则启动时会出现“ waiting for root file system ”的提示而停滞不前。
复制代码

  1. SCSI device support   SATA 硬盘/设备支持,就选 Y
复制代码
  1. SCSI disk support  如果您的 /boot 放在 SATA 硬盘上,一定要选Y。
复制代码

  1. Character devices
  2. I2C support  一般可以选Y或者M
  3. Graphics support  不建议把显卡驱动编译进内核,选 M
  4. VESA VGA graphics support 我的机器显卡是ati 3d lt,linux 里面的型号定为 mach64,我发现除了自己的显卡选项,一定要选择这项,编译进内核,如果不选,显示出现问题。如果您不确定的话,选上吧。
复制代码

  1. File systems
  2.     CD-ROM/DVD Filesystems
  3.     ISO 9660 CDROM file system support  Y
复制代码

  1. (如果您系统上还有 晕到死 操作系统)
  2.     DOS/FAT/NT Filesystems
  3.         VFAT (Windows-95) fs support  M
  4.             NTFS file system support  NTFS分区 M
  5.             MSDOS fs support (MSDOS_FS)  M
  6.             NTFS write support  NTFS分区写支持 Y
复制代码


全部设置完成后,点击保存设置,关闭后会自动生成 .config 文件,内核的一切都是根据这个文件构建。建议备份。
  1. shuge ~ # cp /usr/src/linux/.config  /root/.config`date +%y%m%d_%H%M`
复制代码


[size=+1]开始编译进程
(第一次编译需要 2~4 小时不等,以后基于模块更改时重新编译需要 1分钟 ~ 30分钟)
  1. shuge ~ #  make && make modules_install
复制代码



[size=+1]复制新内核到相应目录

现在,您可以去图书馆看看书,或者找女友聊聊天逛逛街,或者去运动,反正不要盯着屏幕 :-D

进程完成后,
  1. shuge ~ # cp arch/i386/boot/bzImage /boot/*-`date +%y%m%d_%H%M`
复制代码
* 为您喜欢的名字


我的是
  1. shuge ~ # cp arch/i386/boot/bzImage /boot/kernel-2.6.27-081101
复制代码

  1. shuge ~ # ls -sh /boot/
  2.    0 boot
  3. 512 grub
  4. 2.7M kernel-2.6.27-081101
  5. 104K memtest86+.bin
复制代码



[size=+1]配置 GRUB
  1. shuge ~ # cat /boot/grub/menu.lst
  2. title=Gentoo GNU/Linux 2.6.27-081101
  3. root (hd0,1)
  4. kernel /boot/kernel-2.6.27-081101  root=/dev/sda2
复制代码



最后重启测试。



注:
如果编译完内核后,希望修改某些模块(M)选项或者进内核的选项,执行
  1. shuge ~ # cd /usr/src/linux
  2. shuge ~ # make xconfig
复制代码

然后(不要执行 make mrproper )直接执行编译命令
  1. shuge ~ # make && make modules_install
复制代码

这样可以节省大量时间和能源。




[size=+2]三、显卡驱动
  1. shuge ~ # e =x11-drivers/xf86-video-i810-2.4.3
复制代码


注意:
不要安装版本 2.5,因为在登陆 KDE 桌面环境后,再 CTRL + ALT + Fx
切换时会黑屏假死,或者显示“ (EE) intel(0): underrun on pipe
B!
”并假



安装完后,它会自动设置好 /etc/X11/xorg.conf 。
  1. shuge ~ # cat /etc/X11/xorg.conf
复制代码
  1. Section "ServerLayout"
  2.     Identifier  "X.Org Configured"
  3.     Screen  0   "Screen0" 0 0
  4.     InputDevice "Keyboard0" "CoreKeyboard"
  5.     InputDevice "PS/2 Mouse" "AlwaysCore"
  6. # Serial Mouse not detected
  7.     InputDevice "USB Mouse" "AlwaysCore"
  8. #No Synaptics touchpad found
  9. EndSection
  10. Section "ServerFlags"
  11.     Option  "AllowMouseOpenFail" "true"
  12.    
  13. EndSection
  14. Section "Files"
  15.     FontPath    "/usr/share/fonts/util"
  16.     FontPath    "/usr/share/fonts/encodings"
  17.     FontPath    "/usr/share/fonts/misc"
  18.     FontPath    "/usr/share/fonts/local"
  19.     FontPath    "/usr/share/fonts/terminus"
  20.     FontPath    "/usr/share/fonts/corefonts"
  21.     FontPath    "/usr/local/share/fonts"
  22.     FontPath    "/usr/share/fonts/default"
  23.     FontPath    "/usr/share/fonts/TTF"
  24.     FontPath    "/usr/share/fonts/type1"
  25.     FontPath    "/usr/share/fonts/100dpi"
  26.     FontPath    "/usr/share/fonts/75dpi"
  27.     FontPath    "/usr/share/fonts/arphicfonts"
  28.     FontPath    "/usr/share/fonts/jisx0213"
  29.     FontPath    "/usr/share/fonts/shinonome"
  30.     FontPath    "/usr/share/fonts/baekmuk-fonts"
  31.     FontPath    "/usr/share/fonts/kacst-fonts"
  32.     FontPath    "/usr/share/fonts/sgi-fonts"
  33.     FontPath    "/usr/share/fonts/unfonts"
  34.     FontPath    "/usr/share/fonts/default/ghostscript"
  35.     FontPath    "/usr/share/fonts/xfonts-cronyx-100dpi:unscaled"
  36.     FontPath    "/usr/share/fonts/xfonts-cronyx-75dpi:unscaled"
  37.     FontPath    "/usr/share/fonts/xfonts-cronyx-misc:unscaled"
  38.     FontPath    "/usr/share/fonts/xfonts-cronyx-100dpi"
  39.     FontPath    "/usr/share/fonts/xfonts-cronyx-75dpi"
  40.     FontPath    "/usr/share/fonts/xfonts-cronyx-misc"
  41.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi:unscaled"
  42.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi:unscaled"
  43.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-misc:unscaled"
  44.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-100dpi"
  45.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-75dpi"
  46.     FontPath    "/usr/share/fonts/xfonts-cronyx-cp1251-misc"
  47.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi:unscaled"
  48.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi:unscaled"
  49.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-misc:unscaled"
  50.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-100dpi"
  51.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-75dpi"
  52.     FontPath    "/usr/share/fonts/xfonts-cronyx-isocyr-misc"
  53.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi:unscaled"
  54.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi:unscaled"
  55.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-misc:unscaled"
  56.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-100dpi"
  57.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-75dpi"
  58.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8r-misc"
  59.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi:unscaled"
  60.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi:unscaled"
  61.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-misc:unscaled"
  62.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-100dpi"
  63.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-75dpi"
  64.     FontPath    "/usr/share/fonts/xfonts-cronyx-koi8u-misc"
  65. EndSection
  66. Section "Module"
  67.     Load    "ddc"
  68.     Load    "vbe"
  69.     Load    "GLcore"
  70.     Load    "dbe"
  71.     Load    "dri"
  72.     Load    "extmod"
  73.     Load    "glx"
  74.     Load    "bitmap"
  75. #   Load    "type1"
  76.     Load    "freetype"
  77.     Load    "record"
  78. EndSection
  79. Section "InputDevice"
  80.     Identifier  "Keyboard0"
  81.     Driver  "kbd"
  82.     Option  "CoreKeyboard"
  83.     Option  "XkbRules" "xorg"
  84.     Option  "XkbModel" "pc105"
  85. #   Option  "XkbOptions" "grp:toggle,grp_led:scroll"
  86.     Option  "XkbVariant" ",winkeys"
  87.     Option  "XkbLayout" ""
  88. EndSection
  89. Section "InputDevice"
  90.     Identifier  "Serial Mouse"
  91.     Driver  "mouse"
  92.     Option  "Protocol" "Microsoft"
  93.     Option  "Device" "/dev/ttyS0"
  94.     Option  "Emulate3Buttons" "true"
  95.     Option  "Emulate3Timeout" "70"
  96.     Option  "SendCoreEvents"  "true"
  97. EndSection
  98. Section "InputDevice"
  99.     Identifier  "PS/2 Mouse"
  100.     Driver  "mouse"
  101.     Option  "Protocol" "IMPS/2"
  102.     Option  "Device" "/dev/misc/psaux"
  103.     Option  "Emulate3Buttons" "true"
  104.     Option  "Emulate3Timeout" "70"
  105.     Option  "SendCoreEvents"  "true"
  106.     Option  "ZAxisMapping" "4 5"
  107. EndSection
  108. Section "InputDevice"
  109.     Identifier  "USB Mouse"
  110.     Driver  "mouse"
  111.     Option  "Device" "/dev/input/mice"
  112.     Option  "SendCoreEvents" "true"
  113.     Option  "Protocol" "IMPS/2"
  114.     Option  "ZAxisMapping" "4 5"
  115.     Option  "Buttons" "5"
  116. EndSection
  117. Section "InputDevice"
  118.     Identifier  "Synaptics"
  119.     Driver  "synaptics"
  120.     Option  "Protocol" "event"
  121.     Option  "Device" ""
  122.     Option  "LeftEdge" "1900"
  123.     Option  "RightEdge" "5400"
  124.     Option  "TopEdge" "1900"
  125.     Option  "BottomEdge" "4000"
  126.     Option  "FingerLow" "25"
  127.     Option  "FingerHigh" "30"
  128.     Option  "MaxTapTime" "180"
  129.     Option  "MaxTapMove" "220"
  130.     Option  "VertScrollDelta" "100"
  131.     Option  "MinSpeed" "0.02"
  132.     Option  "MaxSpeed" "0.10"
  133.     Option  "AccelFactor" "0.0010"
  134.     Option  "SHMConfig" "on"
  135. EndSection
  136. # Auto-generated by mkxf86config
  137. Section "Monitor"
  138.     Identifier   "Monitor0"
  139.     HorizSync    28.0 - 96.0
  140.     VertRefresh  50.0 - 75.0
  141. EndSection
  142. Section "Device"
  143.     ### Available Driver options are:-
  144.     # sw_cursor is needed for some ati and radeon cards
  145.     #Option     "sw_cursor"
  146.     #Option     "hw_cursor"
  147.     #Option     "NoAccel"
  148.     #Option     "ShowCache"
  149.     #Option     "ShadowFB"
  150.     #Option     "UseFBDev"
  151.     #Option     "Rotate"
  152.     #Option     "MonitorLayout" "LVDS, NONE"
  153.     Identifier  "Card0"
  154.     # The following line is auto-generated by x11-misc/mkxf86config
  155.     Driver      "intel"
  156.     VendorName  "All"
  157.     BoardName   "All"
  158. #   BusID       "PCI:1:0:0"
  159. EndSection
  160. Section "Screen"
  161.     Identifier  "Screen0"
  162.     Device  "Card0"
  163.     Monitor "Monitor0"
  164.     DefaultColorDepth 24
  165.     SubSection "Display"
  166.         Depth   1
  167.         Modes "1024x768" "800x600" "640x480"
  168.     EndSubSection
  169.     SubSection "Display"
  170.         Depth   4
  171.         Modes "1024x768" "800x600" "640x480"
  172.     EndSubSection
  173.     SubSection "Display"
  174.         Depth   8
  175.         Modes "1024x768" "800x600" "640x480"
  176.     EndSubSection
  177.     SubSection "Display"
  178.         Depth   15
  179.         Modes "1024x768" "800x600" "640x480"
  180.     EndSubSection
  181.     SubSection "Display"
  182.         Depth   16
  183.         Modes "1024x768" "800x600" "640x480"
  184.     EndSubSection
  185.     SubSection "Display"
  186.         Depth   24
  187.         Modes "1024x768" "800x600" "640x480"
  188.     EndSubSection
  189.     SubSection "Display"
  190.         Depth   32
  191.         Modes "1024x768" "800x600" "640x480"
  192.     EndSubSection
  193. EndSection
  194. Section "DRI"
  195.     Mode 0666
  196. EndSection
  197. Section "Extensions"
  198.     Option  "Composite"  "Enable"
  199. EndSection
复制代码


所有配置文件在
http://docs.google.com/Doc?id=d3q8n99_30gnnkvvhq

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2008-10-22 23:36:49 | 显示全部楼层
ding~~
回复 支持 反对

使用道具 举报

发表于 2008-10-22 23:39:12 | 显示全部楼层
幸福的集成显卡用户啊,现在ati的还在被xorg-server 1.5 block呢。。。。
回复 支持 反对

使用道具 举报

发表于 2008-10-23 08:38:23 | 显示全部楼层
支持下楼主:
  1. $ uname -a
  2. Linux xijiao 2.6.27-gentoo-116 #2 SMP Tue Oct 14 13:58:01 CST 2008 x86_64 Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz GenuineIntel GNU/Linux
复制代码

PS: ati 又赶不上 xorg-server 了...... 汗
回复 支持 反对

使用道具 举报

发表于 2008-10-23 08:56:23 | 显示全部楼层
看不懂楼主的帖,是教人编译内核吗?标题和文章内容联系不到一起啊。
回复 支持 反对

使用道具 举报

发表于 2008-10-23 09:39:29 | 显示全部楼层
Post by flyinflash;1897247
解压后的2.6版本内核源码总大小约为1~2G

这是搞笑么?
回复 支持 反对

使用道具 举报

发表于 2008-10-23 11:31:41 | 显示全部楼层
不是ati 8.10驱动出来了?支持xorg 7.4了啊?而且开源驱动可用
回复 支持 反对

使用道具 举报

发表于 2008-10-23 12:44:40 | 显示全部楼层
Post by jarryson;1897974
不是ati 8.10驱动出来了?支持xorg 7.4了啊?而且开源驱动可用


新版程序仍不支持,但在magic那里看到有放出来的支持补丁。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-23 16:23:53 | 显示全部楼层
Post by richardpku;1897891
这是搞笑么?


请不要删除<2.6.27源码,下载2.6.27,解压到/usr/src,运行
du -s -h /usr/src

看看结果,请问这有什么好笑?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表