找回密码
 注册
查看: 709|回复: 5

关于mgaview的问题

[复制链接]
发表于 2004-8-7 15:06:47 | 显示全部楼层 |阅读模式
我装了个在文本模式下看图片的软件 mgaview
运行的命令是不是 mgaview xx 。jpg ??
我运行后,显示 couldn't open /dev/fb0
请问 这是什么问题啊??谢谢了!
发表于 2004-8-8 01:43:26 | 显示全部楼层
启动时给内核传递vga=xxxx参数,启用镇缓冲
回复

使用道具 举报

 楼主| 发表于 2004-8-8 12:35:39 | 显示全部楼层
请问具体怎么操作呢 ?谢谢了 我刚开是接触linux :)
回复

使用道具 举报

发表于 2004-8-8 13:35:18 | 显示全部楼层
[code:1]How to use it?
==============

If you are running your system on hardware platform where vm86 is supported
(this is 32-bit x86 only as of the time of writing this document), you can
either compile vesafb into the kernel or use it as a module. The graphic mode
you want to use is in both cases specified using the standard modedb format.

If your system doesn't support vm86 calls yet (all 64-bit platforms), things
get a little more tricky. Since on such systems you can't do BIOS calls from
protected mode in which kernel runs, you have to decide at boot time whenever
you want to run in text or in graphics mode. Swithcing mode later on is
impossible. Switching modes is done using the vga=... boot parameter.  Read
Documentation/svga.txt for details. Below is a more detailed description of
what to do on systems with old-style mode switching.

You should compile in both vgacon (for text mode) and vesafb (for graphics mode).
Which of them takes over the console depends on whenever the specified mode is
text or graphics.

The graphic modes are NOT in the list which you get if you boot with vga=ask
and hit return. The mode you wish to use is derived from the VESA mode number.
Here are those VESA mode numbers:

    | 640x480  800x600  1024x768 1280x1024
----+-------------------------------------
256 |  0x101    0x103    0x105    0x107   
32k |  0x110    0x113    0x116    0x119   
64k |  0x111    0x114    0x117    0x11A   
16M |  0x112    0x115    0x118    0x11B   

The video mode number of the Linux kernel is the VESA mode number plus 0x200.

Linux_kernel_mode_number = VESA_mode_number + 0x200

So the table for the Kernel mode numbers are:

    | 640x480  800x600  1024x768 1280x1024
----+-------------------------------------
256 |  0x301    0x303    0x305    0x307   
32k |  0x310    0x313    0x316    0x319   
64k |  0x311    0x314    0x317    0x31A   
16M |  0x312    0x315    0x318    0x31B   

To enable one of those modes you have to specify "vga=ask" in the lilo.conf
file and rerun LILO. Then you can type in the desired mode at the "vga=ask"
prompt. For example if you like to use 1024x768x256 colors you have to say
"305" at this prompt.

If this does not work, this might be because your BIOS does not support
linear framebuffers or because it does not support this mode at all.
Even if your board does, it might be the BIOS which does not.  VESA BIOS
Extensions v2.0 are required, 1.2 is NOT sufficient.  You will get a
"bad mode number" message if something goes wrong.

1. Note: LILO cannot handle hex, for booting directly with
         "vga=mode-number" you have to transform the numbers to decimal.
2. Note: Some newer versions of LILO appear to work with those hex values,
         if you set the 0x in front of the numbers.[/code:1]
title Fedora Core (2.6.7-1.47
        root (hd0,9)
        kernel /boot/vmlinuz-2.6.7-1.478 ro root=/dev/hda10 rhgb vga=0x317 append="video=vesa:ywrap,mtrr"
        initrd /boot/initrd-2.6.7-1.478.img
回复

使用道具 举报

 楼主| 发表于 2004-8-9 15:47:29 | 显示全部楼层
太谢谢你了,不好意思还有个问题 ,请问 256 32k 64k 16m 是什么意思呢? lilo里的append="video=vesa:ywrap,mtrr" 是用来干什么的呢?
真是麻烦你了:)
回复

使用道具 举报

发表于 2004-8-9 16:12:43 | 显示全部楼层
[code:1]Configuration
=============

The VESA BIOS provides protected mode interface for changing
some parameters.  vesafb can use it for palette changes and
to pan the display.  It is turned off by default because it
seems not to work with some BIOS versions, but there are options
to turn it on.

You can pass options to vesafb using "video=vesafb:option" on
the kernel command line.  Multiple options should be separated
by comma, like this: "video=vesafb:ypan,invers"

Accepted options:

invers        no comment...

ypan        enable display panning using the VESA protected mode
        interface.  The visible screen is just a window of the
        video memory, console scrolling is done by changing the
        start of the window.
        pro:        * scrolling (fullscreen) is fast, because there is
                  no need to copy around data.
                * You'll get scrollback (the Shift-PgUp thing),
                  the video memory can be used as scrollback buffer
        kontra: * scrolling only parts of the screen causes some
                  ugly flicker effects (boot logo flickers for
                  example).

ywrap        Same as ypan, but assumes your gfx board can wrap-around
        the video memory (i.e. starts reading from top if it
        reaches the end of video memory).  Faster than ypan.

redraw        scroll by redrawing the affected part of the screen, this
        is the safe (and slow) default.


vgapal        Use the standard vga registers for palette changes.
        This is the default.
pmipal        Use the protected mode interface for palette changes.

mtrr        setup memory type range registers for the vesafb framebuffer.

vram:n        remap 'n' MiB of video RAM. If 0 or not specified, remap memory
        according to video mode. (2.5.66 patch/idea by Antonino Daplas
        reversed to give override possibility (allocate more fb memory
        than the kernel would) to 2.4 by [email protected])[/code:1]
看看内核源码目录下的/Documentation/fb/vesafb.txt
回复

使用道具 举报

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

本版积分规则

GMT+8, 2025-7-27 14:48 , Processed in 0.024713 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

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