Search

Installing Directfb On Fedora

After much googling,  I have directfb up and running on Fedora 9 and 13.

After installing the fedora from DVD, ( DVD is preferable cause it has gcc and other development packages preinstalled)

Open a terminal and type

yum update.

If you get an error saying it could not connect to the repository try one of the following
1. If you are behind a proxy that needs authentication then download and run the ntlmaps. Set the respective proxies in the terminal using the "export" command

2. In the files /etc/yum.repos.d/fedora-updates.repo and /etc/yum.repos.d/fedora.repo  you will find lines starting with "mirrorlist" commented and the lines starting with the word "baseurl" uncommented. Reverse this, that is remove the "#" from the beginning of the lines that start with "baseurl" and add a "#" to the lines that start with the word "mirriorlist"

3. Check if the site that mentioned in the baseurl is working by putting it in a browser, if it is not get a new url closer to you geographically from http://mirrors.fedoraproject.org/publiclist/Fedora/13/i386/
and replace it in the two files mentioned above.

Once you have yum update working run the following

yum install libpng
yum install libjpeg
yum install freetype
yum install libpng-devel
yum install libjpeg-devel
yum install xorg-x11-xtrans-devel
yum install libsysfs-devel
yum install zlib


If libsysfs and zlib are not available download them from   

libsysfs: http://www.rpmfind.net/linux/rpm2html/search.php?query=libsysfs
zlib: http://www.zlib.net/


yum install libxext-dev
yum install kernel-headers
yum install kernel-devel-"your kernel version"
yum install directfb

If you can not find the directfb package in the repos you can download the rpm for your version from  http://rpm.pbone.net/ and run


rpm -ivh "rpm file name" 




Once the above steps work with out problems open the file  /etc/grub.conf
Note: You will have to have root privileges to edit this file so use sudo

In this file look at the kernel version that you want to work with and under that title go to the line that starts with word"kernel". At the end of this line add  "vga=791".
791 is basically to set the framebuffer resolution to 1024X768.

Now reboot your system.

Log in and run the command as root
/usr/sbin/fbset.

copy the ouput of this command and paste it at the begining of the file
/etc/fb.modes.
Note: you will need root privileges 

Now run the command "dfbdump"  if you do not see any errors your directfb is up and running.

To modify the resolution of the framebuffer you can do the following.
While the system boots press "esc" during the grub loading stage,
Press "e" after highligting the kernel version you want to boot.
Move to the line starting with "kernel"
press "e"
at the end of this line add "vga=ask"
press "b"

The booting will stop and ask you to press enter to view all the possible resolutions,  you can choose the number which ever you like and if it works, set it permanently in the file /etc/grub.conf. Remember to convert the hex number that you see during boot time to decimal.


Have fun with the directfb :-)

No comments:

Post a Comment