decoration Tag "vesa" decoration

decoration
06.03 2007
17:37

Framebuffer in Linux


I saying here specially 'Linux's users' because I don't know how this case looks in another unix operating systems, but I think that they can be equipped in devices this type. In case of other operating systems than Linux this method doesn't work because here we need modify Linux kernel. One of the most popular framebuffer is used to change system console resolution. This operation lets to users get more comfortable in moving on system dictionaries and files by console. Framebuffer can be used to viewing graphics files, pdf's or video clips.


Choosing controller


To prepare system to framebuffer handling first we need to recompile kernel in specific way. I show here method of compile kernel with vesafb-tng controller. First we need to download kernel's patch, which let to use this controller. Vesafb-tng is a project build up by polish developer of Gentoo Linux – Michał Januszewski. This controller let get in console nonstandard resolution (ex. for panoramic screens), which default controller vesafb didn't support. This file may be downloaded from website http://dev.gentoo.org/~spock/projects/vesafb-tng/ and file name is vesafb-tng-***.patch. To make vesafb-tng works patch should be downloaded adequate to used kernel in system.


Kernel preparing


When downloading is finished we are going to directory where kernel sources are unpacked and updating them by command:

cat patch_to/vesafb-tng.patch | patch -p1

To compile this controller to kernel we using command:

make menuconfig

and going to Device Drivers > Graphics support. I we don't have build framebuffer in kernel yet then selecting Support for frame buffer devices and next VESA VGA graphics support and choosing controller vesafb-tng, changing by the way console resolution:


[art]kernel.jpg[/art]


{newpage}


After that we quiting from configure, saving changes and compile kernel by command make. Now we changing actually kernel by this compiled one moment ago and restarting computer. Here is a sample with framebuffer support:


[art]konsola.jpg[/art]


Graphics files


One of the program which let viewing graphics files is fbi. We can find id on website http://linux.bytesex.org/fbida/. When we finish compile program and all needed libraries, we can viewing graphics in formats jpg, gif, png. To works this program needs framebuffer handling. In other case nothing will be from this. Here is sample photography viewed in system console.


[art]fbi.jpg[/art]


Video files


If we can viewing graphics files in console, so we can watching video clips too. One of programs wich let this, is I think know by every Linux's user Mplayer. To have a possibility to playing video clips in console, we need to compile program with supporting for directfb. To run video vile we use standard command mplayer file.avi. Here sample, how works support for video files under console.


[art]mplayer.jpg[/art]




Copyleft (C) tom000.info 2004-2010. Some rights reserved.