设为首页 加入收藏 简繁转换

 | 网站首页 | 网络学院 | 自考论坛 | 四联自学 | 四联博客 | 

您现在的位置: IT自学网 >> 网络学院 >> 操作系统 >> Linux >> 新手入门 >> 学院正文
专 题 栏 目
最 新 热 门
最 新 推 荐
相 关 文 章
按部就班三步走:RHCE黄金…
实力的终极挑战:RHCE认证…
考前必读:怎样准备RHCE考…
认证考试介绍之RHCE篇
红旗Linux认证证书样本
高手攻关心得:RHCE实战详…
实力的终极挑战:RHCE认证…
按部就班三步走:RHCE黄金…
考前必读:怎样准备RHCE考…
明年Redhat考试将有重大…
Framebuffer HOWTO英文         ★★★★
Framebuffer HOWTO英文
作者:4Lzx.com 文章来源:bbs.4Lzx.com 点击数: 更新时间:2005-9-4 18:51:58
(forexample, within the 15MB-16MB range) for frame buffering which preludesthese from being used successfully with systems that have more than 32MBof memory. There is a way to make this work, i.e. if you have a BIOSoption to leave a memory hole at 15MB-16MB range, it might work, Linuxdoesn't support the use of memory holes. However there are patches forthis option though [Who has these and where do one gets them from?]. Ifyou wish to experiment with this option, there are plenty of TSR styleprograms available, a prime example is UNIVBE, which can be found on theInternet.

Alternatively, you may be able to download kernel patches to allow yourVESA 1.2 card to work with the VESA framebuffer driver. For example, there are patches for use with older S3 boards (such as S3 Trio, S3 Virge)that supports VESA 1.2. For these cards, you can pick up patches from

ftp://ccssu.crimea.ua/pub/linux/kernel/v2.2/unofficial/s3new.diff.gz

5.2 How do I activate the vesafb drivers?

Assuming you are using menuconfig, you will need to do the followingsteps:

If your processor (on Intel platforms) supports MTRRs, enable this. It speeds up memory copies between the processor and the graphic card, butnot strictly necessary. You can of course, do this after you have the console device working.

IMPORTANT: For 2.1.x kernels, go into the Code Maturity Level menu, and enable the prompt for development andor incomplete drivers. This is no longer necessary for the 2.2.x kernels.

Go into the Console Drivers menu, and enable the following:

* VGA Text Console
* Video Selection Support
* Support for frame buffer devices (experimental)
* VESA VGA Graphic console
* Advanced Low Level Drivers
* Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixeldrivers

VGA Chipset Support (text only) - vgafb - used to be part of the listabove, but it has been removed as it is now deprecated and no longersupported. It will be removed shortly. Use VGA Text Console (fbcon)instead. VGA Character/Attributes is only used with VGA ChipsetSupport, and doesn't need to be selected.

Ensure that the Mac variable bpp packed pixel support is not enabled.Linux kernel release 2.1.111 (and 112) seemed to enable thisautomatically if Advanced Low Level Drivers was selected for the firsttime. This no longer happens with 2.1.113.

There is also the option to compile in fonts into memory, but this isn'treally necessary, and you can always use kbd-0.99's (see section on fonts)setfont utility to change fonts by loading fonts into the console device.

Make sure these aren't going to be modules. [Not sure if it's possible tobuild them as modules yet - please correct me on this]

You'll need to create the framebuffer device in /dev. You need one perframebuffer device, so all you need to do is to type in mknod /dev/fb0 c 29 0for the first one. Subsequent ones would be in multiples of 32, so for exampleto create /dev/fb1, you would need to type in mknod /dev/fb1 c 29 32, and so onup to the eighth framebuffer device (mknod /dev/fb7 c 29 224)

Then rebuild the kernel, modify /etc/lilo.conf to include the VGA=ASKparameter, and run lilo, this is required in order for you to be able toselect the modes you wish to use.

Here's a sample LILO configuration (taken from my machine)

# LILO configuration fileboot = /dev/hda3delay = 30 promptvga = ASK # Let user enter the desired modesimage = /vmlinuz root = /dev/hda3 label = Linux read-only # Non-UMSDOS filesystems should be mounted read-only for checking

Reboot the kernel, and as a simple test, try entering 0301 at the VGAprompt (this will give you 640x480 @ 256), and you should be able to see acute little Penguin logo.

Note, that at the VGA prompt, you're required to type in the number in the format of "0" plus the 3 digit figure, and miss out the 'x'. This isn'tnecessary if you're using LILO.

Once you can see that's working well, you can explore the various VESAmodes (see below) and decide on the one that you like the best, andhardwire that into the "VGA=x" parameter in lilo.conf. When you havechosen the one you like the best, look up the equivalent hexadecimal numberfrom the table below and use that (i.e. for 1280x1024 @ 256, you just use "VGA=0x307"), and re-run lilo. That's all there it is to it. For further references, read the LoadLin/LILO HOWTOs.

