8g 于 2005-09-09 14:04:33发表:
linux显卡的配置(二)
接linux显卡的配置(一)
编译安装内核:
以 root身份登录,键入以下命令:
# cd /usr/src/linux
# make bzImage
# make modules
# make modules_install
把编译好的内核拷到 /boot目录,文件名可自定,如
# cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.5-fb
建立 frame buffer设备
frame buffer设备的 major为 29,minor 为 0(fb0),32(fb1). . . 224(fb7)。
创建fb设备
# mknod /dev/fb0 c 29 0
....
配置 lilo 的启动选项
添加lilo启动配置
下面是典型的lilo.conf文件(位于/etc目录)
boot = /dev/hda2
timeout = 500
prompt
read-only
image = /boot/vmlinuz-2.2.x
label = linux
root = /dev/hda2
other = /dev/hda1
label = dos
添加一新配置需添加 image,label,root及配合VESA frame buffer的 vga等四项:
boot = /dev/hda2
timeout = 500
prompt
read-only
image = /boot/vmlinuz-2.2.x
label = linux
root = /dev/hda2
image = /boot/vmlinuz-2.2.5-fb (新编译的内核)
label = linuxfb (启动标号,可自定)
root = /dev/hda2 (着一句具体会有不同,照你自己的lilo.conf)
vga = 0x314 (显示模式,参照下表)
other = /dev/hda1
label = dos
Linux_kernel_mode_number = VESA_mode_number + 0x200
640x480 800x600 1024x768 1280x1024
256 0x301 0x303 0x305 0x307
32k 0x310 0x313 0x316 0x319
64k 0x311 0x314 0x317 0x31A
16M 0x312 0x315 0x318 0x31B
更新启动程序
运行lilo
重启,出现 lilo: 时键入linuxfb (或自定的标号)。
这时如果linux切换成图形模式,并有一小企鹅logo出现,那就大功告成一半。
配置frame buffer Server
为 frame buffer Server配置Screen
参照 XF86Config (位于/etc/X11、/usr/X11R6/lib)中 vga16的配置。
例如:
Section "Screen"
Driver "vga16"
Device "My Video Card"
Monitor "MAG XJ500T"
Subsection "Display"
Modes "640x480" "800x600"
ViewPort 0 0
EndSubsection
EndSection
改动Driver, Modes, Depth三项,其余照抄
Section "Screen"
Driver "fbdev"
Device "My Video