NOTE! vesafb does not enable scrollback buffering as a default. Youwill need to pass to the kernel the option to enable it. Usevideo=vesa:ypan or video=vesa:ywrap to activate it. Both does the samething, but in different ways. ywrap is a lot faster than ypan but may notwork on slightly broken VESA 2.0 graphic cards. ypan is slower than ywrapbut a lot more compatible. This option is only present in kernel 2.1.116and above. Earlier kernels did not have the ability to allow scrollbackbuffering in vesafb.

5.3 What VESA modes are available to me?

This really depends on the type of VESA 2.0 compliant graphic card thatyou have in your system, and the amount of video memory available. This isjust a matter of testing which modes work best for your graphic card.

The following table shows the mode numbers you can input at the VGA promptor for use with the LILO program. (actually these numbers are plus 0x200to make it easier to refer to the table)

Colours 640x400 640x480 800x600 1024x768 1152x864 1280x1024 1600x1200--------+-------------------------------------------------------------- 4 bits | ? ? 0x302 ? ? ? ? 8 bits | 0x300 0x301 0x303 0x305 0x161 0x307 0x31C15 bits | ? 0x310 0x313 0x316 0x162 0x319 0x31D16 bits | ? 0x311 0x314 0x317 0x163 0x31A 0x31E24 bits | ? 0x312 0x315 0x318 ? 0x31B 0x31F32 bits | ? ? ? ? 0x164 ?

Key: 8 bits = 256 colours, 15 bits = 32,768 colours, 16 bits = 65,536colours, 24 bits = 16.8 million colours, 32 bits - same as 24 bits, butthe extra 8 bits can be used for other things, and fits perfectly with a32 bit PCI/VLB/EISA bus.

Additional modes are at the discretion of the manufacturer, as the VESA2.0 document only defines modes up to 0x31F. You may need to do somefiddling around to find these extra modes.

5.4 Got a Matrox card?

If you've got a Matrox graphic card, you don't actually need vesafb, you need the matroxfb driver instead. This greatly enhances the capabilitiesof your card. Matroxfb will work with Matrox Mystique Millennium I & II, G100 and G200. It also supports multiheaded systems (that is, if you havetwo Matrox cards in your machine, you can use two displays on the same machine!). To configure for Matrox, you will need to do the following:

You might want to upgrade the Matrox BIOS though, you can download the BIOSupgrade from

http://www.matrox.com/mgaweb/drivers/ftp_bios.htm

Beware thatyou will need DOS to do this.

Go into the Code Maturity Level menu, and enable the prompt fordevelopment and/or incomplete drivers [note this may change for futurekernels - when this happens, this HOWTO will be revised]

Go into the Console Drivers menu, and enable the following:

* VGA Text Console
* Video Selection Support
* Support for frame buffer devices (experimental)
* Matrox Acceleration
* Select the following depending on the card that you have
o Millennium I/II support
o Mystique support
o G100/G200 support
* Enable Multihead Support if you want to use more than one Matrox card
* Advanced Low Level Drivers
* Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixeldrivers

Rebuild your kernel. Then you will need to modify your lilo.conf file to enable the Matroxfb device. The quickest and simplest way is re-use mine.

# LILO configuration fileboot = /dev/hda3delay = 30 promptvga = 792 # You need to do this so it boots up in a sane state# Linux bootable partition config beginsimage = /vmlinuz append = "video=matrox:vesa:440" # then switch to Matroxfb root = /dev/hda3 label = Linux read-only # Non-UMSDOS filesystems should be mounted read-only for checking

Lastly, you'll need to create the framebuffer device in /dev. You need one perframebuffer device, so all you need to do is to type in mknod /dev/fb0 c 29 0for the first one. Subsequent ones would be in multiples of 32, so for exampleto create /dev/fb1, you would need to type in mknod /dev/fb1 c 29 32, and so onup to the eight framebuffer device (mknod /dev/fb7 c 29 224)

And that should be it! [NOTE: Is anyone using this multiheaded support, pleaseget in touch with me ASAP - I need to talk to you about it so I can document it!

5.5 Got a Permedia card?

Permedia cards cannot be used with the vesafb driver, but fortunately, thereis the Permedia framebuffer driver available to use. Assuming you are usingmenuconfig, do the following:

Go into the Code Maturity Level menu, and enable the prompt fordevelopment and/or incomplete drivers [note this may change for futurekernels - when this happens, this HOWTO will be revised]

Go into the Console Drivers menu and select the following:

* VGA Text Console
* Video Selection Support
* Support for frame buffer devices (experimental)
* Permedia2 support (experimental)
* Generic Permedia2 PCI board support
* Advanced Low Level Drivers
* Select Mono, 2bpp, 4bpp, 8bpp, 16bpp, 24bpp and 32bpp packed pixel drivers
* Optionally, select the following, if you wish to use the compiled in fonts
o Select compiled-in fonts
o Select Sparc console 12x22 font

Rebuild your kernel. Then you will need to modify your lilo.conf

上一页  [1] [2] [3] [4] [5] [6] [7] 下一页

学院录入:4Lzx.com    责任编辑:4Lzx.com 
  • 上一篇学院:

  • 下一篇学院:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      网友评论:(评论内容只代表网友观点,与本站立场无关!)

    站长:IT自学
    有事点这里